totalOrderAmountDetails property

dynamic totalOrderAmountDetails

Implementation

get totalOrderAmountDetails {
  OrderWithFees oo = new OrderWithFees();
  double value = (double.parse(this.amount as String));
  double covinenceFeesWithAdditionalValue = ((double.parse(
              this.amount as String) *
          (double.parse(oo.convinenceFeesValueDetails.percentage) / 100)) +
      double.parse(oo.convinenceFeesValueDetails.additiveAdditionalAmount));
  double gstAmount = covinenceFeesWithAdditionalValue *
      (double.parse(oo.gstPercent as String) / 100);
  double total = value + covinenceFeesWithAdditionalValue + gstAmount;
  oo.orderWithConvinenceFees = total.toStringAsFixed(2);
  oo.totalConvinenceFees =
      (covinenceFeesWithAdditionalValue + gstAmount).toStringAsFixed(2);
  oo.convinenceFees = covinenceFeesWithAdditionalValue.toStringAsFixed(2);
  oo.gstFees = gstAmount.toStringAsFixed(2);
  return oo;
}