update struk

This commit is contained in:
2026-02-09 23:56:18 +07:00
parent d144d24596
commit 34ee0c3c01
4 changed files with 85 additions and 42 deletions

View File

@@ -260,6 +260,7 @@ class SalesProduct {
this.productPurchasePrice,
this.productCode,
this.productType,
this.vat,
});
SalesProduct.fromJson(dynamic json) {
@@ -270,6 +271,7 @@ class SalesProduct {
productType = json['product_type'];
productPurchasePrice = json['productPurchasePrice'];
category = json['category'] != null ? Category.fromJson(json['category']) : null;
vat = json['vat'] != null ? SalesVat.fromJson(json['vat']) : null;
}
num? id;
@@ -279,6 +281,7 @@ class SalesProduct {
num? productPurchasePrice;
String? productType;
Category? category;
SalesVat? vat;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
@@ -288,6 +291,9 @@ class SalesProduct {
if (category != null) {
map['category'] = category?.toJson();
}
if (vat != null) {
map['vat'] = vat?.toJson();
}
return map;
}
}
@@ -507,6 +513,14 @@ class SalesVat {
num? id;
String? name;
num? rate;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = id;
map['name'] = name;
map['rate'] = rate;
return map;
}
}
class Branch {