update carton filter and merge api for shipment
This commit is contained in:
@@ -87,7 +87,7 @@ class FcsShipmentModel extends BaseModel {
|
||||
try {
|
||||
var snaps = await FirebaseFirestore.instance
|
||||
.collection("/$fcs_shipment_collection")
|
||||
// .where("status", isEqualTo: fcs_shipment_confirmed_status)
|
||||
.where("status", isEqualTo: fcs_shipment_processing_status)
|
||||
.get(const GetOptions(source: Source.server));
|
||||
fcsShipments = snaps.docs.map((documentSnapshot) {
|
||||
var fcs =
|
||||
@@ -199,12 +199,20 @@ class FcsShipmentModel extends BaseModel {
|
||||
return Services.instance.fcsShipmentService.report(fcsShipment);
|
||||
}
|
||||
|
||||
Future<List<FcsShipment>> getAllShipments() async {
|
||||
Future<List<FcsShipment>> getShipments() async {
|
||||
List<FcsShipment> fcsShipments = [];
|
||||
try {
|
||||
var snaps = await FirebaseFirestore.instance
|
||||
.collection("/$fcs_shipment_collection")
|
||||
.where("status", whereIn: [
|
||||
fcs_shipment_processing_status,
|
||||
fcs_shipment_shipped_status,
|
||||
fcs_shipment_arrived_status,
|
||||
fcs_shipment_invoiced_status
|
||||
])
|
||||
.where("is_deleted", isEqualTo: false)
|
||||
.orderBy("update_time", descending: true)
|
||||
.limit(shipmentCountForCartonFilter)
|
||||
.get(const GetOptions(source: Source.server));
|
||||
fcsShipments = snaps.docs.map((documentSnapshot) {
|
||||
var fcs =
|
||||
|
||||
Reference in New Issue
Block a user