public POExternalItemDto(GarmentExternalPurchaseOrderItem element, GarmentExternalPurchaseOrder entity, GarmentInternalPurchaseOrder purchaseOrder)
 {
     Product         = new ProductDto(element.ProductCode, element.ProductId, element.ProductName, element.DefaultUomId, element.DefaultUomUnit);
     DefaultQuantity = element.DefaultQuantity;
     DealQuantity    = element.DealQuantity;
     DealUOM         = new UOMDto(element.DealUomId, element.DealUomUnit);
     Conversion      = element.Conversion;
     Price           = element.PricePerDealUnit;
     UseVat          = entity.IsUseVat;
     Unit            = new UnitDto(purchaseOrder.UnitId, purchaseOrder.UnitCode, purchaseOrder.UnitName, purchaseOrder.DivisionCode, purchaseOrder.DivisionId, purchaseOrder.DivisionName);
     IncomeTax       = new IncomeTaxDto(entity.IncomeTaxId, entity.IncomeTaxName, entity.IncomeTaxRate);
     UseIncomeTax    = entity.IsIncomeTax;
     EPOId           = (int)entity.Id;
 }
 public POExternalItemDto(ExternalPurchaseOrderDetail element, ExternalPurchaseOrder entity)
 {
     Product         = new ProductDto(element.ProductCode, element.ProductId, element.ProductName, element.DefaultUomId, element.DefaultUomUnit);
     DefaultQuantity = element.DefaultQuantity;
     DealQuantity    = element.DealQuantity;
     DealUOM         = new UOMDto(element.DealUomId, element.DealUomUnit);
     Conversion      = element.Conversion;
     Price           = element.PricePerDealUnit;
     UseVat          = entity.UseVat;
     VatTax          = new VatTaxDto(entity.VatId, entity.VatRate);
     Unit            = new UnitDto(entity.UnitId, entity.UnitCode, entity.UnitName, entity.DivisionCode, entity.DivisionId, entity.DivisionName);
     IncomeTax       = new IncomeTaxDto(entity.IncomeTaxId, entity.IncomeTaxName, entity.IncomeTaxRate);
     IncomeTaxBy     = entity.IncomeTaxBy;
     UseIncomeTax    = entity.UseIncomeTax;
     EPOId           = (int)entity.Id;
 }