1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
This commit is contained in:
David Bomba 2023-11-04 21:04:27 +11:00
parent 15ff200153
commit 65d3d0f320
4 changed files with 30 additions and 26 deletions

View File

@ -1 +1 @@
5.7.44
5.7.45

View File

@ -211,6 +211,8 @@ class CreditCard
{
$response_array = $request->all();
nlog($request->all());
$state = [
'server_response' => $request->all(),
'payment_hash' => $request->input('m_payment_id'),

View File

@ -539,33 +539,35 @@ class FacturaEInvoice extends AbstractService
private function buildBuyer(): self
{
$buyer = new FacturaeParty([
"isLegalEntity" => $this->invoice->client->classification === 'individual' ? false : true,
"taxNumber" => $this->invoice->client->vat_number,
"name" => substr($this->invoice->client->present()->name(), 0, 40),
// "firstSurname" => substr($this->invoice->client->present()->last_name(), 0, 40),
// "lastSurname" => substr($this->invoice->client->present()->last_name(), 0, 40),
"address" => substr($this->invoice->client->address1, 0, 80),
"postCode" => substr($this->invoice->client->postal_code, 0, 5),
"town" => substr($this->invoice->client->city, 0, 50),
"province" => substr($this->invoice->client->state, 0, 20),
"countryCode" => $this->invoice->client->country->iso_3166_3, // Se asume España si se omite
"email" => substr($this->invoice->client->present()->email(), 0, 60),
"phone" => substr($this->invoice->client->present()->phone(), 0, 15),
"fax" => "",
"website" => substr($this->invoice->client->present()->website(), 0, 60),
"contactPeople" => substr($this->invoice->client->present()->first_name()." ".$this->invoice->client->present()->last_name(), 0, 40),
'centres' => $this->setFace(),
// "cnoCnae" => "04791", // Clasif. Nacional de Act. Económicas
// "ineTownCode" => "280796" // Cód. de municipio del INE
]);
$buyer_array = [
"isLegalEntity" => $this->invoice->client->classification === 'individual' ? false : true,
"taxNumber" => $this->invoice->client->vat_number,
"name" => substr($this->invoice->client->present()->name(), 0, 40),
// "firstSurname" => substr($this->invoice->client->present()->last_name(), 0, 40),
// "lastSurname" => substr($this->invoice->client->present()->last_name(), 0, 40),
"address" => substr($this->invoice->client->address1, 0, 80),
"postCode" => substr($this->invoice->client->postal_code, 0, 5),
"town" => substr($this->invoice->client->city, 0, 50),
"province" => substr($this->invoice->client->state, 0, 20),
"countryCode" => $this->invoice->client->country->iso_3166_3, // Se asume España si se omite
"email" => substr($this->invoice->client->present()->email(), 0, 60),
"phone" => substr($this->invoice->client->present()->phone(), 0, 15),
"fax" => "",
"website" => substr($this->invoice->client->present()->website(), 0, 60),
"contactPeople" => substr($this->invoice->client->present()->first_name()." ".$this->invoice->client->present()->last_name(), 0, 40),
'centres' => $this->setFace(),
// "cnoCnae" => "04791", // Clasif. Nacional de Act. Económicas
// "ineTownCode" => "280796" // Cód. de municipio del INE
];
if($this->invoice->client->classification === 'individual') {
$buyer['name'] = $this->invoice->client->present()->first_name();
$buyer['firstSurname'] = $this->invoice->client->present()->last_name();
$buyer_array['name'] = $this->invoice->client->present()->first_name();
$buyer_array['firstSurname'] = $this->invoice->client->present()->last_name();
}
$buyer = new FacturaeParty($buyer_array);
$this->fac->setBuyer($buyer);
return $this;

View File

@ -15,8 +15,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => env('APP_VERSION','5.7.44'),
'app_tag' => env('APP_TAG','5.7.44'),
'app_version' => env('APP_VERSION','5.7.45'),
'app_tag' => env('APP_TAG','5.7.45'),
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', false),