Item autocomple multiple tax
This commit is contained in:
parent
7fd25b1c10
commit
2fb4352767
@ -254,12 +254,12 @@ class Items extends Controller
|
|||||||
|
|
||||||
if ($items) {
|
if ($items) {
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
$tax = Tax::find($item->tax_id);
|
|
||||||
|
|
||||||
$item_tax_price = 0;
|
$item_tax_price = 0;
|
||||||
|
|
||||||
if (!empty($tax)) {
|
if ($item->taxes->count()) {
|
||||||
$item_tax_price = ($item->sale_price / 100) * $tax->rate;
|
foreach($item->taxes as $item_tax) {
|
||||||
|
$item_tax_price += ($item->sale_price / 100) * $item_tax->tax->rate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user