Ejemplo n.º 1
0
 public DPPVATBankExpenditureNoteDto(DPPVATBankExpenditureNoteModel model, List <DPPVATBankExpenditureNoteItemModel> items, List <DPPVATBankExpenditureNoteDetailModel> details)
 {
     Id         = model.Id;
     Bank       = new AccountBankDto(model.BankAccountId, model.BankAccountingCode, model.BankAccountNumber, model.BankName, model.BankCurrencyCode, model.BankCurrencyId, model.BankCurrencyRate);
     Currency   = new CurrencyDto(model.CurrencyCode, model.CurrencyId, model.CurrencyRate);
     Supplier   = new SupplierDto(model.SupplierId, model.SupplierName, model.IsImportSupplier, null);
     BGCheckNo  = model.BGCheckNo;
     Amount     = model.Amount;
     Date       = model.Date;
     IsPosted   = model.IsPosted;
     Items      = items.Select(item => new DPPVATBankExpenditureNoteItemDto(item, details.Where(detail => detail.DPPVATBankExpenditureNoteItemId == item.Id).ToList())).ToList();
     DocumentNo = model.DocumentNo;
 }
 public InternalNoteDto(DPPVATBankExpenditureNoteItemModel item, List <DPPVATBankExpenditureNoteDetailModel> details)
 {
     Id              = item.Id;
     DocumentNo      = item.InternalNoteNo;
     Date            = item.InternalNoteDate;
     DueDate         = item.DueDate;
     Supplier        = new SupplierDto(item.SupplierId, item.SupplierName, item.IsImportSupplier, item.SupplierCode);
     VATAmount       = item.VATAmount;
     IncomeTaxAmount = item.IncomeTaxAmount;
     DPP             = item.DPP;
     TotalAmount     = item.TotalAmount;
     Currency        = new CurrencyDto(item.CurrencyCode, item.CurrencyId, 0);
     Items           = details.Select(detail => new InternalNoteInvoiceDto(detail)).ToList();
 }