uabh perhitungan tax

This commit is contained in:
2026-02-08 14:58:52 +07:00
parent 0bebe34f19
commit d144d24596
7 changed files with 289 additions and 221 deletions

View File

@@ -121,7 +121,10 @@ class AddSalesScreenState extends ConsumerState<AddSalesScreen> {
productPurchasePrice: detail.product?.productPurchasePrice,
stock: detail.stock?.productCurrentStock,
productId: detail.productId!,
stockId: detail.stock?.id ?? 0);
stockId: detail.stock?.id ?? 0,
perItemTaxPercentage: 0, // Default to 0 as historical tax rate is not available
productVatId: null, // Default to null
);
cart.addToCartRiverPod(
cartItem: cartItem,
fromEditSales: true,
@@ -503,7 +506,7 @@ class AddSalesScreenState extends ConsumerState<AddSalesScreen> {
const SizedBox(width: 10),
const Spacer(),
taxesData.when(
/*taxesData.when(
data: (data) {
List<VatModel> dataList = data.where((tax) => tax.status == true).toList();
if (widget.transitionModel != null &&
@@ -579,7 +582,7 @@ class AddSalesScreenState extends ConsumerState<AddSalesScreen> {
},
),
const SizedBox(width: 10),
const SizedBox(width: 10),*/
// VAT Amount Input Field
SizedBox(