mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for renaming company gateway columns
This commit is contained in:
parent
f1c1243146
commit
d8bb01430f
@ -553,7 +553,7 @@ class CompanySettings extends BaseSettings
|
|||||||
|
|
||||||
foreach ($company_settings as $key => $value) {
|
foreach ($company_settings as $key => $value) {
|
||||||
if (! property_exists($settings, $key)) {
|
if (! property_exists($settings, $key)) {
|
||||||
$settings->{ $key} = self::castAttribute($key, $company_settings->{ $key});
|
$settings->{$key} = self::castAttribute($key, $company_settings->{$key});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -729,6 +729,7 @@ class InvoiceController extends BaseController
|
|||||||
$invoice->service()->touchReminder($this->reminder_template)->save();
|
$invoice->service()->touchReminder($this->reminder_template)->save();
|
||||||
|
|
||||||
$invoice->invitations->load('contact.client.country', 'invoice.client.country', 'invoice.company')->each(function ($invitation) use ($invoice) {
|
$invoice->invitations->load('contact.client.country', 'invoice.client.country', 'invoice.company')->each(function ($invitation) use ($invoice) {
|
||||||
|
info("firing email");
|
||||||
EmailEntity::dispatch($invitation, $invoice->company, $this->reminder_template);
|
EmailEntity::dispatch($invitation, $invoice->company, $this->reminder_template);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -41,7 +41,7 @@ class CompanyGateway extends BaseModel
|
|||||||
'require_billing_address',
|
'require_billing_address',
|
||||||
'require_shipping_address',
|
'require_shipping_address',
|
||||||
'require_client_name',
|
'require_client_name',
|
||||||
'require_zip',
|
'require_postal_code',
|
||||||
'require_client_phone',
|
'require_client_phone',
|
||||||
'require_contact_name',
|
'require_contact_name',
|
||||||
'update_details',
|
'update_details',
|
||||||
|
@ -53,6 +53,7 @@ class CompanyGatewayTransformer extends EntityTransformer
|
|||||||
'require_shipping_address' => (bool) $company_gateway->require_shipping_address,
|
'require_shipping_address' => (bool) $company_gateway->require_shipping_address,
|
||||||
'require_client_name' => (bool) $company_gateway->require_client_name,
|
'require_client_name' => (bool) $company_gateway->require_client_name,
|
||||||
'require_zip' => (bool) $company_gateway->require_zip,
|
'require_zip' => (bool) $company_gateway->require_zip,
|
||||||
|
'require_postal_code' => (bool) $company_gateway->require_postal_code,
|
||||||
'require_client_phone' => (bool) $company_gateway->require_client_phone,
|
'require_client_phone' => (bool) $company_gateway->require_client_phone,
|
||||||
'require_contact_name' => (bool) $company_gateway->require_contact_name,
|
'require_contact_name' => (bool) $company_gateway->require_contact_name,
|
||||||
'require_contact_email' => (bool) $company_gateway->require_contact_email,
|
'require_contact_email' => (bool) $company_gateway->require_contact_email,
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CompanyGatewayRenameColumn extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('company_gateways', function(Blueprint $table){
|
||||||
|
$table->renameColumn('require_zip', 'require_postal_code');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user