From dd39a0740d9c1803fc60a1238181d96f804955c4 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 2 Sep 2011 10:47:56 +0200 Subject: [PATCH 1/3] Add ProfId for Colombia --- htdocs/langs/ca_ES/companies.lang | 24 ++++++++++++++++++++++++ htdocs/langs/en_US/companies.lang | 5 +++++ htdocs/langs/es_ES/companies.lang | 8 +++++++- htdocs/langs/fr_FR/companies.lang | 5 +++++ 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/ca_ES/companies.lang b/htdocs/langs/ca_ES/companies.lang index df7dbb0ab90..15ed7c233f6 100644 --- a/htdocs/langs/ca_ES/companies.lang +++ b/htdocs/langs/ca_ES/companies.lang @@ -103,68 +103,92 @@ ProfId1AR=CUIT/CUIL ProfId2AR=Ingressos bruts ProfId3AR=- ProfId4AR=- +ProfId5AR=- ProfId1AU=ABN ProfId2AU=- ProfId3AU=- ProfId4AU=- +ProfId5AU=- ProfId1BE=N° col·legiat ProfId2BE=- ProfId3BE=- ProfId4BE=- +ProfId5BE=- ProfId1CH=- ProfId2CH=- ProfId3CH=Número federat ProfId4CH=Num registre de comerç +ProfId5CH=- ProfId1CL=R.U.T. ProfId2CL=- ProfId3CL=- ProfId4CL=- +ProfId5CL=- +ProfId1CO=R.U.T. +ProfId2CO=- +ProfId3CO=- +ProfId4CO=- +ProfId5CO=- ProfId1DE=Id prof. 1 (USt.-IdNr) ProfId2DE=Id prof. 2 (USt.-Nr) ProfId3DE=Id prof. 3 (Handelsregister-Nr.) ProfId4DE=- +ProfId5DE=- ProfId1ES=CIF/NIF ProfId2ES=Núm seguretat social ProfId3ES=CNAE ProfId4ES=Núm col·legiat +ProfId5ES=- ProfId1FR=SIREN ProfId2FR=SIRET ProfId3FR=NAF (Ex APE) ProfId4FR=RCS/RM +ProfId5FR=- ProfId1GB=Número registre ProfId2GB=- ProfId3GB=SIC ProfId4GB=- +ProfId5GB=- ProfId1HN=RTN ProfId2HN=- ProfId3HN=- ProfId4HN=- +ProfId5HN=- ProfId1IN=Id prof. 1 (TIN) ProfId2IN=Id prof. 2 ProfId3IN=Id prof. 3 ProfId4IN=Id prof. 4 +ProfId5IN=Id prof. 5 ProfId1MA=Id prof. 1 (R.C.) ProfId2MA=Id prof. 2 (Patente) ProfId3MA=Id prof. 3 (I.F.) ProfId4MA=Id prof. 4 (C.N.S.S.) +ProfId5MA=- ProfId1MX=R.F.C. ProfId2MX=Registre Patronal IMSS ProfId3MX=Cèdula Professional ProfId4MX=- +ProfId5MX=- ProfId1NL=Número KVK ProfId2NL=- ProfId3NL=- ProfId4NL=- +ProfId5NL=- ProfId1PT=NIPC ProfId2PT=Núm seguretat social ProfId3PT=Num reg. comercial ProfId4PT=Conservatori +ProfId5PT=- ProfId1SN=RC ProfId2SN=NINEA +ProfId3SN=- +ProfId4SN=- +ProfId5SN=- ProfId1TN=RC ProfId2TN=Matrícula fiscal ProfId3TN=Codi en aduana ProfId4TN=CCC +ProfId5TN=- VATIntra=NIF intracomunitari VATIntraShort=NIF intra. VATIntraVeryShort=NIF intra. diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index e15673b8595..fce01b756c9 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -122,6 +122,11 @@ ProfId2CL=- ProfId3CL=- ProfId4CL=- ProfId5CL=- +ProfId1CO=Prof Id 1 (R.U.T.) +ProfId2CO=- +ProfId3CO=- +ProfId4CO=- +ProfId5CO=- ProfId1DE=Prof Id 1 (USt.-IdNr) ProfId2DE=Prof Id 2 (USt.-Nr) ProfId3DE=Prof Id 3 (Handelsregister-Nr.) diff --git a/htdocs/langs/es_ES/companies.lang b/htdocs/langs/es_ES/companies.lang index 7f2e6f9fdf4..06e92f88721 100644 --- a/htdocs/langs/es_ES/companies.lang +++ b/htdocs/langs/es_ES/companies.lang @@ -118,11 +118,17 @@ ProfId1CH=- ProfId2CH=- ProfId3CH=Número federado ProfId4CH=Num registro de comercio +ProfId5CH=- ProfId1CL=R.U.T. ProfId2CL=- ProfId3CL=- ProfId4CL=- ProfId5CL=- +ProfId1CO=R.U.T. +ProfId2CO=- +ProfId3CO=- +ProfId4CO=- +ProfId5CO=- ProfId1DE=Id prof. 1 (USt.-IdNr) ProfId2DE=Id prof. 2 (USt.-Nr) ProfId3DE=Id prof. 3 (Handelsregister-Nr.) @@ -174,7 +180,7 @@ ProfId3PT=Num reg. comercial ProfId4PT=Conservatorio ProfId5PT=- ProfId1SN=RC -ProfId2SN=- +ProfId2SN=NINEA ProfId3SN=- ProfId4SN=- ProfId5SN=- diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index 5807ac75739..528514e8773 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -124,6 +124,11 @@ ProfId2CL=- ProfId3CL=- ProfId4CL=- ProfId5CL=- +ProfId1CO=Prof Id 1 (R.U.T.) +ProfId2CO=- +ProfId3CO=- +ProfId4CO=- +ProfId5CO=- ProfId1DE=Id prof. 1 (USt.-IdNr) ProfId2DE=Id prof. 2 (USt.-Nr) ProfId3DE=Id prof. 3 (Handelsregister-Nr.) From 1a4761016ba287a1062420f08ac11a18750fb33e Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 2 Sep 2011 12:29:38 +0200 Subject: [PATCH 2/3] Fix: bug #34192: Some Spanish bank accounts give control key error, although they are correct --- htdocs/lib/bank.lib.php | 71 ++++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 23 deletions(-) diff --git a/htdocs/lib/bank.lib.php b/htdocs/lib/bank.lib.php index b98da9b9e98..14445894a9d 100644 --- a/htdocs/lib/bank.lib.php +++ b/htdocs/lib/bank.lib.php @@ -160,33 +160,58 @@ function checkBanForAccount($account) */ function CheckES($IentOfi,$InumCta) { - $APesos = Array(1,2,4,8,5,10,9,7,3,6); // Array de "pesos" - $DC1=0; - $DC2=0; - $x=8; - while($x>0) { - $digito=$IentOfi[$x-1]; - $DC1=$DC1+($APesos[$x+2-1]*($digito)); - $x = $x - 1; + if (empty($IentOfi)||empty($InumCta)||strlen($IentOfi)!=8||strlen($InumCta)!=10) + { + $keycontrol =""; + return $keycontrol; } - $Resto = $DC1%11; - $DC1=11-$Resto; - if ($DC1==10) $DC1=1; - if ($DC1==11) $DC1=0; // Digito control Entidad-Oficina - $x=10; - while($x>0) { - $digito=$InumCta[$x-1]; - $DC2=$DC2+($APesos[$x-1]*($digito)); - $x = $x - 1; + $ccc= $IentOfi . $InumCta; + $numbers = "1234567890"; + + $i = 0; + + while ($i<=strlen($ccc)-1) + { + if (strpos($numbers,substr($ccc,$i,1)) === false) + { + $keycontrol =""; + return $keycontrol; + } + $i++; + } + + $values = array(1,2,4,8,5,10,9,7,3,6); + $sum = 0; + + for($i=2; $i<10; $i++) + + { + $sum += $values[$i] * substr($IentOfi, $i-2, 1); + } + + $key = 11-$sum%11; + + if ($key==10) $key=1; + if ($key==11) $key=0; + + $keycontrol = $key; + + $sum = 0; + + for($i=0; $i<11; $i++) + + { + $sum += $values[$i] * substr($InumCta,$i, 1); } - $Resto = $DC2%11; - $DC2=11-$Resto; - if ($DC2==10) $DC1=1; - if ($DC2==11) $DC1=0; // Digito Control C/C - $DigControl=($DC1)."".($DC2); // los 2 numeros del D.C. - return $DigControl; + $key = 11-$sum%11; + + if ($key==10) $key=1; + if ($key==11) $key=0; + + $keycontrol .= $key; + return $keycontrol; } From 05a0d07ffb9de08d08aac5f47ebe5db0b035854a Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 2 Sep 2011 17:25:58 +0200 Subject: [PATCH 3/3] Trad: missing trad --- htdocs/langs/ca_ES/other.lang | 19 +++++++++++++++++++ htdocs/langs/en_US/other.lang | 20 ++++++++++++++++++++ htdocs/langs/es_ES/other.lang | 19 +++++++++++++++++++ htdocs/langs/fr_FR/other.lang | 19 +++++++++++++++++++ 4 files changed, 77 insertions(+) diff --git a/htdocs/langs/ca_ES/other.lang b/htdocs/langs/ca_ES/other.lang index 202e3948b9f..5e9c1fead12 100644 --- a/htdocs/langs/ca_ES/other.lang +++ b/htdocs/langs/ca_ES/other.lang @@ -35,6 +35,25 @@ Notify_PROPAL_VALIDATE=Validació pressupost client Notify_WITHDRAW_TRANSMIT=Transmissió domiciliació Notify_WITHDRAW_CREDIT=Abonament domiciliació Notify_WITHDRAW_EMIT=Emissió domiciliació +Notify_COMPANY_CREATE=Creació tercer +Notify_PROPAL_SENTBYMAIL=Enviament pressupost per e-mail +Notify_ORDER_SENTBYMAIL=Enviament comanda de client per e-mail +Notify_BILL_PAYED=Cobrament factura a client +Notify_BILL_CANCEL=Cancel·lació factura a client +Notify_BILL_SENTBYMAIL=Enviament factura a client per e-mail +Notify_ORDER_SUPPLIER_VALIDATE=Validació comanda a proveïdor +Notify_ORDER_SUPPLIER_SENTBYMAIL=Enviament comanda a proveïdor per e-mail +Notify_BILL_SUPPLIER_VALIDATE=Validació factura de proveïdor +Notify_BILL_SUPPLIER_PAYED=Pagament factura de proveïdor +Notify_BILL_SUPPLIER_SENTBYMAIL=Enviament factura de proveïdor per e-mail +Notify_CONTRACT_VALIDATE=Validació contracte +Notify_FICHEINTER_VALIDATE=Validació intervenció +Notify_SHIPPING_VALIDATE=Validació enviament +Notify_SHIPPING_SENTBYMAIL=Enviament expedició per e-mail +Notify_MEMBER_VALIDATE=Validació membre +Notify_MEMBER_SUBSCRIPTION=Afiliació membre +Notify_MEMBER_RESILIATE=Baixa membre +Notify_MEMBER_DELETE=Eliminació membre NbOfAttachedFiles=Número arxius/documents adjunts TotalSizeOfAttachedFiles=Mida total dels arxius/documents adjunts MaxSize=Tamany màxim diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 3c909792a01..73b9a6ff46b 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -35,6 +35,26 @@ Notify_PROPAL_VALIDATE=Customer proposal validated Notify_WITHDRAW_TRANSMIT=Transmission withdrawal Notify_WITHDRAW_CREDIT=Credit withdrawal Notify_WITHDRAW_EMIT=Isue withdrawal +Notify_ORDER_SENTBYMAIL=Customer order sent by mail +Notify_COMPANY_CREATE=Third party created +Notify_PROPAL_SENTBYMAIL=Commercial proposal sent by mail +Notify_ORDER_SENTBYMAIL=Envío pedido por e-mail +Notify_BILL_PAYED=Customer invoice payed +Notify_BILL_CANCEL=Customer invoice canceled +Notify_BILL_SENTBYMAIL=Customer invoice sent by mail +Notify_ORDER_SUPPLIER_VALIDATE=Supplier order validated +Notify_ORDER_SUPPLIER_SENTBYMAIL=Supplier order sent by mail +Notify_BILL_SUPPLIER_VALIDATE=Supplier invoice validated +Notify_BILL_SUPPLIER_PAYED=Supplier invoice payed +Notify_BILL_SUPPLIER_SENTBYMAIL=Supplier invoice sent by mail +Notify_CONTRACT_VALIDATE=Contract validated +Notify_FICHEINTER_VALIDATE=Intervention validated +Notify_SHIPPING_VALIDATE=Shipping validated +Notify_SHIPPING_SENTBYMAIL=Shipping sent by mail +Notify_MEMBER_VALIDATE=Member validated +Notify_MEMBER_SUBSCRIPTION=Member subscribed +Notify_MEMBER_RESILIATE=Member resiliated +Notify_MEMBER_DELETE=Member deleted NbOfAttachedFiles=Number of attached files/documents TotalSizeOfAttachedFiles=Total size of attached files/documents MaxSize=Maximum size diff --git a/htdocs/langs/es_ES/other.lang b/htdocs/langs/es_ES/other.lang index 647e050d253..e82216816f0 100644 --- a/htdocs/langs/es_ES/other.lang +++ b/htdocs/langs/es_ES/other.lang @@ -35,6 +35,25 @@ Notify_PROPAL_VALIDATE=Validación presupuesto cliente Notify_WITHDRAW_TRANSMIT=Transmisión domiciliación Notify_WITHDRAW_CREDIT=Abono domiciliación Notify_WITHDRAW_EMIT=Emisión domiciliación +Notify_COMPANY_CREATE=Creación tercero +Notify_PROPAL_SENTBYMAIL=Envío presupuesto por e-mail +Notify_ORDER_SENTBYMAIL=Envío pedido de cliente por e-mail +Notify_BILL_PAYED=Cobro factura a cliente +Notify_BILL_CANCEL=Cancelación factura a cliente +Notify_BILL_SENTBYMAIL=Envío factura a cliente por e-mail +Notify_ORDER_SUPPLIER_VALIDATE=Validación pedido a proveedor +Notify_ORDER_SUPPLIER_SENTBYMAIL=Envío pedido a proveedor por e-mail +Notify_BILL_SUPPLIER_VALIDATE=Validación factura de proveedor +Notify_BILL_SUPPLIER_PAYED=Pago factura de proveedor +Notify_BILL_SUPPLIER_SENTBYMAIL=Envío factura de proveedor por e-mail +Notify_CONTRACT_VALIDATE=Validación contrato +Notify_FICHEINTER_VALIDATE=Validación intervención +Notify_SHIPPING_VALIDATE=Validación envío +Notify_SHIPPING_SENTBYMAIL=Envío expedición por e-mail +Notify_MEMBER_VALIDATE=Validación miembro +Notify_MEMBER_SUBSCRIPTION=Afiliación miembro +Notify_MEMBER_RESILIATE=Baja miembro +Notify_MEMBER_DELETE=Eliminación miembro NbOfAttachedFiles=Número archivos/documentos adjuntos TotalSizeOfAttachedFiles=Tamaño total de los archivos/documentos adjuntos MaxSize=Tamaño máximo diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index 7266bedcf38..14f89b68aeb 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -35,6 +35,25 @@ Notify_PROPAL_VALIDATE=Validation proposition commerciale client Notify_WITHDRAW_TRANSMIT=Transmission prélèvement Notify_WITHDRAW_CREDIT=Créditer prélèvement Notify_WITHDRAW_EMIT=Emission prélèvement +Notify_COMPANY_CREATE=Créer tiers +Notify_PROPAL_SENTBYMAIL=Envoi propale par email +Notify_ORDER_SENTBYMAIL=Envoi commande client par email +Notify_BILL_PAYED=Recouvrement facture client +Notify_BILL_CANCEL=Annulation facture client +Notify_BILL_SENTBYMAIL=Envoi facture client par email +Notify_ORDER_SUPPLIER_VALIDATE=Validation commande fournisseur +Notify_ORDER_SUPPLIER_SENTBYMAIL=Envoi commande fournisseur par email +Notify_BILL_SUPPLIER_VALIDATE=Validation facture fournisseur +Notify_BILL_SUPPLIER_PAYED=Paiment facture fournisseur +Notify_BILL_SUPPLIER_SENTBYMAIL=Envoi facture fournisseur par email +Notify_CONTRACT_VALIDATE=Validation contrat +Notify_FICHEINTER_VALIDATE=Validation fiche d'intervention +Notify_SHIPPING_VALIDATE=Validation d'expédition +Notify_SHIPPING_SENTBYMAIL=Envoi d'expedition par email +Notify_MEMBER_VALIDATE=Validation adhérent +Notify_MEMBER_SUBSCRIPTION=Affiliation adhérent +Notify_MEMBER_RESILIATE=Résiliée adhérent +Notify_MEMBER_DELETE=Effacée adhérent NbOfAttachedFiles=Nombre de fichiers/documents liés TotalSizeOfAttachedFiles=Taille total fichiers/documents liés MaxSize=Taille maximum