SubmitStockOrderData.fromJson constructor

SubmitStockOrderData.fromJson(
  1. Map<String, dynamic> json
)

Implementation

SubmitStockOrderData.fromJson(Map<String, dynamic> json) {
  id = json['id'];
  orderId = json['orderId'];
  saleOrderId = json['saleOrderId'];
  invoiceId = json['invoiceId'];
  orderUpdationId = json['orderUpdationId'];
  paymentTransactionId = json['paymentTransactionId'];
  cartId = json['cartId'];
  saleType = json['saleType'];
  transactionType = json['transactionType'];
  saleDate = json['saleDate'];
  sellerDetails = json['sellerDetails'] != null
      ? SellerDetails.fromJson(json['sellerDetails'])
      : null;
  buyerDetails = json['buyerDetails'] != null
      ? BuyerDetails.fromJson(json['buyerDetails'])
      : null;
  partnerId = json['partnerId'];
  promos = json['promos'];
  saleOrderTpe = json['saleOrderTpe'];
  if (json['orderItems'] != null) {
    orderItems = <OrderItem>[];
    json['orderItems'].forEach((v) {
      orderItems!.add(OrderItem.fromJson(v));
    });
  }
  attachments = json['attachments'];
  approvalTaskIds = json['approvalTaskIds'];
  wHT = json['WHT'] != null ? PriceInfo.fromJson(json['WHT']) : null;
  absoluteTotal = json['absoluteTotal'] != null
      ? PriceInfo.fromJson(json['absoluteTotal'])
      : null;
  totalDiscount = json['totalDiscount'] != null
      ? PriceInfo.fromJson(json['totalDiscount'])
      : null;
  totalTax =
      json['totalTax'] != null ? PriceInfo.fromJson(json['totalTax']) : null;
  totalPriceWithoutWHT = json['totalPriceWithoutWHT'] != null
      ? PriceInfo.fromJson(json['totalPriceWithoutWHT'])
      : null;
  totalWithoutTaxAndDiscount = json['totalWithoutTaxAndDiscount'] != null
      ? PriceInfo.fromJson(json['totalWithoutTaxAndDiscount'])
      : null;
  totalPriceWithoutTaxAndWithDiscount = json['totalPriceWithoutTaxAndWithDiscount'];
  overAllTaxPercentage = json['overAllTaxPercentage'];
  totalPriceWithoutTax = json['totalPriceWithoutTax'] != null
      ? PriceInfo.fromJson(json['totalPriceWithoutTax'])
      : null;
  totalWHT = json['totalWHT'] != null ? PriceInfo.fromJson(json['totalWHT']) : null;
  totalPaymentCollected = json['totalPaymentCollected'] != null
      ? PriceInfo.fromJson(json['totalPaymentCollected'])
      : null;
  orderTotal = json['orderTotal'] != null
      ? PriceInfo.fromJson(json['orderTotal'])
      : null;
  grandTotal = json['grandTotal'] != null
      ? PriceInfo.fromJson(json['grandTotal'])
      : null;
  remarks = json['remarks'];
  poReferenceNo = json['poReferenceNo'];
  totalNetPrice = json['totalNetPrice'] != null
      ? PriceInfo.fromJson(json['totalNetPrice'])
      : null;
  overallSaleTax = json['overallSaleTax'] != null
      ? PriceInfo.fromJson(json['overallSaleTax'])
      : null;
  taxClassification = json['taxClassification'];
  taxClassificationName = json['taxClassificationName'];
  withHeldTaxPercentage = json['withHeldTaxPercentage']?.toDouble();
  salesTaxPercentage = json['salesTaxPercentage']?.toDouble();
  netPriceWithOutTaxAndDiscountWithOutTax = json['netPriceWithOutTaxAndDiscountWithOutTax'];
  totalDiscountPercentage = json['totalDiscountPercentage'] != null
      ? PriceInfo.fromJson(json['totalDiscountPercentage'])
      : null;
  totalNetExcludedWithHeldTax = json['totalNetExcludedWithHeldTax'] != null
      ? PriceInfo.fromJson(json['totalNetExcludedWithHeldTax'])
      : null;
  totalVATableSalesVATAmount = json['totalVATableSalesVATAmount'] != null
      ? PriceInfo.fromJson(json['totalVATableSalesVATAmount'])
      : null;
  totalNetTaxVATableSalesDiscount = json['totalNetTaxVATableSalesDiscount'] != null
      ? PriceInfo.fromJson(json['totalNetTaxVATableSalesDiscount'])
      : null;
  totalConversionRate = json['totalConversionRate'] != null
      ? PriceInfo.fromJson(json['totalConversionRate'])
      : null;
  totalNetTaxVATExemptSalesDiscount = json['totalNetTaxVATExemptSalesDiscount'] != null
      ? PriceInfo.fromJson(json['totalNetTaxVATExemptSalesDiscount'])
      : null;
  totalNetTaxZeroRatedSalesDiscount = json['totalNetTaxZeroRatedSalesDiscount'] != null
      ? PriceInfo.fromJson(json['totalNetTaxZeroRatedSalesDiscount'])
      : null;
  totalZeroRatedSale = json['totalZeroRatedSale'] != null
      ? PriceInfo.fromJson(json['totalZeroRatedSale'])
      : null;
  totalVATExemptSale = json['totalVATExemptSale'] != null
      ? PriceInfo.fromJson(json['totalVATExemptSale'])
      : null;
  totalFixed = json['totalFixed'] != null
      ? PriceInfo.fromJson(json['totalFixed'])
      : null;
  saleTransactionId = json['saleTransactionId'];
  totalInitialPaymentCollected = json['totalInitialPaymentCollected'];
  promoCode = json['promoCode'];
  billingOrShippingAddressId = json['billingOrShippingAddressId'];
  overAllTax = json['overAllTax'] != null
      ? PriceInfo.fromJson(json['overAllTax'])
      : null;
  buyerDetailInfo = json['buyerDetailInfo'] != null
      ? BuyerDetailInfo.fromJson(json['buyerDetailInfo'])
      : null;
  sellerDetailInfo = json['sellerDetailInfo'];
  if (json['modeOfPaymentList'] != null) {
    modeOfPaymentList = <ModeOfPayment>[];
    json['modeOfPaymentList'].forEach((v) {
      modeOfPaymentList!.add(ModeOfPayment.fromJson(v));
    });
  }
  if (json['headerDetailsList'] != null) {
    headerDetailsList = <HeaderDetails>[];
    json['headerDetailsList'].forEach((v) {
      headerDetailsList!.add(HeaderDetails.fromJson(v));
    });
  }
  assetDeliveryDetails = json['assetDeliveryDetails'];
  deliveryOrderId = json['deliveryOrderId'];
  externalInvoiceId = json['externalInvoiceId'];
  subInvoiceId = json['subInvoiceId'];
  totalCommission = json['totalCommission'] != null
      ? PriceInfo.fromJson(json['totalCommission'])
      : null;
  totalNetCommission = json['totalNetCommission'] != null
      ? PriceInfo.fromJson(json['totalNetCommission'])
      : null;
  exchangeRate = json['exchangeRate']?.toDouble();
  whtPercentage = json['whtPercentage'];
  whtBearer = json['whtBearer'];
  invoiceDocType = json['invoiceDocType'];
  totalCommissionWithOutGrossUp = json['totalCommissionWithOutGrossUp'] != null
      ? PriceInfo.fromJson(json['totalCommissionWithOutGrossUp'])
      : null;
  totalNetPriceInLocalCurrency = json['totalNetPriceInLocalCurrency'] != null
      ? PriceInfo.fromJson(json['totalNetPriceInLocalCurrency'])
      : null;
  grandTotalInLocalCurrency = json['grandTotalInLocalCurrency'] != null
      ? PriceInfo.fromJson(json['grandTotalInLocalCurrency'])
      : null;
  shippingMethod = json['shippingMethod'] != null
      ? ShippingMethod.fromJson(json['shippingMethod'])
      : null;
  deliveryType = json['deliveryType'];
  deliveryOption = json['deliveryOption'];
  absoluteTotalInLocalCurrency = json['absoluteTotalInLocalCurrency'] != null
      ? PriceInfo.fromJson(json['absoluteTotalInLocalCurrency'])
      : null;
  totalPriceWithoutWHTInLocalCurrency = json['totalPriceWithoutWHTInLocalCurrency'] != null
      ? PriceInfo.fromJson(json['totalPriceWithoutWHTInLocalCurrency'])
      : null;
  totalDiscountPercentageInLocalCurrency = json['totalDiscountPercentageInLocalCurrency'] != null
      ? PriceInfo.fromJson(json['totalDiscountPercentageInLocalCurrency'])
      : null;
  totalDiscountInLocalCurrency = json['totalDiscountInLocalCurrency'] != null
      ? PriceInfo.fromJson(json['totalDiscountInLocalCurrency'])
      : null;
  totalCommissionInLocalCurrency = json['totalCommissionInLocalCurrency'] != null
      ? PriceInfo.fromJson(json['totalCommissionInLocalCurrency'])
      : null;
  totalNetCommissionInLocalCurrency = json['totalNetCommissionInLocalCurrency'] != null
      ? PriceInfo.fromJson(json['totalNetCommissionInLocalCurrency'])
      : null;
  totalCommissionWithOutGrossUpInLocalCurrency = json['totalCommissionWithOutGrossUpInLocalCurrency'] != null
      ? PriceInfo.fromJson(json['totalCommissionWithOutGrossUpInLocalCurrency'])
      : null;
  deliveryCharge = json['deliveryCharge'] != null
      ? PriceInfo.fromJson(json['deliveryCharge'])
      : null;
  deliveryChargeInLocalCurrency = json['deliveryChargeInLocalCurrency'] != null
      ? PriceInfo.fromJson(json['deliveryChargeInLocalCurrency'])
      : null;
  totalWHTInLocalCurrency = json['totalWHTInLocalCurrency'] != null
      ? PriceInfo.fromJson(json['totalWHTInLocalCurrency'])
      : null;
  deliveryChargeWithOutTax = json['deliveryChargeWithOutTax'];
  wht = json['wht'] != null ? PriceInfo.fromJson(json['wht']) : null;
}