OrderItem.fromJson constructor
OrderItem.fromJson(
- Map<String, dynamic> json
)
Implementation
OrderItem.fromJson(Map<String, dynamic> json) {
id = json['id'];
description = json['description'];
name = json['name'];
materialCode = json['materialCode'];
currency = json['currency'];
label = json['label'];
quantity = json['quantity'];
initialQuantity = json['initialQuantity'];
productOrderItemType = json['productOrderItemType'];
offerId = json['offerId'];
brand = json['brand'];
discounts = json['discounts'];
taxes = json['taxes'];
adhocTaxes = json['adhocTaxes'];
totalDiscountPercentage = json['totalDiscountPercentage'];
totalTaxPercentage = json['totalTaxPercentage'];
whtPercentage = json['whtPercentage'];
unitPrice = json['unitPrice'] != null
? PriceInfo.fromJson(json['unitPrice'])
: null;
unitPriceWithoutTax = json['unitPriceWithoutTax'] != null
? PriceInfo.fromJson(json['unitPriceWithoutTax'])
: null;
unitDiscount = json['unitDiscount'] != null
? PriceInfo.fromJson(json['unitDiscount'])
: null;
unitTax = json['unitTax'] != null
? PriceInfo.fromJson(json['unitTax'])
: null;
unitWht = json['unitWht'] != null
? PriceInfo.fromJson(json['unitWht'])
: null;
priceWithoutTax = json['priceWithoutTax'] != null
? PriceInfo.fromJson(json['priceWithoutTax'])
: null;
priceWithTax = json['priceWithTax'] != null
? PriceInfo.fromJson(json['priceWithTax'])
: null;
priceWithoutDiscount = json['priceWithoutDiscount'];
priceWithDiscount = json['priceWithDiscount'];
priceWithoutTaxAndDiscount = json['priceWithoutTaxAndDiscount'];
priceWithoutTaxAndWithDiscount = json['priceWithoutTaxAndWithDiscount'] != null
? PriceInfo.fromJson(json['priceWithoutTaxAndWithDiscount'])
: null;
totalWht = json['totalWht'] != null
? PriceInfo.fromJson(json['totalWht'])
: null;
totalTax = json['totalTax'] != null
? PriceInfo.fromJson(json['totalTax'])
: null;
totalDiscount = json['totalDiscount'] != null
? PriceInfo.fromJson(json['totalDiscount'])
: null;
totalDiscountWithoutTax = json['totalDiscountWithoutTax'] != null
? PriceInfo.fromJson(json['totalDiscountWithoutTax'])
: null;
totalPrice = json['totalPrice'] != null
? PriceInfo.fromJson(json['totalPrice'])
: null;
actualPriceWithTax = json['actualPriceWithTax'] != null
? PriceInfo.fromJson(json['actualPriceWithTax'])
: null;
actualPriceWithTaxInLocalCurrency = json['actualPriceWithTaxInLocalCurrency'] != null
? PriceInfo.fromJson(json['actualPriceWithTaxInLocalCurrency'])
: null;
actualPriceWithoutTax = json['actualPriceWithoutTax'] != null
? PriceInfo.fromJson(json['actualPriceWithoutTax'])
: null;
actualPriceWithoutTaxInLocalCurrency = json['actualPriceWithoutTaxInLocalCurrency'] != null
? PriceInfo.fromJson(json['actualPriceWithoutTaxInLocalCurrency'])
: null;
actualPricePerUnitWithTax = json['actualPricePerUnitWithTax'] != null
? PriceInfo.fromJson(json['actualPricePerUnitWithTax'])
: null;
actualPricePerUnitWithTaxInLocalCurrency = json['actualPricePerUnitWithTaxInLocalCurrency'] != null
? PriceInfo.fromJson(json['actualPricePerUnitWithTaxInLocalCurrency'])
: null;
actualPricePerUnitWithoutTax = json['actualPricePerUnitWithoutTax'] != null
? PriceInfo.fromJson(json['actualPricePerUnitWithoutTax'])
: null;
actualPricePerUnitWithoutTaxInLocalCurrency = json['actualPricePerUnitWithoutTaxInLocalCurrency'] != null
? PriceInfo.fromJson(json['actualPricePerUnitWithoutTaxInLocalCurrency'])
: null;
markupPrice = json['markupPrice'] != null
? PriceInfo.fromJson(json['markupPrice'])
: null;
markupDiscountPercentage = json['markupDiscountPercentage'] != null
? PriceInfo.fromJson(json['markupDiscountPercentage'])
: null;
netSalesAfterDiscountPerPiece = json['netSalesAfterDiscountPerPiece'] != null
? PriceInfo.fromJson(json['netSalesAfterDiscountPerPiece'])
: null;
netTaxPerPiece = json['netTaxPerPiece'] != null
? PriceInfo.fromJson(json['netTaxPerPiece'])
: null;
netTaxPerOrderLine = json['netTaxPerOrderLine'] != null
? PriceInfo.fromJson(json['netTaxPerOrderLine'])
: null;
netSalesAfterDiscount = json['netSalesAfterDiscount'] != null
? PriceInfo.fromJson(json['netSalesAfterDiscount'])
: null;
pogId = json['pogId'];
pogName = json['pogName'];
commissionPercentage = json['commissionPercentage'];
totalPriceInLocalCurrency = json['totalPriceInLocalCurrency'] != null
? PriceInfo.fromJson(json['totalPriceInLocalCurrency'])
: null;
totalDiscountInLocalCurrency = json['totalDiscountInLocalCurrency'] != null
? PriceInfo.fromJson(json['totalDiscountInLocalCurrency'])
: null;
totalDiscountPercentageInLocalCurrency = json['totalDiscountPercentageInLocalCurrency'] != null
? PriceInfo.fromJson(json['totalDiscountPercentageInLocalCurrency'])
: null;
unitDiscountInLocalCurrency = json['unitDiscountInLocalCurrency'] != null
? PriceInfo.fromJson(json['unitDiscountInLocalCurrency'])
: null;
unitWhtInLocalCurrency = json['unitWhtInLocalCurrency'] != null
? PriceInfo.fromJson(json['unitWhtInLocalCurrency'])
: null;
commissionAmount = json['commissionAmount'] != null
? PriceInfo.fromJson(json['commissionAmount'])
: null;
commissionRate = json['commissionRate'] != null
? PriceInfo.fromJson(json['commissionRate'])
: null;
commissionAmountInLocalCurrency = json['commissionAmountInLocalCurrency'] != null
? PriceInfo.fromJson(json['commissionAmountInLocalCurrency'])
: null;
priceWithTaxInLocalCurrency = json['priceWithTaxInLocalCurrency'] != null
? PriceInfo.fromJson(json['priceWithTaxInLocalCurrency'])
: null;
imageUrl = json['imageUrl'];
netExcludedWithHeldTax = json['netExcludedWithHeldTax'] != null
? PriceInfo.fromJson(json['netExcludedWithHeldTax'])
: null;
}