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

Force line items to have a default type_id

This commit is contained in:
David Bomba 2021-08-17 15:35:26 +10:00
parent 9c9de4c49c
commit 9ec7a48eae

View File

@ -55,6 +55,10 @@ trait CleanLineItems
//always cast the value!
$item[$key] = BaseSettings::castAttribute(InvoiceItem::$casts[$key], $item[$key]);
}
if($item['type_id'] == '0')
$item['type_id'] ='1';
}
if (array_key_exists('id', $item)) {