add invoice pdf

This commit is contained in:
Sai Naw Wun
2020-10-26 04:41:24 +06:30
parent feec3c8687
commit 2786acfd08
33 changed files with 787 additions and 1114 deletions

View File

@@ -162,6 +162,18 @@ class _CartonEditorState extends State<CartonEditor> {
});
}
_loadMixCartons() async {
if (_fcsShipment == null || _fcsShipment.id == null) return;
if (_selectedCartonType != carton_small_bag) return;
CartonModel cartonModel = Provider.of<CartonModel>(context, listen: false);
List<Carton> cartons =
await cartonModel.getMixCartonsByFcsShipment(_fcsShipment.id);
setState(() {
_mixCartons = cartons;
});
}
_calShipmentWeight() {
double l = double.parse(_lengthController.text, (s) => 0);
double w = double.parse(_widthController.text, (s) => 0);
@@ -196,6 +208,7 @@ class _CartonEditorState extends State<CartonEditor> {
setState(() {
_fcsShipment = v;
});
_loadMixCartons();
},
labelKey: "shipment.pack.fcs.shipment",
iconData: Ionicons.ios_airplane,
@@ -291,7 +304,6 @@ class _CartonEditorState extends State<CartonEditor> {
values: boxModel.cartonTypes,
selectedValue: _selectedCartonType,
callback: (v) {
print(v);
setState(() {
_selectedCartonType = v;
});