mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:14:32 -04:00
Fixes for locked invoice status
This commit is contained in:
parent
28775c087e
commit
acbb5d475c
@ -33,7 +33,10 @@ class QuickbooksSyncMap
|
|||||||
{
|
{
|
||||||
$this->sync = $attributes['sync'] ?? true;
|
$this->sync = $attributes['sync'] ?? true;
|
||||||
$this->update_record = $attributes['update_record'] ?? true;
|
$this->update_record = $attributes['update_record'] ?? true;
|
||||||
$this->direction = $attributes['direction'] ?? SyncDirection::BIDIRECTIONAL;
|
$this->direction = isset($attributes['direction'])
|
||||||
|
? SyncDirection::from($attributes['direction'])
|
||||||
|
: SyncDirection::BIDIRECTIONAL;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -585,7 +585,7 @@ class Invoice extends BaseModel
|
|||||||
* Filtering logic to determine
|
* Filtering logic to determine
|
||||||
* whether an invoice is locked
|
* whether an invoice is locked
|
||||||
* based on the current status of the invoice.
|
* based on the current status of the invoice.
|
||||||
* @return bool [description]
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function isLocked(): bool
|
public function isLocked(): bool
|
||||||
{
|
{
|
||||||
@ -595,7 +595,7 @@ class Invoice extends BaseModel
|
|||||||
case 'off':
|
case 'off':
|
||||||
return false;
|
return false;
|
||||||
case 'when_sent':
|
case 'when_sent':
|
||||||
return $this->status_id == self::STATUS_SENT;
|
return $this->status_id >= self::STATUS_SENT;
|
||||||
case 'when_paid':
|
case 'when_paid':
|
||||||
return $this->status_id == self::STATUS_PAID || $this->status_id == self::STATUS_PARTIAL;
|
return $this->status_id == self::STATUS_PAID || $this->status_id == self::STATUS_PARTIAL;
|
||||||
case 'end_of_month':
|
case 'end_of_month':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user