mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 03:54:36 -04:00
New fields for company gateway
This commit is contained in:
parent
f98e7d15da
commit
bbf240be2d
@ -38,8 +38,12 @@ class CompanyGateway extends BaseModel
|
|||||||
'gateway_key',
|
'gateway_key',
|
||||||
'accepted_credit_cards',
|
'accepted_credit_cards',
|
||||||
'require_cvv',
|
'require_cvv',
|
||||||
'show_billing_address',
|
'require_billing_address',
|
||||||
'show_shipping_address',
|
'require_shipping_address',
|
||||||
|
'require_client_name',
|
||||||
|
'require_zip',
|
||||||
|
'require_client_phone',
|
||||||
|
'require_contact_name',
|
||||||
'update_details',
|
'update_details',
|
||||||
'config',
|
'config',
|
||||||
'fees_and_limits',
|
'fees_and_limits',
|
||||||
|
@ -76,7 +76,7 @@ class InvoiceRepository extends BaseRepository
|
|||||||
|
|
||||||
$invoice->service()->markDeleted()->handleCancellation()->save();
|
$invoice->service()->markDeleted()->handleCancellation()->save();
|
||||||
|
|
||||||
$invoice = parent::delete($invoice);
|
parent::delete($invoice);
|
||||||
|
|
||||||
return $invoice;
|
return $invoice;
|
||||||
}
|
}
|
||||||
|
@ -49,8 +49,8 @@ class CompanyGatewayTransformer extends EntityTransformer
|
|||||||
'gateway_key' => (string) $company_gateway->gateway_key ?: '',
|
'gateway_key' => (string) $company_gateway->gateway_key ?: '',
|
||||||
'accepted_credit_cards' => (int) $company_gateway->accepted_credit_cards,
|
'accepted_credit_cards' => (int) $company_gateway->accepted_credit_cards,
|
||||||
'require_cvv' => (bool) $company_gateway->require_cvv,
|
'require_cvv' => (bool) $company_gateway->require_cvv,
|
||||||
'show_billing_address' => (bool) $company_gateway->show_billing_address,
|
'show_billing_address' => (bool) $company_gateway->show_billing_address, //@deprecated
|
||||||
'show_shipping_address' => (bool) $company_gateway->show_shipping_address,
|
'show_shipping_address' => (bool) $company_gateway->show_shipping_address, //@deprecated
|
||||||
'update_details' => (bool) $company_gateway->update_details,
|
'update_details' => (bool) $company_gateway->update_details,
|
||||||
'config' => (string) $company_gateway->getConfigTransformed(),
|
'config' => (string) $company_gateway->getConfigTransformed(),
|
||||||
'fees_and_limits' => $company_gateway->fees_and_limits ?: new stdClass,
|
'fees_and_limits' => $company_gateway->fees_and_limits ?: new stdClass,
|
||||||
@ -75,3 +75,12 @@ class CompanyGatewayTransformer extends EntityTransformer
|
|||||||
return $this->includeItem($company_gateway->gateway, $transformer, Gateway::class);
|
return $this->includeItem($company_gateway->gateway, $transformer, Gateway::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$table->renameColumn('show_billing_address', 'require_billing_address');
|
||||||
|
$table->renameColumn('show_shipping_address', 'require_billing_address');
|
||||||
|
$table->boolean('require_client_name')->default(false);
|
||||||
|
$table->boolean('require_zip')->default(false);
|
||||||
|
$table->boolean('require_client_phone')->default(false);
|
||||||
|
$table->boolean('require_contact_name')->default(false);
|
||||||
|
$table->boolean('require_contact_email')->default(false);
|
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CompanyGatewayFieldsRefactor extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('company_gateways', function(Blueprint $table){
|
||||||
|
$table->renameColumn('show_billing_address', 'require_billing_address');
|
||||||
|
$table->renameColumn('show_shipping_address', 'require_shipping_address');
|
||||||
|
$table->boolean('require_client_name')->default(false);
|
||||||
|
$table->boolean('require_zip')->default(false);
|
||||||
|
$table->boolean('require_client_phone')->default(false);
|
||||||
|
$table->boolean('require_contact_name')->default(false);
|
||||||
|
$table->boolean('require_contact_email')->default(false);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user