refs #451 Invoice item currency
This commit is contained in:
@ -755,7 +755,7 @@ class Bills extends Controller
|
||||
// it should be integer for amount mask
|
||||
$currency->precision = (int) $currency->precision;
|
||||
|
||||
$html = view('expenses.bills.item', compact('item_row', 'taxes'))->render();
|
||||
$html = view('expenses.bills.item', compact('item_row', 'taxes', 'currency'))->render();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
|
@ -892,7 +892,7 @@ class Invoices extends Controller
|
||||
// it should be integer for amount mask
|
||||
$currency->precision = (int) $currency->precision;
|
||||
|
||||
$html = view('incomes.invoices.item', compact('item_row', 'taxes'))->render();
|
||||
$html = view('incomes.invoices.item', compact('item_row', 'taxes', 'currency'))->render();
|
||||
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
|
@ -38,7 +38,11 @@ class Money
|
||||
if (isset($bill_number) || isset($invoice_number) || !empty($items)) {
|
||||
if (!empty($items)) {
|
||||
foreach ($items as $key => $item) {
|
||||
$items[$key]['price'] = money($item['price'], $currency_code)->getAmount();
|
||||
if (isset($item['currency']) && $item['currency'] != $currency_code) {
|
||||
$items[$key]['price'] = money($item['price'], $item['currency'])->getAmount();
|
||||
} else {
|
||||
$items[$key]['price'] = money($item['price'], $currency_code)->getAmount();
|
||||
}
|
||||
}
|
||||
|
||||
$request->request->set('item', $items);
|
||||
|
Reference in New Issue
Block a user