perbaikan on possale string 1
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import 'package:barcode_widget/barcode_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_long_screenshot/flutter_long_screenshot.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
@@ -13,7 +11,6 @@ import 'package:provider/provider.dart' as pro;
|
||||
|
||||
import '../../GlobalComponents/glonal_popup.dart';
|
||||
import '../../constant.dart' as mainConstant;
|
||||
import '../../constant.dart';
|
||||
import '../../currency.dart';
|
||||
import '../../model/business_info_model.dart' as binfo;
|
||||
import '../../thermal priting invoices/model/print_transaction_model.dart';
|
||||
@@ -185,7 +182,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
Text(
|
||||
'${widget.businessInfo.data?.companyName}',
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
@@ -198,13 +195,13 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
TextSpan(
|
||||
text: widget.transitionModel.branch?.name.toString() ?? 'n/a',
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -214,7 +211,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
Text(
|
||||
'${_lang.address}: ${widget.businessInfo.data?.address ?? ''}',
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -223,7 +220,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
Text(
|
||||
'${_lang.mobile} ${(widget.transitionModel.branch?.phone?.isNotEmpty ?? false) ? widget.transitionModel.branch?.phone ?? 'n/a' : widget.businessInfo.data?.phoneNumber?.toString() ?? 'n/a'}',
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -232,7 +229,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
Text(
|
||||
'${_lang.email}: ${widget.businessInfo.data?.user?.email ?? ''}',
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
@@ -341,12 +338,12 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
TextSpan(
|
||||
text: widget.transitionModel.invoiceNumber ?? '',
|
||||
style: _theme.textTheme.titleSmall?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontWeight: FontWeight.w500,
|
||||
))
|
||||
],
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
)),
|
||||
),
|
||||
@@ -358,11 +355,11 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
TextSpan(
|
||||
text: widget.transitionModel.party?.name ?? '',
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor))
|
||||
],
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -375,13 +372,13 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
TextSpan(
|
||||
text: widget.transitionModel.party?.phone,
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -398,7 +395,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
),
|
||||
],
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -415,7 +412,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
)
|
||||
],
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -432,7 +429,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
)
|
||||
],
|
||||
style: _theme.textTheme.titleSmall?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
@@ -450,7 +447,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
)
|
||||
],
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -478,7 +475,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
),
|
||||
],
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -495,7 +492,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
)
|
||||
],
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -512,7 +509,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
)
|
||||
],
|
||||
style: _theme.textTheme.titleSmall?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
@@ -530,7 +527,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
)
|
||||
],
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -561,7 +558,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
textAlign: TextAlign.start,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -573,7 +570,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
textAlign: TextAlign.start,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -585,7 +582,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
textAlign: TextAlign.center,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -598,7 +595,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
textAlign: TextAlign.center,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -611,7 +608,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
textAlign: TextAlign.end,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -636,7 +633,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
(i + 1).toString(),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
@@ -651,7 +648,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
'${detail.product?.productName ?? ''}${detail.product?.productType == ProductType.variant.name ? ' [${detail.stock?.batchNo ?? ''}]' : ''}',
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
@@ -678,7 +675,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
quantity.toString(),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
@@ -687,10 +684,10 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: Text(
|
||||
'$currency $unitPrice',
|
||||
'$currency${mainConstant.formatWithSeparator(unitPrice)}',
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
// '$currency${formatPointNumber(saleDetail.price)}',
|
||||
textAlign: TextAlign.center,
|
||||
@@ -700,10 +697,10 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: Text(
|
||||
'$currency $totalPrice',
|
||||
'$currency${mainConstant.formatWithSeparator(totalPrice)}',
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
@@ -722,13 +719,13 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
text: '${lang.S.of(context).subTotal} : ',
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '$currency ${mainConstant.formatPointNumber(getTotalForOldInvoice())}',
|
||||
text: '$currency${mainConstant.formatWithSeparator(getTotalForOldInvoice())}',
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -743,13 +740,13 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
'$currency ${mainConstant.formatPointNumber((widget.transitionModel.discountAmount ?? 0) + getReturndDiscountAmount())}',
|
||||
'$currency${mainConstant.formatWithSeparator((widget.transitionModel.discountAmount ?? 0) + getReturndDiscountAmount())}',
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -764,13 +761,13 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
'$currency ${mainConstant.formatPointNumber((widget.transitionModel.vatAmount ?? 0))}',
|
||||
'$currency${mainConstant.formatWithSeparator((widget.transitionModel.vatAmount ?? 0))}',
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -786,13 +783,13 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
'$currency ${mainConstant.formatPointNumber(widget.transitionModel.shippingCharge ?? 0)}',
|
||||
'$currency${mainConstant.formatWithSeparator(widget.transitionModel.shippingCharge ?? 0)}',
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -807,13 +804,13 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
'$currency ${mainConstant.formatPointNumber((widget.transitionModel.totalAmount ?? 0) + getTotalReturndAmount())}',
|
||||
'$currency${mainConstant.formatWithSeparator((widget.transitionModel.totalAmount ?? 0) + getTotalReturndAmount())}',
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -835,7 +832,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
textAlign: TextAlign.start,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -847,7 +844,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
textAlign: TextAlign.center,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -859,7 +856,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
textAlign: TextAlign.start,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -871,7 +868,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
textAlign: TextAlign.center,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -883,7 +880,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
textAlign: TextAlign.end,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -907,7 +904,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
(serialNumber++).toString(),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
@@ -922,7 +919,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
textAlign: TextAlign.start,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -935,7 +932,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
textAlign: TextAlign.start,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -950,18 +947,18 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
textAlign: TextAlign.center,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text(
|
||||
'$currency ${(widget.transitionModel.purchaseReturns?[i].purchaseReturnDetails?[detailIndex].returnAmount ?? 0)}',
|
||||
'$currency${mainConstant.formatWithSeparator(widget.transitionModel.purchaseReturns?[i].purchaseReturnDetails?[detailIndex].returnAmount ?? 0)}',
|
||||
textAlign: TextAlign.end,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -981,13 +978,13 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
text: '${lang.S.of(context).totalReturnAmount} : ',
|
||||
children: [
|
||||
TextSpan(
|
||||
text: '$currency ${getTotalReturndAmount()}',
|
||||
text: '$currency${mainConstant.formatWithSeparator(getTotalReturndAmount())}',
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1002,13 +999,13 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
'$currency ${mainConstant.formatPointNumber(widget.transitionModel.totalAmount ?? 0)}',
|
||||
'$currency${mainConstant.formatWithSeparator(widget.transitionModel.totalAmount ?? 0)}',
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1023,13 +1020,13 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
'$currency ${mainConstant.formatPointNumber(((widget.transitionModel.totalAmount ?? 0) - (widget.transitionModel.dueAmount ?? 0)) + (widget.transitionModel.changeAmount ?? 0))}',
|
||||
'$currency${mainConstant.formatWithSeparator(((widget.transitionModel.totalAmount ?? 0) - (widget.transitionModel.dueAmount ?? 0)) + (widget.transitionModel.changeAmount ?? 0))}',
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1046,13 +1043,13 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
'$currency ${mainConstant.formatPointNumber(widget.transitionModel.dueAmount ?? 0)}',
|
||||
'$currency${mainConstant.formatWithSeparator(widget.transitionModel.dueAmount ?? 0)}',
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1070,13 +1067,13 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
'$currency${mainConstant.formatPointNumber(widget.transitionModel.changeAmount ?? 0)}',
|
||||
'$currency${mainConstant.formatWithSeparator(widget.transitionModel.changeAmount ?? 0)}',
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1091,7 +1088,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
'${_lang.paidVia} :',
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
...?(widget.transitionModel.transactions?.asMap().entries.map((entry) {
|
||||
@@ -1123,7 +1120,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
text,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
);
|
||||
}).toList()),
|
||||
@@ -1135,7 +1132,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
'${widget.businessInfo.data?.invoiceNoteLevel ?? ''}: ${widget.businessInfo.data?.invoiceNote ?? ''}',
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
@@ -1147,7 +1144,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
maxLines: 3,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
@@ -1170,7 +1167,7 @@ class _PurchaseInvoiceDetailsState extends State<PurchaseInvoiceDetails> {
|
||||
'${widget.businessInfo.data?.developByLevel ?? ''} ${widget.businessInfo.data?.developBy ?? ''}',
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user