1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fixes for spacing in notes section

This commit is contained in:
David Bomba 2024-10-08 14:20:05 +11:00
parent b903066f34
commit 9b94a88180
10 changed files with 111 additions and 3 deletions

View File

@ -113,6 +113,19 @@ class StoreCreditRequest extends Request
if (array_key_exists('exchange_rate', $input) && is_null($input['exchange_rate'])) {
$input['exchange_rate'] = 1;
}
if (isset($input['footer']) && $this->hasHeader('X-REACT')) {
$input['footer'] = str_replace("\n", "", $input['footer']);
}
if (isset($input['public_notes']) && $this->hasHeader('X-REACT')) {
$input['public_notes'] = str_replace("\n", "", $input['public_notes']);
}
if (isset($input['private_notes']) && $this->hasHeader('X-REACT')) {
$input['private_notes'] = str_replace("\n", "", $input['private_notes']);
}
if (isset($input['terms']) && $this->hasHeader('X-REACT')) {
$input['terms'] = str_replace("\n", "", $input['terms']);
}
$this->replace($input);
}

View File

@ -109,6 +109,19 @@ class UpdateCreditRequest extends Request
$input['id'] = $this->credit->id;
if (isset($input['footer']) && $this->hasHeader('X-REACT')) {
$input['footer'] = str_replace("\n", "", $input['footer']);
}
if (isset($input['public_notes']) && $this->hasHeader('X-REACT')) {
$input['public_notes'] = str_replace("\n", "", $input['public_notes']);
}
if (isset($input['private_notes']) && $this->hasHeader('X-REACT')) {
$input['private_notes'] = str_replace("\n", "", $input['private_notes']);
}
if (isset($input['terms']) && $this->hasHeader('X-REACT')) {
$input['terms'] = str_replace("\n", "", $input['terms']);
}
$this->replace($input);
}
}

View File

@ -140,6 +140,21 @@ class StoreInvoiceRequest extends Request
}
}
if(isset($input['footer']) && $this->hasHeader('X-REACT'))
$input['footer'] = str_replace("\n", "", $input['footer']);
if (isset($input['public_notes']) && $this->hasHeader('X-REACT')) {
$input['public_notes'] = str_replace("\n", "", $input['public_notes']);
}
if (isset($input['private_notes']) && $this->hasHeader('X-REACT')) {
$input['private_notes'] = str_replace("\n", "", $input['private_notes']);
}
if (isset($input['terms']) && $this->hasHeader('X-REACT')) {
$input['terms'] = str_replace("\n", "", $input['terms']);
}
$this->replace($input);
}
}

View File

@ -127,6 +127,19 @@ class UpdateInvoiceRequest extends Request
$input['e_invoice'] = $this->invoice->filterNullsRecursive($input['e_invoice']);
}
if (isset($input['footer']) && $this->hasHeader('X-REACT')) {
$input['footer'] = str_replace("\n", "", $input['footer']);
}
if (isset($input['public_notes']) && $this->hasHeader('X-REACT')) {
$input['public_notes'] = str_replace("\n", "", $input['public_notes']);
}
if (isset($input['private_notes']) && $this->hasHeader('X-REACT')) {
$input['private_notes'] = str_replace("\n", "", $input['private_notes']);
}
if (isset($input['terms']) && $this->hasHeader('X-REACT')) {
$input['terms'] = str_replace("\n", "", $input['terms']);
}
$this->replace($input);
}

View File

@ -103,6 +103,19 @@ class StorePurchaseOrderRequest extends Request
if (array_key_exists('exchange_rate', $input) && is_null($input['exchange_rate'])) {
$input['exchange_rate'] = 1;
}
if (isset($input['footer']) && $this->hasHeader('X-REACT')) {
$input['footer'] = str_replace("\n", "", $input['footer']);
}
if (isset($input['public_notes']) && $this->hasHeader('X-REACT')) {
$input['public_notes'] = str_replace("\n", "", $input['public_notes']);
}
if (isset($input['private_notes']) && $this->hasHeader('X-REACT')) {
$input['private_notes'] = str_replace("\n", "", $input['private_notes']);
}
if (isset($input['terms']) && $this->hasHeader('X-REACT')) {
$input['terms'] = str_replace("\n", "", $input['terms']);
}
$this->replace($input);
}

View File

@ -100,6 +100,19 @@ class UpdatePurchaseOrderRequest extends Request
if (array_key_exists('exchange_rate', $input) && is_null($input['exchange_rate'])) {
$input['exchange_rate'] = 1;
}
if (isset($input['footer']) && $this->hasHeader('X-REACT')) {
$input['footer'] = str_replace("\n", "", $input['footer']);
}
if (isset($input['public_notes']) && $this->hasHeader('X-REACT')) {
$input['public_notes'] = str_replace("\n", "", $input['public_notes']);
}
if (isset($input['private_notes']) && $this->hasHeader('X-REACT')) {
$input['private_notes'] = str_replace("\n", "", $input['private_notes']);
}
if (isset($input['terms']) && $this->hasHeader('X-REACT')) {
$input['terms'] = str_replace("\n", "", $input['terms']);
}
$this->replace($input);
}

View File

@ -128,6 +128,20 @@ class StoreQuoteRequest extends Request
$input['due_date'] = \Carbon\Carbon::parse($input['date'])->addDays((int)$valid_days)->format('Y-m-d');
}
if (isset($input['footer']) && $this->hasHeader('X-REACT')) {
$input['footer'] = str_replace("\n", "", $input['footer']);
}
if (isset($input['public_notes']) && $this->hasHeader('X-REACT')) {
$input['public_notes'] = str_replace("\n", "", $input['public_notes']);
}
if (isset($input['private_notes']) && $this->hasHeader('X-REACT')) {
$input['private_notes'] = str_replace("\n", "", $input['private_notes']);
}
if (isset($input['terms']) && $this->hasHeader('X-REACT')) {
$input['terms'] = str_replace("\n", "", $input['terms']);
}
$this->replace($input);
}
}

View File

@ -99,6 +99,20 @@ class UpdateQuoteRequest extends Request
if(isset($input['partial']) && $input['partial'] == 0) {
$input['partial_due_date'] = null;
}
if (isset($input['footer']) && $this->hasHeader('X-REACT')) {
$input['footer'] = str_replace("\n", "", $input['footer']);
}
if (isset($input['public_notes']) && $this->hasHeader('X-REACT')) {
$input['public_notes'] = str_replace("\n", "", $input['public_notes']);
}
if (isset($input['private_notes']) && $this->hasHeader('X-REACT')) {
$input['private_notes'] = str_replace("\n", "", $input['private_notes']);
}
if (isset($input['terms']) && $this->hasHeader('X-REACT')) {
$input['terms'] = str_replace("\n", "", $input['terms']);
}
$this->replace($input);
}

View File

@ -828,9 +828,9 @@ class HtmlEngine
if($this->entity_calc->getTotalTaxes() > 0) {
$tax_label = '';
}
}
if ($this->entity->company->tax_data->regions->EU->has_sales_above_threshold){
if (!$this->entity->company->tax_data->regions->EU->has_sales_above_threshold ?? false){
$tax_label .= ctrans('text.small_company_info') ."<br>";
}

View File

@ -5358,7 +5358,7 @@ $lang = array(
'end_all_sessions_help' => 'Logs out all users and requires all active users to reauthenticate.',
'updated_records' => 'Updated Records',
'vat_not_registered' => 'Seller not VAT registered',
'text.small_company_info' => 'No disclosure of sales tax in accordance with § 19 UStG'
'small_company_info' => 'No disclosure of sales tax in accordance with § 19 UStG'
);
return $lang;