mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 10:17:30 -04:00
Merge fixes from develop
This commit is contained in:
parent
40241cbf38
commit
fc0a7cfbf0
@ -117,6 +117,8 @@ class ClientApiController extends BaseAPIController
|
|||||||
$data['public_id'] = $publicId;
|
$data['public_id'] = $publicId;
|
||||||
$client = $this->clientRepo->save($data, $request->entity());
|
$client = $this->clientRepo->save($data, $request->entity());
|
||||||
|
|
||||||
|
$client->load(['contacts']);
|
||||||
|
|
||||||
return $this->itemResponse($client);
|
return $this->itemResponse($client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -871,13 +871,13 @@ class Invoice extends EntityModel implements BalanceAffecting
|
|||||||
|
|
||||||
if ($this->tax_name1) {
|
if ($this->tax_name1) {
|
||||||
$invoiceTaxAmount = round($taxable * ($this->tax_rate1 / 100), 2);
|
$invoiceTaxAmount = round($taxable * ($this->tax_rate1 / 100), 2);
|
||||||
$invoicePaidAmount = $this->amount && $invoiceTaxAmount ? ($paidAmount / $this->amount * $invoiceTaxAmount) : 0;
|
$invoicePaidAmount = floatVal($this->amount) && $invoiceTaxAmount ? ($paidAmount / $this->amount * $invoiceTaxAmount) : 0;
|
||||||
$this->calculateTax($taxes, $this->tax_name1, $this->tax_rate1, $invoiceTaxAmount, $invoicePaidAmount);
|
$this->calculateTax($taxes, $this->tax_name1, $this->tax_rate1, $invoiceTaxAmount, $invoicePaidAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->tax_name2) {
|
if ($this->tax_name2) {
|
||||||
$invoiceTaxAmount = round($taxable * ($this->tax_rate2 / 100), 2);
|
$invoiceTaxAmount = round($taxable * ($this->tax_rate2 / 100), 2);
|
||||||
$invoicePaidAmount = $this->amount && $invoiceTaxAmount ? ($paidAmount / $this->amount * $invoiceTaxAmount) : 0;
|
$invoicePaidAmount = floatVal($this->amount) && $invoiceTaxAmount ? ($paidAmount / $this->amount * $invoiceTaxAmount) : 0;
|
||||||
$this->calculateTax($taxes, $this->tax_name2, $this->tax_rate2, $invoiceTaxAmount, $invoicePaidAmount);
|
$this->calculateTax($taxes, $this->tax_name2, $this->tax_rate2, $invoiceTaxAmount, $invoicePaidAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -886,13 +886,13 @@ class Invoice extends EntityModel implements BalanceAffecting
|
|||||||
|
|
||||||
if ($invoiceItem->tax_name1) {
|
if ($invoiceItem->tax_name1) {
|
||||||
$itemTaxAmount = round($taxable * ($invoiceItem->tax_rate1 / 100), 2);
|
$itemTaxAmount = round($taxable * ($invoiceItem->tax_rate1 / 100), 2);
|
||||||
$itemPaidAmount = $this->amount && $itemTaxAmount ? ($paidAmount / $this->amount * $itemTaxAmount) : 0;
|
$itemPaidAmount = floatVal($this->amount) && $itemTaxAmount ? ($paidAmount / $this->amount * $itemTaxAmount) : 0;
|
||||||
$this->calculateTax($taxes, $invoiceItem->tax_name1, $invoiceItem->tax_rate1, $itemTaxAmount, $itemPaidAmount);
|
$this->calculateTax($taxes, $invoiceItem->tax_name1, $invoiceItem->tax_rate1, $itemTaxAmount, $itemPaidAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($invoiceItem->tax_name2) {
|
if ($invoiceItem->tax_name2) {
|
||||||
$itemTaxAmount = round($taxable * ($invoiceItem->tax_rate2 / 100), 2);
|
$itemTaxAmount = round($taxable * ($invoiceItem->tax_rate2 / 100), 2);
|
||||||
$itemPaidAmount = $this->amount && $itemTaxAmount ? ($paidAmount / $this->amount * $itemTaxAmount) : 0;
|
$itemPaidAmount = floatVal($this->amount) && $itemTaxAmount ? ($paidAmount / $this->amount * $itemTaxAmount) : 0;
|
||||||
$this->calculateTax($taxes, $invoiceItem->tax_name2, $invoiceItem->tax_rate2, $itemTaxAmount, $itemPaidAmount);
|
$this->calculateTax($taxes, $invoiceItem->tax_name2, $invoiceItem->tax_rate2, $itemTaxAmount, $itemPaidAmount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if ($account->isPro())
|
@if ($account->hasFeature(FEATURE_DOCUMENTS))
|
||||||
<div clas="row">
|
<div clas="row">
|
||||||
<div class="col-md-2 col-sm-4"><div class="control-label" style="margin-bottom:10px;">{{trans('texts.expense_documents')}}</div></div>
|
<div class="col-md-2 col-sm-4"><div class="control-label" style="margin-bottom:10px;">{{trans('texts.expense_documents')}}</div></div>
|
||||||
<div class="col-md-12 col-sm-8">
|
<div class="col-md-12 col-sm-8">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user