Fixes for currency translation

This commit is contained in:
David Bomba 2024-11-10 10:42:35 +11:00
parent 1ada7e2253
commit 1465d46bac
6 changed files with 16 additions and 73 deletions

View File

@ -123,6 +123,11 @@ class MailgunController extends BaseController
nlog($input);
if($input['recipient'] == config('ninja.storecove_email_catchall') && stripos('no-reply@mailer.storecove.com', $input['from']) !== false){
foreach ($request->files as $file) {
// Process each file
nlog($file);
}
}
if (!array_key_exists('sender', $input) || !array_key_exists('recipient', $input) || !array_key_exists('message-url', $input)) {

View File

@ -56,6 +56,7 @@ class Currency extends StaticModel
public function getName(): string
{
return trans('texts.currency_'.$this->name);
return $this->name;
// return trans('texts.currency_'.$this->name);
}
}

View File

@ -372,8 +372,7 @@ class Mutator implements MutatorInterface
// ["scheme" => 'IT:CUUO', "id" => $this->invoice->client->routing_id]
]));
// $this->setEmailRouting($this->invoice->client->present()->email());
$this->setEmailRouting(config('ninja.storecove_email_catchall'));
$this->setEmailRouting($this->invoice->client->present()->email());
return $this;
}
@ -631,7 +630,7 @@ class Mutator implements MutatorInterface
*/
private function setEmailRouting(string $email): self
{
$email = "peppol@mail.invoicing.co";
$meta = $this->getStorecoveMeta();
if(isset($meta['routing']['emails'])) {

View File

@ -1,62 +0,0 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2024. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Services\EDocument\Gateway\Storecove\Transformers;
use Symfony\Component\Serializer\Annotation\SerializedName;
use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
use Symfony\Component\Serializer\Attribute\Context;
use DateTime;
class StorecoveVendor
{
#[SerializedName('name')]
public string $name = '';
#[SerializedName('vat_number')]
public string $vatNumber = '';
#[SerializedName('number')]
public string $number = '';
#[SerializedName('website')]
public string $website = '';
#[SerializedName('phone')]
public string $phone = '';
#[SerializedName('address1')]
public string $streetName = '';
#[SerializedName('address2')]
public string $additionalStreetName = '';
#[SerializedName('city')]
public string $city = '';
#[SerializedName('state')]
public string $countrySubentity = '';
#[SerializedName('postal_code')]
public string $postalZone = '';
#[SerializedName('country_id')]
public string $countryCode = '';
#[SerializedName('custom_value1')]
public ?string $companyId = null;
#[SerializedName('email')]
public string $email = '';
#[SerializedName('currency_id')]
public string $currency = '';
}

View File

@ -74,13 +74,13 @@ class SendEDocument implements ShouldQueue
],
'tenant_id' => $model->company->company_key,
'routing' => $identifiers['routing'],
//
'account_key' => $model->company->account->key,
'e_invoicing_token' => $model->company->account->e_invoicing_token,
'identifiers' => $identifiers,
// 'identifiers' => $identifiers,
];
nlog($payload);
/** Concrete implementation current linked to Storecove only */
//@testing only

8
composer.lock generated
View File

@ -4336,12 +4336,12 @@
"source": {
"type": "git",
"url": "https://github.com/invoiceninja/einvoice.git",
"reference": "ba1cf55c7c6db824a90c8f14f342030134b7e453"
"reference": "9b902ffd9bb87e4330175449d00aa3b102f7af0d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/invoiceninja/einvoice/zipball/ba1cf55c7c6db824a90c8f14f342030134b7e453",
"reference": "ba1cf55c7c6db824a90c8f14f342030134b7e453",
"url": "https://api.github.com/repos/invoiceninja/einvoice/zipball/9b902ffd9bb87e4330175449d00aa3b102f7af0d",
"reference": "9b902ffd9bb87e4330175449d00aa3b102f7af0d",
"shasum": ""
},
"require": {
@ -4383,7 +4383,7 @@
"source": "https://github.com/invoiceninja/einvoice/tree/main",
"issues": "https://github.com/invoiceninja/einvoice/issues"
},
"time": "2024-11-09T21:49:29+00:00"
"time": "2024-11-09T22:11:04+00:00"
},
{
"name": "invoiceninja/inspector",