mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Fix invoice status issue with API
This commit is contained in:
parent
1eb6cd33f2
commit
46c008477e
@ -117,6 +117,10 @@ class CheckData extends Command
|
||||
|
||||
$this->logMessage(count($invoices) . ' draft sent invoices');
|
||||
|
||||
if (count($invoices) > 0) {
|
||||
$this->isValid = false;
|
||||
}
|
||||
|
||||
if ($this->option('fix') == 'true') {
|
||||
foreach ($invoices as $invoice) {
|
||||
if ($invoice->is_deleted) {
|
||||
|
@ -412,12 +412,14 @@ class InvoiceRepository extends BaseRepository
|
||||
$invoice->invoice_date = Utils::toSqlDate($data['invoice_date']);
|
||||
}
|
||||
|
||||
/*
|
||||
if (isset($data['invoice_status_id'])) {
|
||||
if ($data['invoice_status_id'] == 0) {
|
||||
$data['invoice_status_id'] = INVOICE_STATUS_DRAFT;
|
||||
}
|
||||
$invoice->invoice_status_id = $data['invoice_status_id'];
|
||||
}
|
||||
*/
|
||||
|
||||
if ($invoice->is_recurring) {
|
||||
if (! $isNew && isset($data['start_date']) && $invoice->start_date && $invoice->start_date != Utils::toSqlDate($data['start_date'])) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user