Removed default US dollar client currency to enable company setting to be used

This commit is contained in:
Hillel Coren 2014-11-04 22:19:20 +02:00
parent 140fec4b80
commit cb185531da
4 changed files with 32 additions and 3 deletions

View File

@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AllowNullClientCurrency extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('clients', function($table)
{
DB::statement('ALTER TABLE `clients` MODIFY `currency_id` INTEGER UNSIGNED NULL;');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
}

View File

@ -467,5 +467,4 @@ return array(
'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.', 'payment_footer2' => '*Please click "PAY NOW" only once - transaction may take up to 1 minute to process.',
'vat_number' => 'Vat Number', 'vat_number' => 'Vat Number',
); );

View File

@ -102,7 +102,7 @@ class ClientRepository
$client->industry_id = $data['industry_id'] ? $data['industry_id'] : null; $client->industry_id = $data['industry_id'] ? $data['industry_id'] : null;
} }
if (isset($data['currency_id'])) { if (isset($data['currency_id'])) {
$client->currency_id = $data['currency_id'] ? $data['currency_id'] : 1; $client->currency_id = $data['currency_id'] ? $data['currency_id'] : null;
} }
if (isset($data['payment_terms'])) { if (isset($data['payment_terms'])) {
$client->payment_terms = $data['payment_terms']; $client->payment_terms = $data['payment_terms'];

File diff suppressed because one or more lines are too long