invoicedtos
This commit is contained in:
@@ -29,10 +29,10 @@ namespace Back.Data.Models
|
|||||||
public int? inty { get { return pattern.BillType.inty; } }
|
public int? inty { get { return pattern.BillType.inty; } }
|
||||||
//الگوی صورتحساب
|
//الگوی صورتحساب
|
||||||
[MaxLength(2)]
|
[MaxLength(2)]
|
||||||
public int? inp { get { return pattern.inp; } }
|
public int? inp { get { return pattern?.inp; } }
|
||||||
//شماره اقتصادی فروشنده
|
//شماره اقتصادی فروشنده
|
||||||
[MaxLength(14)]
|
[MaxLength(14)]
|
||||||
public string? tins { get { return company.EconomicCode; } }
|
public string? tins { get { return company?.EconomicCode; } }
|
||||||
//شماره اقتصادی خریدار
|
//شماره اقتصادی خریدار
|
||||||
[MaxLength(14)]
|
[MaxLength(14)]
|
||||||
public string? tinb { get { return Customer.EconomicCode; } }
|
public string? tinb { get { return Customer.EconomicCode; } }
|
||||||
@@ -53,7 +53,7 @@ namespace Back.Data.Models
|
|||||||
public decimal? todam { get { return invoiceDetails.Sum(i => i.odam) + invoiceDetails.Sum(i => i.olam); } }
|
public decimal? todam { get { return invoiceDetails.Sum(i => i.odam) + invoiceDetails.Sum(i => i.olam); } }
|
||||||
//مجموع صورتحساب
|
//مجموع صورتحساب
|
||||||
[MaxLength(18)]
|
[MaxLength(18)]
|
||||||
public decimal? tbill { get {return pattern.inp==10? torv+ tvam+ todam : invoiceDetails.Sum(i => i.tsstam);}}
|
public decimal? tbill { get {return pattern?.inp==10? torv+ tvam+ todam : invoiceDetails.Sum(i => i.tsstam);}}
|
||||||
//مجموع وزن خالص
|
//مجموع وزن خالص
|
||||||
[MaxLength(18)]
|
[MaxLength(18)]
|
||||||
public decimal? tonw { get { return invoiceDetails.Sum(i => i.nw); } }
|
public decimal? tonw { get { return invoiceDetails.Sum(i => i.nw); } }
|
||||||
@@ -87,7 +87,7 @@ namespace Back.Data.Models
|
|||||||
public string? bpn { get { return Customer.PassportNumber; } }
|
public string? bpn { get { return Customer.PassportNumber; } }
|
||||||
//کد شعبه فروشنده
|
//کد شعبه فروشنده
|
||||||
[MaxLength(9)]
|
[MaxLength(9)]
|
||||||
public string? sbc { get { return company.BranchID; } }
|
public string? sbc { get { return company?.BranchID; } }
|
||||||
//مبلغ پرداختی نقدی
|
//مبلغ پرداختی نقدی
|
||||||
[MaxLength(18)]
|
[MaxLength(18)]
|
||||||
public decimal? cap { get { return insp - tvam - todam - tbill; } }
|
public decimal? cap { get { return insp - tvam - todam - tbill; } }
|
||||||
|
109
Shared/DTOs/InvoiceDtos.cs
Normal file
109
Shared/DTOs/InvoiceDtos.cs
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Shared.DTOs
|
||||||
|
{
|
||||||
|
public class InvoiceDTO
|
||||||
|
{
|
||||||
|
public int ID { get; set; }
|
||||||
|
public InvoiceType? invoiceType { get; set; }
|
||||||
|
public string? invoiceTypeTitle { get; set; }
|
||||||
|
public int? CompanyID { get; set; }
|
||||||
|
public int CustomerID { get; set; }
|
||||||
|
public int CustomerName { get; set; }
|
||||||
|
public string? Udate { get; set; }
|
||||||
|
public string? InvoicIssueDate { get; set; }
|
||||||
|
public string? InvoiceDate { get; set; }
|
||||||
|
public bool? PreparedtoSendtoTax { get; set; }
|
||||||
|
public string? Title { get; set; }
|
||||||
|
public string? Des { get; set; }
|
||||||
|
//مجموع تخفیفات
|
||||||
|
public decimal? tdis { get; set; }
|
||||||
|
//مجموع مالیات بر ارزش افزوده
|
||||||
|
[MaxLength(18)]
|
||||||
|
public decimal? tvam { get; set; }
|
||||||
|
//مجموع صورتحساب
|
||||||
|
[MaxLength(18)]
|
||||||
|
public decimal? tbill { get; set; }
|
||||||
|
public int? BillReference { get; set; }
|
||||||
|
public ICollection<InvoiceItemDTO> items { get; set; }
|
||||||
|
public ICollection<InvoicePaymentDTO> payments { get; set; }
|
||||||
|
// public ICollection<InvoiceStatusDto> Invoicestatuschanges { get; set; }
|
||||||
|
// public ICollection<InvoiceSendTaxDTO> InvoiceSendTaxs { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
public class InvoiceItemDTO
|
||||||
|
{
|
||||||
|
public int? ID { get; set; }
|
||||||
|
public int CODID { get; set; }
|
||||||
|
// شرح کاال/خدمت
|
||||||
|
public string? sstt { get; set; }
|
||||||
|
//واحد اندازهگیری
|
||||||
|
public string? mu { get; set; }
|
||||||
|
//تعداد/مقدار
|
||||||
|
public decimal am { get; set; }
|
||||||
|
//مبلغ واحد
|
||||||
|
public decimal fee { get; set; }
|
||||||
|
//نرخ مالیات بر ازش افزوده
|
||||||
|
public decimal? vra { get; set; }
|
||||||
|
//مبلغ مالیات بر ارزش افزوده
|
||||||
|
public decimal? vam { get; set; }
|
||||||
|
//مبلغ تخفیف
|
||||||
|
public decimal? dis { get; set; }
|
||||||
|
//مبلغ بعد از تخفیف
|
||||||
|
public decimal? adis { get; set; }
|
||||||
|
//مبلغ کل کالا/خدمت
|
||||||
|
public decimal? tsstam { get; set; }
|
||||||
|
}
|
||||||
|
public class InvoicePaymentDTO
|
||||||
|
{
|
||||||
|
public int? ID { get; set; }
|
||||||
|
[MaxLength(9)]
|
||||||
|
public string? iinn { get; set; }
|
||||||
|
//شماره پذیرنده فروشگاهی
|
||||||
|
[MaxLength(14)]
|
||||||
|
public string? acn { get; set; }
|
||||||
|
//شماره پایانه
|
||||||
|
[MaxLength(8)]
|
||||||
|
public string? trmn { get; set; }
|
||||||
|
//روش پرداخت
|
||||||
|
[MaxLength(2)]
|
||||||
|
public int? pmt { get; set; }
|
||||||
|
//شماره پیگیری/شماره مرجع
|
||||||
|
[MaxLength(14)]
|
||||||
|
public string? trn { get; set; }
|
||||||
|
//شماره کارت پرداخت کننده صورتحساب
|
||||||
|
[MaxLength(16)]
|
||||||
|
public string? pcn { get; set; }
|
||||||
|
//شماره/شناسه ملی/کد فراگیر اتباع غیر ایرانی پرداخت کننده صورتحساب
|
||||||
|
[MaxLength(12)]
|
||||||
|
public string? pid { get; set; }
|
||||||
|
//تاریخ و زمان پرداخت
|
||||||
|
[MaxLength(13)]
|
||||||
|
public long? pdt { get; set; }
|
||||||
|
//مبلغ پرداختی
|
||||||
|
[MaxLength(18)]
|
||||||
|
public decimal? pv { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
//------------------------------
|
||||||
|
public class InvoiceStatusDto
|
||||||
|
{
|
||||||
|
public string Date { get; set; }
|
||||||
|
public string User { get; set; }
|
||||||
|
public string FromStatus { get; set; }
|
||||||
|
public string ToStatus { get; set; }
|
||||||
|
}
|
||||||
|
public class InvoiceSendTaxDTO
|
||||||
|
{
|
||||||
|
public int SendTaxID { get; set; }
|
||||||
|
public string Date { get; set; }
|
||||||
|
public string Status { get; set; }
|
||||||
|
public string Type { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Reference in New Issue
Block a user