update struk
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user