update perbaikan pos, return, dan report profit nlost
All checks were successful
All checks were successful
This commit is contained in:
@@ -65,11 +65,15 @@ $(document).on('click', '.sub-btn', function(e) {
|
||||
// Update the subtotal for each row based on the return quantity
|
||||
function updateSubTotal(row) {
|
||||
let priceText = row.find(".price").text();
|
||||
let price = getNumericValue(String(priceText || ""))
|
||||
|| getNumericValue(String(row.data("discounted_price_per_unit") || "0"));
|
||||
let price = getNumericValue(String(priceText || "0"));
|
||||
|
||||
let vatText = row.find(".vat_value").text();
|
||||
let vatAmount = getNumericValue(String(vatText || "0"));
|
||||
|
||||
let inclusivePrice = price + vatAmount;
|
||||
|
||||
let quantity = getNumericValue(String(row.find(".return-qty").val() || "0"));
|
||||
let subTotal = price * quantity;
|
||||
let subTotal = inclusivePrice * quantity;
|
||||
|
||||
row.find(".subtotal").text(currencyFormat(subTotal));
|
||||
updateTotalAmount();
|
||||
|
||||
BIN
public/uploads/26/05/1778762942-136.png
Normal file
BIN
public/uploads/26/05/1778762942-136.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 416 KiB |
Reference in New Issue
Block a user