fix homepage news, invoice
This commit is contained in:
@@ -87,6 +87,7 @@ class BuyerInfoModel {
|
||||
final String? wardCode;
|
||||
final String? cityName;
|
||||
final String? wardName;
|
||||
final String? customerName;
|
||||
|
||||
const BuyerInfoModel({
|
||||
this.name,
|
||||
@@ -100,6 +101,7 @@ class BuyerInfoModel {
|
||||
this.wardCode,
|
||||
this.cityName,
|
||||
this.wardName,
|
||||
this.customerName,
|
||||
});
|
||||
|
||||
factory BuyerInfoModel.fromJson(Map<String, dynamic> json) {
|
||||
@@ -115,6 +117,7 @@ class BuyerInfoModel {
|
||||
wardCode: json['ward_code'] as String?,
|
||||
cityName: json['city_name'] as String?,
|
||||
wardName: json['ward_name'] as String?,
|
||||
customerName: json['customer_name'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -130,6 +133,7 @@ class BuyerInfoModel {
|
||||
'ward_code': wardCode,
|
||||
'city_name': cityName,
|
||||
'ward_name': wardName,
|
||||
'customer_name': customerName,
|
||||
};
|
||||
|
||||
BuyerInfo toEntity() => BuyerInfo(
|
||||
@@ -144,6 +148,7 @@ class BuyerInfoModel {
|
||||
wardCode: wardCode,
|
||||
cityName: cityName,
|
||||
wardName: wardName,
|
||||
customerName: customerName,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,6 +75,7 @@ class BuyerInfo extends Equatable {
|
||||
final String? wardCode;
|
||||
final String? cityName;
|
||||
final String? wardName;
|
||||
final String? customerName;
|
||||
|
||||
const BuyerInfo({
|
||||
this.name,
|
||||
@@ -88,6 +89,7 @@ class BuyerInfo extends Equatable {
|
||||
this.wardCode,
|
||||
this.cityName,
|
||||
this.wardName,
|
||||
this.customerName
|
||||
});
|
||||
|
||||
/// Get formatted full address
|
||||
@@ -118,6 +120,7 @@ class BuyerInfo extends Equatable {
|
||||
wardCode,
|
||||
cityName,
|
||||
wardName,
|
||||
customerName
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -294,10 +294,10 @@ class InvoiceDetailPage extends ConsumerWidget {
|
||||
|
||||
List<_InfoLine> _buildBuyerInfoLines(Invoice invoice) {
|
||||
return [
|
||||
if (invoice.buyerInfo!.name != null)
|
||||
_InfoLine(label: 'Người mua hàng', value: invoice.buyerInfo!.name!),
|
||||
if (invoice.customerName != null)
|
||||
_InfoLine(label: 'Tên đơn vị', value: invoice.customerName!),
|
||||
if (invoice.buyerInfo!.customerName != null)
|
||||
_InfoLine(label: 'Người mua hàng', value: invoice.buyerInfo!.customerName!),
|
||||
if (invoice.buyerInfo!.addressTitle != null)
|
||||
_InfoLine(label: 'Tên đơn vị', value: invoice.buyerInfo!.addressTitle!),
|
||||
if (invoice.buyerInfo!.taxCode != null)
|
||||
_InfoLine(label: 'Mã số thuế', value: invoice.buyerInfo!.taxCode!),
|
||||
if (invoice.buyerInfo!.fullAddress.isNotEmpty)
|
||||
|
||||
Reference in New Issue
Block a user