default integer value for payment_terms

Because sending an empty string to a integer column is not allowed with
MySQL in STRICT_TRANS_TABLE mode.
This commit is contained in:
Samuel De Backer 2014-08-26 10:32:14 +02:00
parent 686be0852b
commit 8edb063b30

View File

@ -212,7 +212,7 @@ class ClientController extends \BaseController {
$client->size_id = Input::get('size_id') ? Input::get('size_id') : null;
$client->industry_id = Input::get('industry_id') ? Input::get('industry_id') : null;
$client->currency_id = Input::get('currency_id') ? Input::get('currency_id') : 1;
$client->payment_terms = Input::get('payment_terms');
$client->payment_terms = Input::get('payment_terms') ? : 0;
$client->website = trim(Input::get('website'));
$client->save();