Add fixes for register + receiving validation (#458)

This commit is contained in:
jekkos committed 2016-07-07 21:11:33 +02:00
1 parent 3af19daa0e
commit 0f88d6462d
3 files changed
+8 -8

No files matched your search

+5 -5
View File
@@ -180,7 +180,7 @@ class Sale_lib
$subtotal = bcadd($payments['payment_amount'], $subtotal, PRECISION);
}
return to_currency_no_money($subtotal);
return $subtotal;
}
// Multiple Payments
@@ -189,7 +189,7 @@ class Sale_lib
$payment_total = $this->get_payments_total();
$sales_total = $this->get_total();
return to_currency_no_money(bcsub($sales_total, $payment_total, PRECISION));
return bcsub($sales_total, $payment_total, PRECISION);
}
public function get_customer()
@@ -306,7 +306,7 @@ class Sale_lib
$updatekey = $item['line'];
if(!$item_info->is_serialized)
{
$quantity += $items[$updatekey]['quantity'];
$quantity = bcadd($quantity, $items[$updatekey]['quantity']);
}
}
}
@@ -603,7 +603,7 @@ class Sale_lib
public function get_subtotal($include_discount=FALSE, $exclude_tax=FALSE)
{
$subtotal = $this->calculate_subtotal($include_discount, $exclude_tax);
return to_currency_no_money($subtotal);
return $subtotal;
}
public function get_item_total_tax_exclusive($item_id, $quantity, $price, $discount_percentage, $include_discount = FALSE)
@@ -687,7 +687,7 @@ class Sale_lib
}
}
return to_currency_no_money($total);
return $total;
}
public function validate_item(&$item_id)