This commit is contained in:
@@ -206,11 +206,14 @@ namespace Sockeye.Biz
|
||||
var product = await ct.Product.AsNoTracking().FirstOrDefaultAsync(z => z.VendorCode == SalesItemProductVendorCode) ?? throw new System.ArgumentOutOfRangeException($"Vendor product code:{SalesItemProductVendorCode} was not found in Sockeye Products, record not processed");
|
||||
p.ProductId = product.Id;
|
||||
p.PGroup = product.PGroup;
|
||||
p.Currency = jPurchase["accounting"]["currency"].Value<string>();
|
||||
p.ProductNet = jPurchase["accounting"]["product_net"].Value<decimal>();
|
||||
p.Discount = jPurchase["accounting"]["discount"].Value<decimal>();
|
||||
p.VendorFee = jPurchase["accounting"]["margin_net"].Value<decimal>();
|
||||
p.Revenue = jPurchase["accounting"]["your_revenue"].Value<decimal>();
|
||||
if (jPurchase["accounting"] != null)
|
||||
{
|
||||
p.Currency = jPurchase["accounting"]["currency"].Value<string>();
|
||||
p.ProductNet = jPurchase["accounting"]["product_net"].Value<decimal>();
|
||||
p.Discount = jPurchase["accounting"]["discount"].Value<decimal>();
|
||||
p.VendorFee = jPurchase["accounting"]["margin_net"].Value<decimal>();
|
||||
p.Revenue = jPurchase["accounting"]["your_revenue"].Value<decimal>();
|
||||
}
|
||||
p.CouponCode = "UNKNOWN WHERE IN VENDOR DATA CONTAINS COUPON CODE";
|
||||
p.Quantity = jPurchase["quantity"].Value<int>();
|
||||
p.VendorNotificationId = vn.Id;
|
||||
|
||||
Reference in New Issue
Block a user