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),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
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/flutter_svg.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:mobile_pos/PDF%20Invoice/universal_image_widget.dart';
|
||||
import 'package:mobile_pos/Const/api_config.dart';
|
||||
import 'package:mobile_pos/Provider/profile_provider.dart';
|
||||
import 'package:mobile_pos/Screens/invoice_details/components/common_image_builder.dart';
|
||||
import 'package:mobile_pos/generated/l10n.dart' as lang;
|
||||
@@ -12,10 +10,9 @@ import 'package:nb_utils/nb_utils.dart';
|
||||
import 'package:provider/provider.dart' as pro;
|
||||
import 'package:screenshot/screenshot.dart';
|
||||
|
||||
import '../../Const/api_config.dart';
|
||||
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 '../../model/sale_transaction_model.dart';
|
||||
import '../../thermal priting invoices/model/print_transaction_model.dart';
|
||||
@@ -29,12 +26,8 @@ import '../Home/home.dart';
|
||||
|
||||
/// Format a number as Indonesian Rupiah for display only.
|
||||
/// Example: 12500.75 → "Rp 12.500"
|
||||
String _formatRupiah(num value) {
|
||||
final intStr = value.round().toString().replaceAllMapped(
|
||||
RegExp(r'(\d)(?=(\d{3})+(?!\d))'),
|
||||
(m) => '${m[1]}.',
|
||||
);
|
||||
return 'Rp $intStr';
|
||||
String _formatWithCurrency(num value) {
|
||||
return '$currency${mainConstant.formatWithSeparator(value)}';
|
||||
}
|
||||
|
||||
class SalesInvoiceDetails extends StatefulWidget {
|
||||
@@ -204,7 +197,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
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,
|
||||
),
|
||||
),
|
||||
@@ -217,13 +210,13 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
TextSpan(
|
||||
text: widget.saleTransaction.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,
|
||||
),
|
||||
),
|
||||
@@ -233,7 +226,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
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,
|
||||
),
|
||||
),
|
||||
@@ -242,7 +235,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
Text(
|
||||
'${_lang.mobile} ${(widget.saleTransaction.branch?.phone?.isNotEmpty ?? false) ? widget.saleTransaction.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,
|
||||
),
|
||||
),
|
||||
@@ -251,7 +244,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
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,
|
||||
@@ -284,12 +277,12 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
TextSpan(
|
||||
text: widget.saleTransaction.invoiceNumber ?? '',
|
||||
style: _theme.textTheme.bodyMedium?.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,
|
||||
)),
|
||||
),
|
||||
@@ -303,7 +296,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
)
|
||||
],
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -319,7 +312,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
),
|
||||
],
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -336,7 +329,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
),
|
||||
],
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -353,7 +346,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
)
|
||||
],
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -368,7 +361,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
)
|
||||
],
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
@@ -386,7 +379,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
)
|
||||
],
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -414,7 +407,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
),
|
||||
],
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -431,7 +424,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
)
|
||||
],
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -446,7 +439,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
)
|
||||
],
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
@@ -464,7 +457,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
)
|
||||
],
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
color: mainConstant.kTextColor,
|
||||
),
|
||||
),
|
||||
@@ -495,7 +488,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
textAlign: TextAlign.start,
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -507,7 +500,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
textAlign: TextAlign.start,
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -519,7 +512,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
textAlign: TextAlign.center,
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -531,7 +524,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
textAlign: TextAlign.center,
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -544,7 +537,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
// textAlign: TextAlign.center,
|
||||
// style: _theme.textTheme.titleLarge?.copyWith(
|
||||
// fontWeight: FontWeight.w500,
|
||||
// fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
// fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
@@ -556,7 +549,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
textAlign: TextAlign.end,
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -581,7 +574,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
(widget.saleTransaction.salesDetails!.indexOf(saleDetail) + 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,
|
||||
),
|
||||
@@ -596,7 +589,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
saleDetail.product?.productName ?? '',
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
@@ -606,7 +599,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
'${_lang.warranty} : ${saleDetail.warrantyInfo?.warrantyDuration} ${saleDetail.warrantyInfo?.warrantyUnit}',
|
||||
style: _theme.textTheme.bodySmall?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize) - 6,
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize) - 6,
|
||||
),
|
||||
),
|
||||
if (saleDetail.warrantyInfo?.guaranteeDuration != null &&
|
||||
@@ -615,7 +608,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
'${_lang.guarantee} : ${saleDetail.warrantyInfo?.guaranteeDuration} ${saleDetail.warrantyInfo?.guaranteeUnit}',
|
||||
style: _theme.textTheme.bodySmall?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize) - 6,
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize) - 6,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -654,7 +647,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
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,
|
||||
),
|
||||
@@ -663,11 +656,11 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text(
|
||||
_formatRupiah(saleDetail.discount ?? 0),
|
||||
_formatWithCurrency(saleDetail.discount ?? 0),
|
||||
textAlign: TextAlign.center,
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -678,7 +671,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
// '$currency${mainConstant.formatPointNumber(saleDetail.price ?? 0, addComma: true)}',
|
||||
// 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,
|
||||
@@ -687,10 +680,10 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Text(
|
||||
_formatRupiah(totalPrice),
|
||||
_formatWithCurrency(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,
|
||||
),
|
||||
@@ -711,13 +704,13 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
text: '${lang.S.of(context).subTotal} : ',
|
||||
children: [
|
||||
TextSpan(
|
||||
text: _formatRupiah(getTotalForOldInvoice()),
|
||||
text: _formatWithCurrency(getTotalForOldInvoice()),
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -731,11 +724,11 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
text: '${lang.S.of(context).discount} : ',
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: _formatRupiah(
|
||||
text: _formatWithCurrency(
|
||||
(widget.saleTransaction.discountAmount ?? 0) +
|
||||
getReturndDiscountAmount() +
|
||||
getTotalItemDiscount(),
|
||||
@@ -745,7 +738,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -759,17 +752,17 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
text: '${widget.saleTransaction.vat?.name ?? lang.S.of(context).vat} : ',
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: _formatRupiah(widget.saleTransaction.vatAmount ?? 0),
|
||||
text: _formatWithCurrency(widget.saleTransaction.vatAmount ?? 0),
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -783,17 +776,17 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
text: '${lang.S.of(context).shippingCharge} : ',
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: _formatRupiah(widget.saleTransaction.shippingCharge ?? 0),
|
||||
text: _formatWithCurrency(widget.saleTransaction.shippingCharge ?? 0),
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -812,17 +805,17 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
text: '${_lang.total} :',
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: _formatRupiah(widget.saleTransaction.actualTotalAmount ?? 0),
|
||||
text: _formatWithCurrency(widget.saleTransaction.actualTotalAmount ?? 0),
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -836,18 +829,18 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
text: '${_lang.rounding} : ',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
children: [
|
||||
TextSpan(
|
||||
text:
|
||||
'${!(widget.saleTransaction.roundingAmount?.isNegative ?? true) ? '+' : ''}${_formatRupiah(widget.saleTransaction.roundingAmount ?? 0)}',
|
||||
'${!(widget.saleTransaction.roundingAmount?.isNegative ?? true) ? '+' : ''}${_formatWithCurrency(widget.saleTransaction.roundingAmount ?? 0)}',
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -864,13 +857,13 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
text: '${lang.S.of(context).totalAmount} : ',
|
||||
children: [
|
||||
TextSpan(
|
||||
text: _formatRupiah(getTotalReturndAmount() + (widget.saleTransaction.totalAmount ?? 0)),
|
||||
text: _formatWithCurrency(getTotalReturndAmount() + (widget.saleTransaction.totalAmount ?? 0)),
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -891,7 +884,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
textAlign: TextAlign.start,
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -903,7 +896,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
textAlign: TextAlign.start,
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -915,7 +908,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
textAlign: TextAlign.start,
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -927,7 +920,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
textAlign: TextAlign.center,
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -939,7 +932,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
textAlign: TextAlign.end,
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -963,7 +956,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
textAlign: TextAlign.start,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -977,7 +970,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
textAlign: TextAlign.start,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -992,7 +985,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
textAlign: TextAlign.start,
|
||||
style: _theme.textTheme.bodyLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
// if (hasWarranty)
|
||||
@@ -1022,18 +1015,18 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
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(
|
||||
_formatRupiah(widget.saleTransaction.salesReturns?[i].salesReturnDetails?[detailIndex].returnAmount ?? 0),
|
||||
_formatWithCurrency(widget.saleTransaction.salesReturns?[i].salesReturnDetails?[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),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1054,13 +1047,13 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
text: '${lang.S.of(context).totalReturnAmount} : ',
|
||||
children: [
|
||||
TextSpan(
|
||||
text: _formatRupiah(getTotalReturndAmount()),
|
||||
text: _formatWithCurrency(getTotalReturndAmount()),
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1075,13 +1068,13 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: _formatRupiah(widget.saleTransaction.totalAmount ?? 0),
|
||||
text: _formatWithCurrency(widget.saleTransaction.totalAmount ?? 0),
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1095,7 +1088,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
text: '${lang.S.of(context).receivedAmount} : ',
|
||||
children: [
|
||||
TextSpan(
|
||||
text: _formatRupiah(
|
||||
text: _formatWithCurrency(
|
||||
((widget.saleTransaction.totalAmount ?? 0) -
|
||||
(widget.saleTransaction.dueAmount ?? 0)) +
|
||||
(widget.saleTransaction.changeAmount ?? 0),
|
||||
@@ -1105,7 +1098,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
),
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1121,13 +1114,13 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
text: '${lang.S.of(context).due} : ',
|
||||
children: [
|
||||
TextSpan(
|
||||
text: _formatRupiah(widget.saleTransaction.dueAmount ?? 0),
|
||||
text: _formatWithCurrency(widget.saleTransaction.dueAmount ?? 0),
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1143,12 +1136,12 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
text: '${_lang.changeAmount} : ',
|
||||
children: [
|
||||
TextSpan(
|
||||
text: _formatRupiah(widget.saleTransaction.changeAmount ?? 0),
|
||||
text: _formatWithCurrency(widget.saleTransaction.changeAmount ?? 0),
|
||||
),
|
||||
],
|
||||
),
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1163,7 +1156,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
Text(
|
||||
'${_lang.paidVia} :',
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
@@ -1195,7 +1188,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
return Text(
|
||||
text,
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
);
|
||||
@@ -1211,7 +1204,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
Text(
|
||||
_lang.attachment,
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
@@ -1236,7 +1229,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
Text(
|
||||
'${widget.businessInfo.data?.invoiceNoteLevel ?? ''}: ${widget.businessInfo.data?.invoiceNote ?? ''}',
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
@@ -1249,7 +1242,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
maxLines: 3,
|
||||
style: _theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
@@ -1273,7 +1266,7 @@ class _SalesInvoiceDetailsState extends State<SalesInvoiceDetails> {
|
||||
child: Text(
|
||||
'${widget.businessInfo.data?.developByLevel ?? ''} ${widget.businessInfo.data?.developBy ?? ''}',
|
||||
style: _theme.textTheme.bodyMedium?.copyWith(
|
||||
fontSize: fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
fontSize: mainConstant.fontSizeForPrinter(widget.businessInfo.data?.invoiceSize),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user