From ee09db0e55f2f472da11eb77e8df09f12df94a52 Mon Sep 17 00:00:00 2001 From: sonikf <93765174+sonikf@users.noreply.github.com> Date: Tue, 12 Sep 2023 00:44:22 +0300 Subject: [PATCH] Retrieve vat details from the Greek Ministry of Finance GSIS SOAP web service and autocomplete third party fields --- htdocs/societe/card.php | 83 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 73 insertions(+), 10 deletions(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index b69448ff7fa..6b827571d80 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -13,6 +13,8 @@ * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018-2022 Frédéric France + * Copyright (C) 2022-2023 George Gkantinas + * Copyright (C) 2023 Nick Fragoulis * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -63,6 +65,12 @@ if (isModEnabled('eventorganization')) { require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php'; } +if ($mysoc->country_code == 'GR') { + $u = $conf->global->AADE_WEBSERVICE_USER; + $p = $conf->global->AADE_WEBSERVICE_KEY; + $myafm = $mysoc->tva_intra; +} + // Load translation files required by the page @@ -385,13 +393,13 @@ if (empty($reshook)) { } if ($action == 'set_localtax1') { - //obtidre selected del combobox + //get selected from combobox $value = GETPOST('lt1'); $object->fetch($socid); $res = $object->setValueFrom('localtax1_value', $value, '', null, 'text', '', $user, 'COMPANY_MODIFY'); } if ($action == 'set_localtax2') { - //obtidre selected del combobox + //get selected from combobox $value = GETPOST('lt2'); $object->fetch($socid); $res = $object->setValueFrom('localtax2_value', $value, '', null, 'text', '', $user, 'COMPANY_MODIFY'); @@ -895,7 +903,7 @@ if (empty($reshook)) { break; } } - // Gestion du logo de la société + // Company logo management // Update linked member @@ -1187,7 +1195,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $object->logo = (isset($_FILES['photo']) ?dol_sanitizeFileName($_FILES['photo']['name']) : ''); - // Gestion du logo de la société + // Company logo management $dir = $conf->societe->multidir_output[$conf->entity]."/".$object->id."/logos"; $file_OK = (isset($_FILES['photo']) ?is_uploaded_file($_FILES['photo']['tmp_name']) : false); if ($file_OK) { @@ -1728,8 +1736,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print "\n"; print ''; print "\n"; $s .= ''.$langs->trans("VATIntraCheck").''; @@ -1957,7 +1968,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } } $modCodeClient = new $module($db); - // We verified if the tag prefix is used + // We check if the prefix tag is used if ($modCodeClient->code_auto) { $prefixCustomerIsUsed = $modCodeClient->verif_prefixIsUsed(); } @@ -1973,7 +1984,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } } $modCodeFournisseur = new $module($db); - // On verifie si la balise prefix est utilisee + // We check if the prefix tag is used if ($modCodeFournisseur->code_auto) { $prefixSupplierIsUsed = $modCodeFournisseur->verif_prefixIsUsed(); } @@ -2500,7 +2511,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print "\n"; print ''; print "\n"; @@ -2968,7 +2983,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print "\n"; print ''; print "\n"; @@ -3339,3 +3358,47 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // End of page llxFooter(); $db->close(); + +?> + +