Files
raven/server/AyaNova/models/WorkOrderItemLabor.cs
John Cardinal 59fd41d8d0 CHECKPOINT COMMIT - POST SERVICE BANK REMOVAL
Service bank feature removed from front, back and e2e testing
mostly commented out in case need to add back again but in some places such as db schema it had to be removed entirely
so refer here if adding back in again
2021-06-04 22:23:21 +00:00

81 lines
3.2 KiB
C#

using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Newtonsoft.Json;
using AyaNova.Biz;
namespace AyaNova.Models
{
public class WorkOrderItemLabor : ICoreBizObjectModel
{
public long Id { get; set; }
public uint Concurrency { get; set; }
public long? UserId { get; set; }
[NotMapped]
public string UserViz { get; set; }
public DateTime? ServiceStartDate { get; set; }
public DateTime? ServiceStopDate { get; set; }
public long? ServiceRateId { get; set; }
[NotMapped]
public string ServiceRateViz { get; set; }
public string ServiceDetails { get; set; }
public decimal ServiceRateQuantity { get; set; }
public decimal NoChargeQuantity { get; set; }
//public long? ServiceBankId { get; set; }
public long? TaxCodeSaleId { get; set; }
[NotMapped]
public string TaxCodeSaleViz { get; set; }
//Standard pricing fields (mostly to support printed reports though some show in UI)
//some not to be sent with record depending on role (i.e. cost and charge in some cases)
public decimal? PriceOverride { get; set; }//user entered manually overridden price, if null then ignored in calcs otherwise this *is* the price even if zero
[NotMapped]
public decimal CostViz { get; set; }//cost from source record (e.g. serviceRate) or zero if no cost entered
[NotMapped]
public decimal ListPriceViz { get; set; }//List price from source record (e.g. serviceRate) or zero if no cost entered
[NotMapped]
public string UnitOfMeasureViz { get; set; }//"each", "hour" etc
[NotMapped]
public decimal PriceViz { get; set; }//per unit price used in calcs after discounts or manual price if non-null or just ListPrice if no discount or manual override
[NotMapped]
public decimal NetViz { get; set; }//quantity * price (before taxes line total essentially)
[NotMapped]
public decimal TaxAViz { get; set; }//total amount of taxA
[NotMapped]
public decimal TaxBViz { get; set; }//total amount of taxB
[NotMapped]
public decimal LineTotalViz { get; set; }//line total netViz + taxes
[Required]
public long WorkOrderItemId { get; set; }
[JsonIgnore]
public WorkOrderItem WorkOrderItem { get; set; }
[NotMapped, JsonIgnore]
public AyaType AyaType { get => AyaType.WorkOrderItemLabor; }
}//eoc
}//eons
/*
CREATE TABLE [dbo].[AWORKORDERITEMLABOR](
[AID] [uniqueidentifier] NOT NULL,
[AWORKORDERITEMID] [uniqueidentifier] NOT NULL,
[ACREATOR] [uniqueidentifier] NOT NULL,
[AMODIFIER] [uniqueidentifier] NOT NULL,
[ACREATED] [datetime] NOT NULL,
[AMODIFIED] [datetime] NOT NULL,
[AUSERID] [uniqueidentifier] NULL,
[ASERVICESTARTDATE] [datetime] NULL,
[ASERVICESTOPDATE] [datetime] NULL,
[ASERVICERATEID] [uniqueidentifier] NULL,
[ASERVICEDETAILS] [ntext] NULL,
[ASERVICERATEQUANTITY] [decimal](19, 5) NULL,
[ANOCHARGEQUANTITY] [decimal](19, 5) NULL,
[ASERVICEBANKID] [uniqueidentifier] NULL,
[ATAXRATESALEID] [uniqueidentifier] NULL
*/