1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for recurring transformer

This commit is contained in:
David Bomba 2020-09-14 08:21:59 +10:00
parent fb8ab28bd7
commit 14528280d8

View File

@ -83,8 +83,8 @@ class RecurringInvoiceTransformer extends EntityTransformer
'id' => $this->encodePrimaryKey($invoice->id),
'user_id' => $this->encodePrimaryKey($invoice->user_id),
'assigned_user_id' => $this->encodePrimaryKey($invoice->assigned_user_id),
'amount' => (float) $invoice->amount ?: '',
'balance' => (float) $invoice->balance ?: '',
'amount' => (float) $invoice->amount,
'balance' => (float) $invoice->balance,
'client_id' => (string) $invoice->client_id,
'vendor_id' => (string) $this->encodePrimaryKey($invoice->vendor_id),
'status_id' => (string) ($invoice->status_id ?: 1),
@ -94,7 +94,7 @@ class RecurringInvoiceTransformer extends EntityTransformer
'archived_at' => (int) $invoice->deleted_at,
'is_deleted' => (bool) $invoice->is_deleted,
'number' => $invoice->number ?: '',
'discount' => (float) $invoice->discount ?: '',
'discount' => (float) $invoice->discount,
'po_number' => $invoice->po_number ?: '',
'date' => $invoice->date ?: '',
'last_sent_date' => $invoice->last_sent_date ?: '',
@ -105,11 +105,11 @@ class RecurringInvoiceTransformer extends EntityTransformer
'private_notes' => $invoice->private_notes ?: '',
'uses_inclusive_taxes' => (bool) $invoice->uses_inclusive_taxes,
'tax_name1' => $invoice->tax_name1 ? $invoice->tax_name1 : '',
'tax_rate1' => (float) $invoice->tax_rate1 ?: '',
'tax_rate1' => (float) $invoice->tax_rate1,
'tax_name2' => $invoice->tax_name2 ? $invoice->tax_name2 : '',
'tax_rate2' => (float) $invoice->tax_rate2 ?: '',
'tax_rate2' => (float) $invoice->tax_rate2,
'tax_name3' => $invoice->tax_name3 ? $invoice->tax_name3 : '',
'tax_rate3' => (float) $invoice->tax_rate3 ?: '',
'tax_rate3' => (float) $invoice->tax_rate3,
'total_taxes' => (float) $invoice->total_taxes,
'is_amount_discount' => (bool) ($invoice->is_amount_discount ?: false),
'footer' => $invoice->footer ?: '',