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,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 =