print on sales
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:enaklo_pos/data/models/response/product_response_model.dart';
|
||||
import 'package:enaklo_pos/presentation/home/models/product_quantity.dart';
|
||||
|
||||
class OrderDetailResponseModel {
|
||||
final bool? success;
|
||||
final Order? data;
|
||||
@@ -380,3 +383,21 @@ class Payment {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
extension OrderItemListExtension on List<OrderItem> {
|
||||
List<ProductQuantity> toProductQuantities() => map((e) => ProductQuantity(
|
||||
product: Product(
|
||||
id: e.productId,
|
||||
name: e.productName,
|
||||
price: e.unitPrice,
|
||||
printerType: e.printerType,
|
||||
),
|
||||
variant: ProductVariant(
|
||||
id: e.productVariantId,
|
||||
name: e.productVariantName,
|
||||
productId: e.productId,
|
||||
),
|
||||
notes: e.notes ?? '',
|
||||
quantity: e.quantity ?? 0,
|
||||
)).toList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user