mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 07:07:34 -05: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->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
 | 
			
		||||
     * whether an invoice is locked
 | 
			
		||||
     * based on the current status of the invoice.
 | 
			
		||||
     * @return bool [description]
 | 
			
		||||
     * @return bool
 | 
			
		||||
     */
 | 
			
		||||
    public function isLocked(): bool
 | 
			
		||||
    {
 | 
			
		||||
@ -595,7 +595,7 @@ class Invoice extends BaseModel
 | 
			
		||||
            case 'off':
 | 
			
		||||
                return false;
 | 
			
		||||
            case 'when_sent':
 | 
			
		||||
                return $this->status_id == self::STATUS_SENT;
 | 
			
		||||
                return $this->status_id >= self::STATUS_SENT;
 | 
			
		||||
            case 'when_paid':
 | 
			
		||||
                return $this->status_id == self::STATUS_PAID || $this->status_id == self::STATUS_PARTIAL;
 | 
			
		||||
            case 'end_of_month':
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user