mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
uses_inclusive_taxes (#3377)
This commit is contained in:
parent
acb0c0f7c1
commit
0f050ae236
@ -12,8 +12,8 @@
|
||||
namespace App\Repositories;
|
||||
|
||||
use App\Factory\InvoiceInvitationFactory;
|
||||
|
||||
use App\Jobs\Product\UpdateOrCreateProduct;
|
||||
use App\Models\Client;
|
||||
use App\Models\ClientContact;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\InvoiceInvitation;
|
||||
@ -48,6 +48,11 @@ class InvoiceRepository extends BaseRepository {
|
||||
/* Always carry forward the initial invoice amount this is important for tracking client balance changes later......*/
|
||||
$starting_amount = $invoice->amount;
|
||||
|
||||
if(!$invoice->id) {
|
||||
$client = Client::find($data['client_id']);
|
||||
$invoice->uses_inclusive_taxes = $client->getSetting('inclusive_taxes');
|
||||
}
|
||||
|
||||
$invoice->fill($data);
|
||||
|
||||
$invoice->save();
|
||||
|
Loading…
Reference in New Issue
Block a user