mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Improvements for paytrace required fields capture
This commit is contained in:
parent
f5f972ad6a
commit
dfb59a0d28
@ -479,6 +479,8 @@ class CompanySettings extends BaseSettings
|
||||
|
||||
public $e_invoice_type = 'EN16931';
|
||||
|
||||
public $e_quote_type = 'OrderX_Comfort';
|
||||
|
||||
public $default_expense_payment_type_id = '0';
|
||||
|
||||
public $enable_e_invoice = false;
|
||||
@ -502,6 +504,7 @@ class CompanySettings extends BaseSettings
|
||||
public $enable_rappen_rounding = false;
|
||||
|
||||
public static $casts = [
|
||||
'e_quote_type' => 'string',
|
||||
'enable_rappen_rounding' => 'bool',
|
||||
'use_unapplied_payment' => 'string',
|
||||
'show_pdfhtml_on_mobile' => 'bool',
|
||||
|
@ -59,8 +59,9 @@ class CreateEDocument implements ShouldQueue
|
||||
/* Set customized translations _NOW_ */
|
||||
$t->replace(Ninja::transformTranslations($this->document->client->getMergedSettings()));
|
||||
|
||||
$e_document_type = $settings_entity->getSetting('e_invoice_type') ? $settings_entity->getSetting('e_invoice_type') : "XInvoice_3_0";
|
||||
$e_quote_type = $settings_entity->getSetting('e_quote_type') ? $settings_entity->getSetting('e_quote_type') : "OrderX_Extended";
|
||||
$e_document_type = strlen($settings_entity->getSetting('e_invoice_type')) > 2 ? $settings_entity->getSetting('e_invoice_type') : "XInvoice_3_0";
|
||||
$e_quote_type = strlen($settings_entity->getSetting('e_quote_type')) > 2 ? $settings_entity->getSetting('e_quote_type') : "OrderX_Extended";
|
||||
|
||||
if ($this->document instanceof Invoice){
|
||||
switch ($e_document_type) {
|
||||
case "EN16931":
|
||||
|
@ -262,6 +262,7 @@ class PaytracePaymentDriver extends BaseDriver
|
||||
|
||||
$fields[] = ['name' => 'client_address_line_1', 'label' => ctrans('texts.address1'), 'type' => 'text', 'validation' => 'required'];
|
||||
$fields[] = ['name' => 'client_city', 'label' => ctrans('texts.city'), 'type' => 'text', 'validation' => 'required'];
|
||||
$fields[] = ['name' => 'client_postal_code', 'label' => ctrans('texts.postal_code'), 'type' => 'text', 'validation' => 'required'];
|
||||
$fields[] = ['name' => 'client_state', 'label' => ctrans('texts.state'), 'type' => 'text', 'validation' => 'required'];
|
||||
$fields[] = ['name' => 'client_country_id', 'label' => ctrans('texts.country'), 'type' => 'text', 'validation' => 'required'];
|
||||
|
||||
|
@ -105,6 +105,7 @@ class VendorTransformer extends EntityTransformer
|
||||
'language_id' => (string) $vendor->language_id ?: '',
|
||||
'classification' => (string) $vendor->classification ?: '',
|
||||
'display_name' => (string) $vendor->present()->name(),
|
||||
'routing_id' => (string) $vendor->routing_id ?: '',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -14,11 +14,20 @@ return new class extends Migration {
|
||||
{
|
||||
|
||||
Schema::table('vendors', function (Blueprint $table) {
|
||||
$table->string('routing_id')->default(null)->nullable();
|
||||
$table->string('routing_id')->nullable();
|
||||
});
|
||||
Schema::table('companies', function (Blueprint $table) {
|
||||
$table->string('e_quote_type')->default("OrderX_Comfort");
|
||||
|
||||
\App\Models\Company::query()
|
||||
->cursor()
|
||||
->each(function ($c){
|
||||
$settings = $c->settings;
|
||||
$settings->e_quote_type = 'OrderX_Comfort';
|
||||
$settings->enable_rappen_rounding = false;
|
||||
|
||||
$c->settings = $settings;
|
||||
$c->save();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5264,6 +5264,8 @@ $lang = array(
|
||||
'accept_payments_online' => 'Accept Payments Online',
|
||||
'all_payment_gateways' => 'View all payment gateways',
|
||||
'product_cost' => 'Product cost',
|
||||
'enable_rappen_roudning' => 'Enable Rappen Rounding',
|
||||
'enable_rappen_rounding_help' => 'Rounds totals to nearest 5',
|
||||
);
|
||||
|
||||
return $lang;
|
||||
|
Loading…
x
Reference in New Issue
Block a user