toJson method

Map<String, dynamic> toJson()

Implementation

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