POS Grosir Dutra Store: update kasir/produk/riwayat/pengaturan + offline queue
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
class Product {
|
||||
final String id;
|
||||
final String name;
|
||||
@@ -19,6 +21,17 @@ class Product {
|
||||
this.hargaPokok = 0,
|
||||
});
|
||||
|
||||
factory Product.manual(String name, double price) {
|
||||
return Product(
|
||||
id: 'manual-${const Uuid().v4()}',
|
||||
name: name,
|
||||
price: price,
|
||||
stock: 99999,
|
||||
minStock: 0,
|
||||
hargaPokok: 0,
|
||||
);
|
||||
}
|
||||
|
||||
factory Product.fromJson(Map<String, dynamic> json) {
|
||||
return Product(
|
||||
id: json['id'] as String,
|
||||
|
||||
Reference in New Issue
Block a user