diff --git a/ChangeLog b/ChangeLog index 601e72cdccd..9a0e3d99955 100644 --- a/ChangeLog +++ b/ChangeLog @@ -59,10 +59,10 @@ For developers: modules. WARNING: If you used external modules, some of them may need to be upgraded due to: -- fields of classes were renamed to be normalized (nom, prenom, cp, ville, adresse were - renamed into lastname, firstname, zip, town, address). +- Fields of classes were renamed to be normalized (nom, prenom, cp, ville, adresse, tel + were renamed into lastname, firstname, zip, town, address, phone). This may also be true for some fields into web services. -- if module use hook pdf_writelinedesc, module may have to add return 1 at end of +- If module use hook pdf_writelinedesc, module may have to add return 1 at end of function to keep same behaviour. @@ -77,6 +77,9 @@ WARNING: If you used external modules, some of them may need to be upgraded due - Fix: [ bug #787 ] Invoice supplier box incorrect tooltip when delay on payment - Fix: [ bug #794 ] Lost filter on zipcode in prospect list - Fix: [ bug #774 ] Bug on creating event with box "all day" crossed +- Fix: [ bug #817 ] Purchases journal does not reflect localtaxes +- Fix: [ bug #816 ] Sales journal does not reflect localtaxes +- Fix: Orderstoinvoice didn't act as expected when no order was checked diff --git a/htdocs/adherents/admin/adherent_extrafields.php b/htdocs/adherents/admin/adherent_extrafields.php index 2fa5af1cc1b..ef986dacbbb 100755 --- a/htdocs/adherents/admin/adherent_extrafields.php +++ b/htdocs/adherents/admin/adherent_extrafields.php @@ -58,8 +58,6 @@ require DOL_DOCUMENT_ROOT.'/core/admin_extrafields.inc.php'; * View */ -$textobject=$langs->transnoentitiesnoconv("Members"); - $help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros'; llxHeader('',$langs->trans("MembersSetup"),$help_url); @@ -73,7 +71,7 @@ $head = member_admin_prepare_head(); dol_fiche_head($head, 'attributes', $langs->trans("Members"), 0, 'user'); -print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n"; +print $langs->trans("DefineHereComplementaryAttributes", $langs->transnoentitiesnoconv("Members")).'
'."\n"; print '
'; // Load attribute_label diff --git a/htdocs/admin/agenda_extrafields.php b/htdocs/admin/agenda_extrafields.php index d66a91ba62c..ac66f3cb44f 100644 --- a/htdocs/admin/agenda_extrafields.php +++ b/htdocs/admin/agenda_extrafields.php @@ -76,8 +76,7 @@ $head=agenda_prepare_head(); dol_fiche_head($head, 'attributes', $langs->trans("Agenda")); - -print $langs->trans("DefineHereComplementaryAttributes",$textobject).'
'."\n"; +print $langs->trans("DefineHereComplementaryAttributes", $langs->transnoentitiesnoconv("Agenda")).'
'."\n"; print '
'; // Load attribute_label @@ -155,4 +154,4 @@ if ($action == 'edit' && ! empty($attrname)) llxFooter(); $db->close(); -?> \ No newline at end of file +?> diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 23295efa17a..861a15bfebc 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -196,6 +196,14 @@ else if ($action=='setModuleOptions') { $conf->global->COMMANDE_ADDON_PDF_ODT_PATH = GETPOST('value1'); } } +else if ($action=='setModuleOptions') { + if (dolibarr_set_const($db, "COMMANDE_ADDON_PDF_ODT_PATH",GETPOST('value1'),'chaine',0,'',$conf->entity)) + { + // La constante qui a ete lue en avant du nouveau set + // on passe donc par une variable pour avoir un affichage coherent + $conf->global->COMMANDE_ADDON_PDF_ODT_PATH = GETPOST('value1'); + } +} /* diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 5bb0e85de84..075f975adb2 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -98,14 +98,14 @@ if ($action == 'set') if ($_POST[$option['constant']]) { dolibarr_del_const($db, $option['constant'], 0); - dolibarr_set_const($db, $option['constant'], $_POST[$option['constant']], 'chaine'); + dolibarr_set_const($db, $option['constant'], $_POST[$option['constant']], 'chaine',0, '', 0); } } } } } - dolibarr_set_const($db, 'SYSLOG_HANDLERS', json_encode($activeModules), 'chaine'); + dolibarr_set_const($db, 'SYSLOG_HANDLERS', json_encode($activeModules), 'chaine',0,'',0); if (! $error) { diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index c709b2b4bbd..a6b2fe44a1f 100755 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -51,37 +51,32 @@ $sref = GETPOST('sref'); $sref_client = GETPOST('sref_client'); $sall = GETPOST('sall'); $socid = GETPOST('socid','int'); +$selected = GETPOST('orders_to_invoice'); +$sortfield = GETPOST("sortfield",'alpha'); +$sortorder = GETPOST("sortorder",'alpha'); +$viewstatut = GETPOST('viewstatut'); - -$sortfield = GETPOST("sortfield",'alpha'); -$sortorder = GETPOST("sortorder",'alpha'); if (! $sortfield) $sortfield='c.rowid'; if (! $sortorder) $sortorder='DESC'; -$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); // Date for local PHP server -$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]); -$date_starty=dol_mktime(0,0,0,$_REQUEST["date_start_delymonth"],$_REQUEST["date_start_delyday"],$_REQUEST["date_start_delyyear"]); // Date for local PHP server -$date_endy=dol_mktime(23,59,59,$_REQUEST["date_end_delymonth"],$_REQUEST["date_end_delyday"],$_REQUEST["date_end_delyyear"]); -$selected=GETPOST('orders_to_invoice'); -$action=GETPOST('action','alpha'); +$now = dol_now(); +$date_start = dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]); // Date for local PHP server +$date_end = dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]); +$date_starty = dol_mktime(0,0,0,$_REQUEST["date_start_delymonth"],$_REQUEST["date_start_delyday"],$_REQUEST["date_start_delyyear"]); // Date for local PHP server +$date_endy = dol_mktime(23,59,59,$_REQUEST["date_end_delymonth"],$_REQUEST["date_end_delyday"],$_REQUEST["date_end_delyyear"]); + if ($action == 'create') { - if (! is_array($selected)) + if (is_array($selected) == false) { - $mesgs[]='
'.$langs->trans('Error_OrderNotChecked').'
'; + $mesgs = array('
'.$langs->trans('Error_OrderNotChecked').'
'); } else { - $socid=GETPOST('socid'); - $action=GETPOST('action'); - $origin=GETPOST('origin'); - $originid=GETPOST('originid'); + $origin = GETPOST('origin'); + $originid = GETPOST('originid'); } } -$now=dol_now(); - -$viewstatut=GETPOST('viewstatut'); - /* * Actions @@ -358,7 +353,7 @@ $formfile = new FormFile($db); $companystatic = new Societe($db); // Mode creation -if ($action == 'create') +if ($action == 'create' && empty($mesgs)) { $facturestatic=new Facture($db); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 7f003b4503b..3cc3677d301 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2161,7 +2161,9 @@ if ($action == 'create') print ''; $newclassname=$classname; - if ($newclassname=='Propal') $newclassname='CommercialProposal'; + if ($newclassname == 'Propal') $newclassname = 'CommercialProposal'; + elseif ($newclassname == 'Commande') $newclassname = 'Order'; + print ''.$langs->trans($newclassname).''.$objectsrc->getNomUrl(1).''; print ''.$langs->trans('TotalHT').''.price($objectsrc->total_ht).''; print ''.$langs->trans('TotalVAT').''.price($objectsrc->total_tva).""; @@ -2870,7 +2872,7 @@ else if ($id > 0 || ! empty($ref)) if (($object->statut == 2 || $object->statut == 3) && $object->close_code == 'discount_vat') { print ''; - print $form->textwithpicto($langs->trans("Escompte").':',$langs->trans("HelpEscompte"),-1); + print $form->textwithpicto($langs->trans("Discount").':',$langs->trans("HelpEscompte"),-1); print ''.price($object->total_ttc - $creditnoteamount - $depositamount - $totalpaye).' '; $resteapayeraffiche=0; } diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 96d5fd8bf86..f24ad4c3837 100755 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -24,6 +24,8 @@ * \ingroup societe, fournisseur, facture * \brief Page with purchases journal */ +global $mysoc; + require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -58,7 +60,7 @@ if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accountin * View */ -llxHeader('','',''); +llxHeader('',$langs->trans("PurchasesJournal"),''); $form=new Form($db); @@ -94,12 +96,15 @@ $p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY); $idpays = $p[0]; $sql = "SELECT f.rowid, f.facnumber, f.type, f.datef, f.libelle,"; -$sql.= " fd.total_ttc, fd.tva_tx, fd.total_ht, fd.tva as total_tva, fd.product_type,"; +$sql.= " fd.total_ttc, fd.tva_tx, fd.total_ht, fd.tva as total_tva, fd.product_type, fd.localtax1_tx, fd.localtax2_tx, fd.total_localtax1, fd.total_localtax2,"; $sql.= " s.rowid as socid, s.nom as name, s.code_compta_fournisseur,"; $sql.= " p.rowid as pid, p.ref as ref, p.accountancy_code_buy,"; -$sql.= " ct.accountancy_code_buy as account_tva, ct.recuperableonly"; +$sql.= " ct.accountancy_code_buy as account_tva, ct.recuperableonly,"; +$sql.= " ctl1.accountancy_code_buy as account_localtax1, ctl2.accountancy_code_buy as account_localtax2"; $sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn_det fd"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ct ON fd.tva_tx = ct.taux AND fd.info_bits = ct.recuperableonly AND ct.fk_pays = '".$idpays."'"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ctl1 ON fd.localtax1_tx = ctl1.localtax1 AND ctl1.fk_pays = '".$idpays."'"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ctl2 ON fd.localtax2_tx = ctl2.localtax2 AND ctl2.fk_pays = '".$idpays."'"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product p ON p.rowid = fd.fk_product"; $sql.= " JOIN ".MAIN_DB_PREFIX."facture_fourn f ON f.rowid = fd.fk_facture_fourn"; $sql.= " JOIN ".MAIN_DB_PREFIX."societe s ON s.rowid = f.fk_soc" ; @@ -120,6 +125,8 @@ if ($result) $tabht = array(); $tabtva = array(); $tabttc = array(); + $tablocaltax1 = array(); + $tablocaltax2 = array(); $tabcompany = array(); $i=0; @@ -135,6 +142,8 @@ if ($result) else $compta_prod = (! empty($conf->global->COMPTA_SERVICE_BUY_ACCOUNT)?$conf->global->COMPTA_SERVICE_BUY_ACCOUNT:$langs->trans("CodeNotDef")); } $compta_tva = (! empty($obj->account_tva)?$obj->account_tva:$cpttva); + $compta_localtax1 = (! empty($obj->account_localtax1)?$obj->account_localtax1:$langs->trans("CodeNotDef")); + $compta_localtax2 = (! empty($obj->account_localtax2)?$obj->account_localtax2:$langs->trans("CodeNotDef")); $tabfac[$obj->rowid]["date"] = $obj->datef; $tabfac[$obj->rowid]["ref"] = $obj->facnumber; @@ -142,8 +151,9 @@ if ($result) $tabfac[$obj->rowid]["lib"] = $obj->libelle; $tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc; $tabht[$obj->rowid][$compta_prod] += $obj->total_ht; - if($obj->recuperableonly != 1) - $tabtva[$obj->rowid][$compta_tva] += $obj->total_tva; + if ($obj->recuperableonly != 1) $tabtva[$obj->rowid][$compta_tva] += $obj->total_tva; + $tablocaltax1[$obj->rowid][$compta_localtax1] += $obj->total_localtax1; + $tablocaltax2[$obj->rowid][$compta_localtax2] += $obj->total_localtax2; $tabcompany[$obj->rowid]=array('id'=>$obj->socid,'name'=>$obj->name); $i++; @@ -194,7 +204,6 @@ foreach ($tabfac as $key => $val) } } // vat - //var_dump($tabtva); foreach ($tabtva[$key] as $k => $mt) { if ($mt) @@ -203,12 +212,42 @@ foreach ($tabfac as $key => $val) //print "".$conf->global->COMPTA_JOURNAL_BUY.""; print "".$val["date"].""; print "".$invoicestatic->getNomUrl(1).""; - print "".$k."".$langs->trans("VAT")." ".$key.""; + print "".$k."".$langs->trans("VAT").""; print ''.($mt>=0?price($mt):'').""; print ''.($mt<0?price(-$mt):'').""; print ""; } } + // localtax1 + foreach ($tablocaltax1[$key] as $k => $mt) + { + if ($mt) + { + print ""; + //print "".$conf->global->COMPTA_JOURNAL_BUY.""; + print "".$val["date"].""; + print "".$invoicestatic->getNomUrl(1).""; + print "".$k."".$langs->transcountrynoentities("LT1",$mysoc->country_code).""; + print "".($mt>=0?price($mt):'').""; + print "".($mt<0?price(-$mt):'').""; + print ""; + } + } + // localtax2 + foreach ($tablocaltax2[$key] as $k => $mt) + { + if ($mt) + { + print ""; + //print "".$conf->global->COMPTA_JOURNAL_BUY.""; + print "".$val["date"].""; + print "".$invoicestatic->getNomUrl(1).""; + print "".$k."".$langs->transcountrynoentities("LT2",$mysoc->country_code).""; + print "".($mt>=0?price($mt):'').""; + print "".($mt<0?price(-$mt):'').""; + print ""; + } + } print ""; // third party //print "".$conf->global->COMPTA_JOURNAL_BUY.""; diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 1e35607b1bb..ddb12839bf4 100755 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -4,6 +4,7 @@ * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2012 Regis Houssin * Copyright (C) 2011-2012 Alexandre Spangaro + * Copyright (C) 2013 Marcos García * * 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 @@ -24,6 +25,8 @@ * \ingroup societe, facture * \brief Page with sells journal */ +global $mysoc; + require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -96,15 +99,18 @@ $p = explode(":", $conf->global->MAIN_INFO_SOCIETE_COUNTRY); $idpays = $p[0]; $sql = "SELECT f.rowid, f.facnumber, f.type, f.datef, f.ref_client,"; -$sql.= " fd.product_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.total_ttc,"; +$sql.= " fd.product_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.total_ttc, fd.localtax1_tx, fd.localtax2_tx, fd.total_localtax1, fd.total_localtax2,"; $sql.= " s.rowid as socid, s.nom as name, s.code_compta, s.client,"; $sql.= " p.rowid as pid, p.ref as pref, p.accountancy_code_sell,"; -$sql.= " ct.accountancy_code_sell as account_tva, ct.recuperableonly"; +$sql.= " ct.accountancy_code_sell as account_tva, ct.recuperableonly,"; +$sql.= " ctl1.accountancy_code_sell as account_localtax1, ctl2.accountancy_code_sell as account_localtax2"; $sql.= " FROM ".MAIN_DB_PREFIX."facturedet fd"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product p ON p.rowid = fd.fk_product"; $sql.= " JOIN ".MAIN_DB_PREFIX."facture f ON f.rowid = fd.fk_facture"; $sql.= " JOIN ".MAIN_DB_PREFIX."societe s ON s.rowid = f.fk_soc"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ct ON fd.tva_tx = ct.taux AND fd.info_bits = ct.recuperableonly AND ct.fk_pays = '".$idpays."'"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ctl1 ON fd.localtax1_tx = ctl1.localtax1 AND ctl1.fk_pays = '".$idpays."'"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ctl2 ON fd.localtax2_tx = ctl2.localtax2 AND ctl2.fk_pays = '".$idpays."'"; $sql.= " WHERE f.entity = ".$conf->entity; $sql.= " AND f.fk_statut > 0"; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql.= " AND f.type IN (0,1,2)"; @@ -119,6 +125,8 @@ if ($result) $tabfac = array(); $tabht = array(); $tabtva = array(); + $tablocaltax1 = array(); + $tablocaltax2 = array(); $tabttc = array(); $tabcompany = array(); @@ -139,6 +147,8 @@ if ($result) } $cpttva = (! empty($conf->global->COMPTA_VAT_ACCOUNT)?$conf->global->COMPTA_VAT_ACCOUNT:$langs->trans("CodeNotDef")); $compta_tva = (! empty($obj->account_tva)?$obj->account_tva:$cpttva); + $compta_localtax1 = (! empty($obj->account_localtax1)?$obj->account_localtax1:$langs->trans("CodeNotDef")); + $compta_localtax2 = (! empty($obj->account_localtax2)?$obj->account_localtax2:$langs->trans("CodeNotDef")); //la ligne facture $tabfac[$obj->rowid]["date"] = $obj->datef; @@ -147,10 +157,13 @@ if ($result) if (! isset($tabttc[$obj->rowid][$compta_soc])) $tabttc[$obj->rowid][$compta_soc]=0; if (! isset($tabht[$obj->rowid][$compta_prod])) $tabht[$obj->rowid][$compta_prod]=0; if (! isset($tabtva[$obj->rowid][$compta_tva])) $tabtva[$obj->rowid][$compta_tva]=0; + if (! isset($tablocaltax1[$obj->rowid][$compta_localtax1])) $tablocaltax1[$obj->rowid][$compta_localtax1]=0; + if (! isset($tablocaltax2[$obj->rowid][$compta_localtax2])) $tablocaltax2[$obj->rowid][$compta_localtax2]=0; $tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc; $tabht[$obj->rowid][$compta_prod] += $obj->total_ht; - if($obj->recuperableonly != 1) - $tabtva[$obj->rowid][$compta_tva] += $obj->total_tva; + if($obj->recuperableonly != 1) $tabtva[$obj->rowid][$compta_tva] += $obj->total_tva; + $tablocaltax1[$obj->rowid][$compta_localtax1] += $obj->total_localtax1; + $tablocaltax2[$obj->rowid][$compta_localtax2] += $obj->total_localtax2; $tabcompany[$obj->rowid]=array('id'=>$obj->socid, 'name'=>$obj->name, 'client'=>$obj->client); $i++; } @@ -216,7 +229,6 @@ foreach ($tabfac as $key => $val) } } // vat - //var_dump($tabtva); foreach ($tabtva[$key] as $k => $mt) { if ($mt) @@ -229,6 +241,32 @@ foreach ($tabfac as $key => $val) print "".$langs->trans("VAT")."".($mt<0?price(-$mt):'')."".($mt>=0?price($mt):'').""; } } + // localtax1 + foreach ($tablocaltax1[$key] as $k => $mt) + { + if ($mt) + { + print ""; + //print "".$conf->global->COMPTA_JOURNAL_SELL.""; + print "".$val["date"].""; + print "".$invoicestatic->getNomUrl(1).""; + print "".$k; + print "".$langs->transcountrynoentities("LT1",$mysoc->country_code)."".($mt<0?price(-$mt):'')."".($mt>=0?price($mt):'').""; + } + } + // localtax2 + foreach ($tablocaltax2[$key] as $k => $mt) + { + if ($mt) + { + print ""; + //print "".$conf->global->COMPTA_JOURNAL_SELL.""; + print "".$val["date"].""; + print "".$invoicestatic->getNomUrl(1).""; + print "".$k; + print "".$langs->transcountrynoentities("LT2",$mysoc->country_code)."".($mt<0?price(-$mt):'')."".($mt>=0?price($mt):'').""; + } + } $var = !$var; } diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index 64d35cf004b..0284872cb92 100755 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -166,7 +166,7 @@ class HookManager if ($action=='update') $action='edit'; } } - + if (is_array($actionclassinstance->results)) $this->resArray =array_merge($this->resArray, $actionclassinstance->results); if (! empty($actionclassinstance->resprints)) $this->resPrint.=$actionclassinstance->resprints; } diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 53726f39460..02d3cc16a76 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1228,4 +1228,4 @@ function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('\.meta$ return $tmparray[0]; } -?> \ No newline at end of file +?> diff --git a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php index 6be7100c14e..fc225a4e22d 100755 --- a/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php +++ b/htdocs/core/modules/supplier_invoice/modules_facturefournisseur.php @@ -223,7 +223,7 @@ function supplier_invoice_pdf_create($db, $object, $modele, $outputlangs, $hided // Calls triggers include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; $interface=new Interfaces($db); - $result=$interface->run_triggers('BILL_INVOICE_BUILDDOC',$object,$user,$langs,$conf); + $result=$interface->run_triggers('BILL_SUPPLIER_BUILDDOC',$object,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // End calls triggers diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index b0c49293a78..e17755a5a4c 100755 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -559,8 +559,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $tvakey=str_replace('*','',$tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } - $totalvat =$outputlangs->transnoentities("TotalLT1",$mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey),1).$tvacompl; + $totalvat = $outputlangs->transcountrynoentities("TotalLT1",$mysoc->country_code).' '; + $totalvat.= vatrate(abs($tvakey),1).$tvacompl; $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); @@ -587,8 +587,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $tvakey=str_replace('*','',$tvakey); $tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")"; } - $totalvat =$outputlangs->transnoentities("TotalLT2",$mysoc->country_code).' '; - $totalvat.=vatrate(abs($tvakey),1).$tvacompl; + $totalvat = $outputlangs->transcountrynoentities("TotalLT2",$mysoc->country_code).' '; + $totalvat.= vatrate(abs($tvakey),1).$tvacompl; $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 75c5aa67a29..0264b6b3c3a 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -1667,7 +1667,7 @@ else print ''.$langs->trans('PriceUHT').''; print ''.$langs->trans('PriceUTTC').''; print ''.$langs->trans('Qty').''; - print ''.$langs->trans('Discount').''; + print ''.$langs->trans('ReductionShort').''; print ''.$langs->trans('TotalHTShort').''; print ''.$langs->trans('TotalTTCShort').''; print ' '; @@ -1845,7 +1845,7 @@ else print ''.$langs->trans('PriceUHT').''; print ''.$langs->trans('PriceUTTC').''; print ''.$langs->trans('Qty').''; - print ' '; + print ''.$langs->trans('ReductionShort').''; print ' '; print ' '; print ' '; @@ -1913,7 +1913,7 @@ else } print ''; print ''.$langs->trans('Qty').''; - print ' '; + print ''.$langs->trans('ReductionShort').''; print ' '; print ' '; print ''; diff --git a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql index b756659d987..eaf395a6204 100755 --- a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql +++ b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql @@ -89,7 +89,7 @@ ALTER TABLE llx_commande CHANGE COLUMN fk_demand_reason fk_input_reason integer ALTER TABLE llx_propal CHANGE COLUMN fk_demand_reason fk_input_reason integer NULL DEFAULT NULL; ALTER TABLE llx_commande_fournisseur CHANGE COLUMN fk_methode_commande fk_input_method integer NULL DEFAULT 0; -INSERT INTO llx_const (name, value, type, note, visible) values ('PRODUCT_CODEPRODUCT_ADDON','mod_codeproduct_leopard','yesno','Module to control product codes',0); +INSERT INTO llx_const (name, value, type, note, visible) values (__ENCRYPT('PRODUCT_CODEPRODUCT_ADDON')__, __ENCRYPT('mod_codeproduct_leopard')__, 'yesno', 'Module to control product codes', 0); ALTER TABLE llx_c_barcode_type ADD UNIQUE INDEX uk_c_barcode_type(code, entity); @@ -926,4 +926,7 @@ UPDATE llx_c_departements SET ncc='ALAVA', nom='Álava' WHERE code_departement=' ALTER TABLE llx_product_fournisseur_price DROP FOREIGN KEY fk_product_fournisseur; -UPDATE llx_const set name='PRODUIT_MULTI_PRICES' where name='PRODUIT_MUTLI_PRICES'; +UPDATE llx_const SET name = __ENCRYPT('PRODUIT_MULTI_PRICES')__ WHERE __DECRYPT('name')__ = 'PRODUIT_MUTLI_PRICES'; + +DELETE FROM llx_const WHERE entity <> 0 AND __DECRYPT('name')__ IN ('SYSLOG_HANDLERS','SYSLOG_LEVEL'); +UPDATE llx_const SET entity = 0 WHERE __DECRYPT('name')__ = 'SYSLOG_FILE'; diff --git a/htdocs/langs/de_AT/admin.lang b/htdocs/langs/de_AT/admin.lang index fa932d55014..079f2511689 100644 --- a/htdocs/langs/de_AT/admin.lang +++ b/htdocs/langs/de_AT/admin.lang @@ -1156,4 +1156,4 @@ WebSiteDesc=Website-Anbieter für Ihre Suche nach weiteren Modulen URL=Link OfficialMarketPlace=Offizieller Marktplatz für Module/Erweiterungen MAIN_MAIL_AUTOCOPY_TO=Senden Sie automatisch eine Blindkopie aller gesendeten Mails an -FreeLegalTextOnInterventions=Freier Rechtstext für Eingriffe \ No newline at end of file +FreeLegalTextOnInterventions=Freier Rechtstext für Eingriffe diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 1ce21c7a8f6..41b08dd399f 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -189,6 +189,7 @@ Abandoned=Abandoned RemainderToPay=Remainder to pay RemainderToTake=Remainder to take RemainderToPayBack=Remainder to pay back +Rest=Pending AmountExpected=Amount claimed ExcessReceived=Excess received EscompteOffered=Discount offered (payment before term) diff --git a/htdocs/langs/en_US/margins.lang b/htdocs/langs/en_US/margins.lang index 10a8112f87e..f4975b719c7 100644 --- a/htdocs/langs/en_US/margins.lang +++ b/htdocs/langs/en_US/margins.lang @@ -45,6 +45,7 @@ MargeBrute=Raw margin MargeNette=Net margin MARGIN_TYPE_DETAILS=Raw margin : Selling price - Buying price
Net margin : Selling price - Cost price +CostPrice=Cost price BuyingCost=Cost price UnitCharges=Unit charges Charges=Charges diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 1135fa62c44..7e4dce736ae 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -1366,7 +1366,7 @@ AccountancyCodeBuy=Código contable compras AgendaSetup=Módulo configuración de acciones y agenda PasswordTogetVCalExport=Clave de autorización vcal export link PastDelayVCalExport=No exportar los eventos de más de -AGENDA_USE_EVENT_TYPE=Use los tipos de eventos (administrables desde Configuración->Diccionarios->llx_c_actioncomm) +AGENDA_USE_EVENT_TYPE=Usar los tipos de eventos (administrables desde Configuración->Diccionarios->llx_c_actioncomm) ##### ClickToDial ##### ClickToDialDesc=Este módulo permite agregar un icono después del número de teléfono de contactos Dolibarr. Un clic en este icono, Llama a un servidor con una URL que se indica a continuación. Esto puede ser usado para llamar al sistema call center de Dolibarr que puede llamar al número de teléfono en un sistema SIP, por ejemplo. ##### Point Of Sales (CashDesk) ##### diff --git a/htdocs/langs/es_ES/bills.lang b/htdocs/langs/es_ES/bills.lang index 4429143bacf..ff1d75eb358 100644 --- a/htdocs/langs/es_ES/bills.lang +++ b/htdocs/langs/es_ES/bills.lang @@ -103,17 +103,17 @@ BillStatusValidated=Validada (a pagar) BillStatusStarted=Pagada parcialmente BillStatusNotPaid=Pendiente de pago BillStatusClosedUnpaid=Cerrada (pendiente de pago) -BillStatusClosedPaidPartially=Pagada (parcialmente) +BillStatusClosedPaidPartially=Cerrada (pagada parcialmente) BillShortStatusDraft=Borrador BillShortStatusPaid=Pagada BillShortStatusPaidBackOrConverted=Procesada BillShortStatusConverted=Tratada BillShortStatusCanceled=Abandonada BillShortStatusValidated=Validada -BillShortStatusStarted=Empezada -BillShortStatusNotPaid=Pendiente de cobro -BillShortStatusClosedUnpaid=Cerrada -BillShortStatusClosedPaidPartially=Pagada +BillShortStatusStarted=Pago parcial +BillShortStatusNotPaid=Pte. pago +BillShortStatusClosedUnpaid=Cerrada (pte. pago) +BillShortStatusClosedPaidPartially=Cerrada (pago parcial) PaymentStatusToValidShort=A validar ErrorVATIntraNotConfigured=Número de IVA intracomunitario aún no configurado ErrorNoPaiementModeConfigured=No hay definido modo de pago por defecto. Corregir desde el módulo factura @@ -184,6 +184,7 @@ Abandoned=Abandonada RemainderToPay=Queda por pagar RemainderToTake=Queda por cobrar RemainderToPayBack=Queda por reembolsar +Rest=Pendiente AmountExpected=Importe reclamado ExcessReceived=Recibido en exceso EscompteOffered=Descuento (Pronto pago) diff --git a/htdocs/langs/es_ES/compta.lang b/htdocs/langs/es_ES/compta.lang index f2e86e42739..69b3ce55846 100644 --- a/htdocs/langs/es_ES/compta.lang +++ b/htdocs/langs/es_ES/compta.lang @@ -29,8 +29,8 @@ PaymentsNotLinkedToInvoice=Pagos vinculados a ninguna factura, por lo que ningu PaymentsNotLinkedToUser=Pagos no vinculados a un usuario Profit=Beneficio Balance=Saldo -Debit=Débito -Credit=Crédito +Debit=Debe +Credit=Haber Withdrawl=Domiciliación Withdrawls=Domiciliaciones AmountHTVATRealReceived=Total repercutido @@ -164,4 +164,4 @@ Pcg_version=Versión del plan Pcg_type=Tipo de cuenta Pcg_subtype=Subtipo de cuenta InvoiceLinesToDispatch=Líneas de facturas a desglosar -InvoiceDispatched=Facturas desglosadas \ No newline at end of file +InvoiceDispatched=Facturas desglosadas diff --git a/htdocs/langs/es_ES/errors.lang b/htdocs/langs/es_ES/errors.lang index b9ba1a5083a..f3b9694e4fe 100644 --- a/htdocs/langs/es_ES/errors.lang +++ b/htdocs/langs/es_ES/errors.lang @@ -23,7 +23,7 @@ ErrorFailToCreateDir=Error al crear el directorio '%s' ErrorFailToDeleteDir=Error al eliminar el directorio '%s'. ErrorFailedToDeleteJoinedFiles=Imposible eliminar la entidad ya que tiene archivos adjuntos. Elimine antes los archivos adjuntos ErrorThisContactIsAlreadyDefinedAsThisType=Este contacto ya está definido como contacto para este tipo. -ErrorCashAccountAcceptsOnlyCashMoney=Esta cuenta bancaria es de tipo caja y solo acepta el método de pago de tipo especie. +ErrorCashAccountAcceptsOnlyCashMoney=Esta cuenta bancaria es de tipo caja y sólo acepta pagos en efectivo. ErrorFromToAccountsMustDiffers=La cuenta origen y destino deben ser diferentes. ErrorBadThirdPartyName=Nombre de tercero incorrecto ErrorProdIdIsMandatory=El %s es obligatorio diff --git a/htdocs/langs/es_ES/install.lang b/htdocs/langs/es_ES/install.lang index 9d42c609104..1883391fb5a 100644 --- a/htdocs/langs/es_ES/install.lang +++ b/htdocs/langs/es_ES/install.lang @@ -225,4 +225,6 @@ MigrationProjectTaskTime=Actualización de tiempo dedicado en segundos # Migration Acctioncom MigrationActioncommElement=Actualización de los datos de acciones sobre elementos # Migration payment mode -MigrationPaymentMode=Actualización de los modos de pago \ No newline at end of file +MigrationPaymentMode=Actualización de los modos de pago +# Migration categories +MigrationCategorieAssociation=Actualización de las categorías diff --git a/htdocs/langs/es_ES/margins.lang b/htdocs/langs/es_ES/margins.lang index 0dc08481c46..9dd68991ae7 100644 --- a/htdocs/langs/es_ES/margins.lang +++ b/htdocs/langs/es_ES/margins.lang @@ -43,8 +43,9 @@ MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Indica si un descuento global se toma en cue MARGIN_TYPE=Tipo de margen gestionado MargeBrute=Margen bruto MargeNette=Margen neto -MARGIN_TYPE_DETAILS=Margen bruto : Precio de venta sin IVA - Precio de compra sin IVA
Margen neto : Precio de venta sin IVA - Costos +MARGIN_TYPE_DETAILS=Margen bruto: Precio de venta sin IVA - Precio de compra sin IVA
Margen neto: Precio de venta sin IVA - Costos +CostPrice=Precio de compra BuyingCost=Costos UnitCharges=Carga unitaria Charges=Cargas diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 0d1a2aaf5e0..c8db8f36c19 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1421,4 +1421,4 @@ Selectchartofaccounts=Sélection d'un plan comptable DoNotSuggestChart=Ne pas suggérer de plan comptable ##### ECM (GED) ##### ECMSetup = Configuration du module GED -ECMAutoTree = L'arborescence automatique est disponible \ No newline at end of file +ECMAutoTree = L'arborescence automatique est disponible diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index e5955167dd8..0c87fb93f66 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -184,6 +184,7 @@ Abandoned=Abandonné RemainderToPay=Reste à payer RemainderToTake=Reste à encaisser RemainderToPayBack=Reste à rembourser +Rest=Créance AmountExpected=Montant réclamé ExcessReceived=Trop perçu EscompteOffered=Escompte (règlement avant échéance) diff --git a/htdocs/langs/fr_FR/margins.lang b/htdocs/langs/fr_FR/margins.lang index 3c81a9a1e4d..b30e79a3e7b 100644 --- a/htdocs/langs/fr_FR/margins.lang +++ b/htdocs/langs/fr_FR/margins.lang @@ -45,6 +45,7 @@ MargeBrute=Marge brute MargeNette=Marge nette MARGIN_TYPE_DETAILS=Marge brute : Prix de vente HT - Prix d'achat HT
Marge nette : Prix de vente HT - Coût de revient +CostPrice=Prix ​​d'achat BuyingCost=Coût de revient UnitCharges=Charge unitaire Charges=Charges diff --git a/htdocs/langs/it_IT/admin.lang b/htdocs/langs/it_IT/admin.lang index 678da2c6fcb..b8d7a895ac8 100644 --- a/htdocs/langs/it_IT/admin.lang +++ b/htdocs/langs/it_IT/admin.lang @@ -637,8 +637,6 @@ Module20Desc =Gestione proposte commerciali Module20Name =Proposte Module210Desc =Integrazione Postnuke Module210Name =Postnuke -Module2200Desc =Gestione dei diritti di prestito -Module2200Name =Diritti di prestito Module22Desc =Gestione posta massiva Module22Name =Posta massiva Module23Desc =Monitoraggio del consumo energetico diff --git a/htdocs/langs/pt_PT/admin.lang b/htdocs/langs/pt_PT/admin.lang index a1af76ae0c1..5cb1d28994d 100644 --- a/htdocs/langs/pt_PT/admin.lang +++ b/htdocs/langs/pt_PT/admin.lang @@ -558,8 +558,6 @@ Module20Desc = Gestão de Orçamentos/Propostas comerciais Module20Name = Orçamentos Module210Desc = Integração com PostNuke Module210Name = PostNuke -Module2200Desc = Gestão dos direitos de empréstimos -Module2200Name = Direito de empréstimos Module22Desc = Administração e envío de E-Mails massivos Module22Name = E-Mailings Module23Desc = Acompanhamento do consumo de energia diff --git a/htdocs/langs/tr_TR/admin.lang b/htdocs/langs/tr_TR/admin.lang index 75bc24ba808..0ec21ffbe1f 100644 --- a/htdocs/langs/tr_TR/admin.lang +++ b/htdocs/langs/tr_TR/admin.lang @@ -1389,4 +1389,4 @@ TestGeoIPResult=Bir IP -> ülke dönüşümü testi ProjectsNumberingModules=Proje numaralandırma modülü ProjectsSetup=Proje modülü kurulumu ProjectsModelModule=Proje raporu belge modeli -Translation=Çeviri \ No newline at end of file +Translation=Çeviri diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index 53c751481c2..7f55a1e77a2 100755 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -794,4 +794,4 @@ function getApiError() return $errors; } -?> \ No newline at end of file +?> diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 40c499d5469..c0e47ea955d 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -68,8 +68,10 @@ $object=new stdClass(); $reshook=$hookmanager->executeHooks('addDemoProfile', $parameters, $object, $tmpaction); // Note that $action and $object may have been modified by some hooks $error=$hookmanager->error; $errors=$hookmanager->errors; +// Visible $alwayscheckedmodules=array('barcode','bookmark','externalrss','fckeditor','geoipmaxmind','gravatar','memcached','syslog','user','webservices'); // Technical module we always want $alwaysuncheckedmodules=array('paybox','paypal','google','scanner','workflow'); // Module we never want +// Not visible $alwayshiddencheckedmodules=array('accounting','barcode','bookmark','clicktodial','comptabilite','document','domain','externalrss','externalsite','fckeditor','geoipmaxmind','gravatar','label','ldap', 'mailmanspip','notification','syslog','user','webservices', // Extended modules @@ -77,7 +79,7 @@ $alwayshiddencheckedmodules=array('accounting','barcode','bookmark','clicktodial $alwayshiddenuncheckedmodules=array('boutique','ftp', // Extended modules 'awstats','bittorrent','bootstrap','cabinetmed','cmcic','concatpdf','customfield','dolicloud','filemanager','lightbox','mantis','monitoring','moretemplates','multicompany','nltechno','numberingpack','openstreetmap', - 'ovh','phenix','phpsysinfo','pibarcode','postnuke','skincoloreditor','submiteverywhere','survey','thomsonphonebook','topten','tvacerfa','voyage','webcalendar','webmail'); + 'ovh','phenix','phpsysinfo','pibarcode','postnuke','selectbank','skincoloreditor','submiteverywhere','survey','thomsonphonebook','topten','tvacerfa','voyage','webcalendar','webmail'); // Search modules $dirlist=$conf->file->dol_document_root; @@ -214,8 +216,7 @@ if (GETPOST("action") == 'gotodemo') // Do redirect to login page if ($disablestring) { - $url=DOL_URL_ROOT.'/index.php?disablemodules='.$disablestring; - if (GETPOST('urlfrom','alpha')) $url.='&urlfrom='.GETPOST('urlfrom','alpha'); + $url=DOL_URL_ROOT.'/index.php?'.(GETPOST('urlfrom','alpha')?'urlfrom='.urlencode(GETPOST('urlfrom','alpha')).'&':'').'disablemodules='.$disablestring; header("Location: ".$url); exit; } @@ -294,7 +295,7 @@ foreach ($demoprofiles as $profilearray) print '
'."\n"; print ''."\n"; - print ''."\n"; + print ''."\n"; print ''."\n"; print ''."\n"; print ''."\n";