add update shipments

This commit is contained in:
Sai Naw Wun
2020-10-18 02:38:46 +06:30
parent fa9738f307
commit 4f8bde40b0
37 changed files with 596 additions and 455 deletions

View File

@@ -1,12 +1,5 @@
import 'package:fcs/domain/entities/cargo_type.dart';
import 'package:fcs/domain/entities/custom_duty.dart';
import 'package:fcs/domain/vo/delivery_address.dart';
import 'package:fcs/helpers/theme.dart';
import 'package:fcs/pages/box/cargo_type_editor.dart';
import 'package:fcs/pages/delivery_address/delivery_address_editor.dart';
import 'package:fcs/pages/main/util.dart';
import 'package:fcs/pages/rates/custom_editor.dart';
import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
import 'package:fcs/pages/widgets/local_text.dart';
import 'package:fcs/pages/widgets/progress.dart';
import 'package:flutter/cupertino.dart';
@@ -14,7 +7,6 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'cargo_editor.dart';
import 'custom_row.dart';
import 'model/shipment_rate_model.dart';
class CargoTypeList extends StatefulWidget {

View File

@@ -1,4 +1,4 @@
import 'package:fcs/domain/entities/box.dart';
import 'package:fcs/domain/entities/carton.dart';
import 'package:fcs/domain/entities/cargo_type.dart';
import 'package:fcs/domain/entities/rate.dart';
import 'package:fcs/helpers/theme.dart';
@@ -56,7 +56,8 @@ class _ShipmentRatesCalState extends State<ShipmentRatesCal> {
double w = double.parse(_widthController.text, (s) => 0);
double h = double.parse(_heightController.text, (s) => 0);
_cargoType.weight = double.tryParse(_actualWeightCtl.text) ?? 0;
Box box = Box(cargoTypes: [_cargoType], length: l, width: w, height: h);
Carton box =
Carton(cargoTypes: [_cargoType], length: l, width: w, height: h);
var amount = box.calAmount(rate);
var shipmentWeight = box.getShipmentWeight(rate.volumetricRatio);
var effectiveWeight =