update carton and fcs shipment

This commit is contained in:
tzw
2025-02-17 20:13:30 +06:30
parent ffaa715333
commit 0295a29c44
33 changed files with 171 additions and 2383 deletions

View File

@@ -22,7 +22,6 @@ import 'package:fcs/pages/main/util.dart';
import 'package:fcs/pages/payment_methods/model/payment_method_model.dart';
import 'package:fcs/pages/rates/custom_list.dart';
import 'package:fcs/pages/rates/model/shipment_rate_model.dart';
import 'package:fcs/pages/shipment/model/shipment_model.dart';
import 'package:fcs/pages/widgets/display_text.dart';
import 'package:fcs/pages/widgets/fcs_icons.dart';
import 'package:fcs/pages/widgets/local_app_bar.dart';
@@ -104,8 +103,8 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
}
_loadShipments() async {
ShipmentModel shipmentModel =
Provider.of<ShipmentModel>(context, listen: false);
InvoiceModel shipmentModel =
Provider.of<InvoiceModel>(context, listen: false);
List<Shipment?>? shipments = await shipmentModel.getShipmentWithHandlingFee(
widget.fcsShipment!.id!, widget.customer!.id!);
shipments!.forEach((s) {
@@ -361,14 +360,6 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
);
}
_addCustom(CustomDuty customDuty) {
if (customDuty == null) return;
setState(() {
_invoice!.customDuties.remove(customDuty);
_invoice!.customDuties.add(customDuty);
});
}
_addShipment(Shipment shipment) {
if (shipment == null) return;
shipment.isSelected = true;