mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix parsing product cost
This commit is contained in:
parent
060d0cab8d
commit
116bc07e9a
@ -372,14 +372,10 @@ class InvoiceController extends BaseController
|
||||
$action = Input::get('action');
|
||||
$entityType = Input::get('entityType');
|
||||
|
||||
if (config('ninja.lock_sent_invoices')) {
|
||||
$invoice = $request->entity();
|
||||
} else {
|
||||
$invoice = $this->invoiceService->save($data, $request->entity());
|
||||
$entityType = $invoice->getEntityType();
|
||||
$message = trans("texts.updated_{$entityType}");
|
||||
Session::flash('message', $message);
|
||||
}
|
||||
|
||||
if ($action == 'clone_invoice') {
|
||||
return url(sprintf('invoices/%s/clone', $invoice->public_id));
|
||||
|
@ -742,7 +742,7 @@ class InvoiceRepository extends BaseRepository
|
||||
if ($product && (Auth::user()->can('edit', $product))) {
|
||||
$product->notes = ($task || $expense) ? '' : $item['notes'];
|
||||
if (! $account->convert_products) {
|
||||
$product->cost = $expense ? 0 : $item['cost'];
|
||||
$product->cost = $expense ? 0 : Utils::parseFloat($item['cost']);
|
||||
}
|
||||
$product->tax_name1 = isset($item['tax_name1']) ? $item['tax_name1'] : null;
|
||||
$product->tax_rate1 = isset($item['tax_rate1']) ? $item['tax_rate1'] : 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user