public VBRealizationDocumentExpenditureItemModel(int vbRealizationDocumentId, VBRealizationDocumentNonPOExpenditureItemViewModel viewModel) { Date = viewModel.DateDetail.GetValueOrDefault(); Remark = viewModel.Remark; Amount = viewModel.Amount; UseVat = viewModel.IsGetPPn; UseIncomeTax = viewModel.IsGetPPh; BLAWBNumber = viewModel.BLAWBNumber; PPnAmount = viewModel.PPnAmount; PPhAmount = viewModel.PPhAmount; if (viewModel.IncomeTax != null) { IncomeTaxId = viewModel.IncomeTax.Id; IncomeTaxName = viewModel.IncomeTax.Name; IncomeTaxRate = viewModel.IncomeTax.Rate.GetValueOrDefault(); } if (viewModel.VatTax != null) { VatId = viewModel.VatTax.Id; VatRate = viewModel.VatTax.Rate; } IncomeTaxBy = viewModel.IncomeTaxBy; VBRealizationDocumentId = vbRealizationDocumentId; }