This commit is contained in:
PhyoThandar
2020-10-16 13:46:02 +06:30
parent ff12b2c24b
commit 0e9e3da0c4
7 changed files with 154 additions and 21 deletions

View File

@@ -108,6 +108,7 @@ class _CustomEditorState extends State<CustomEditor> {
CustomDuty _customduty = CustomDuty(
productType: _productController.text,
fee: double.parse(_feeController.text));
print('_customduty => $_customduty');
if (_isNew) {
await shipmentRateModel.addCustomDuty(_customduty);
} else {
@@ -125,8 +126,7 @@ class _CustomEditorState extends State<CustomEditor> {
}
_delete() {
showConfirmDialog(
context, "cargo.edit.delete.confirm", _deleteCustomDuty);
showConfirmDialog(context, "cargo.edit.delete.confirm", _deleteCustomDuty);
}
_deleteCustomDuty() async {

View File

@@ -307,10 +307,12 @@ class _ShipmentRatesEditState extends State<ShipmentRatesEdit> {
try {
var shipmentRateModel =
Provider.of<ShipmentRateModel>(context, listen: false);
Rate _rate = Rate(
Rate _rate = new Rate(
deliveryFee: double.parse(_deliveryFee.text),
freeDeliveryWeight: double.parse(_minWeight.text),
volumetricRatio: double.parse(_volumetricRatio.text));
Rate r = new Rate();
print('_rate =>$r');
await shipmentRateModel.updateRate(_rate);
Navigator.pop(context);
} catch (e) {