diff --git a/COPYRIGHT b/COPYRIGHT index 4272219f80b..c69dfc91d54 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -38,7 +38,7 @@ jQuery jqueryFileTree 1.0.1 GPL and MIT Licence Yes JS library for colo jQuery jquerytreeview 1.4.1 MIT Licence Yes JS library for color picker with not defined list of colors jQuery Layout 1.3.0 GPL and MIT Licence Yes JS library plugin Layout (RC-29.15) jQuery Mobile 1.3 GPL and MIT Licence Yes JS library for smartphone (not used) -jQuery TableDnD 0.5 GPL and MIT Licence Yes JS library plugin TableDnD (to reorder table rows) +jQuery TableDnD 0.6 GPL and MIT Licence Yes JS library plugin TableDnD (to reorder table rows) jQuery Timepicker 1.1.0 GPL and MIT Licence Yes JS library Timepicker addon for Datepicker jQuery Tiptip 1.3 GPL and MIT Licence Yes JS library for tooltips JSGantt 1.2 BSD Licence Yes JS library (to build Gantt reports) diff --git a/htdocs/cashdesk/tpl/liste_articles.tpl.php b/htdocs/cashdesk/tpl/liste_articles.tpl.php index 0ee03559391..2fac2e2a16a 100644 --- a/htdocs/cashdesk/tpl/liste_articles.tpl.php +++ b/htdocs/cashdesk/tpl/liste_articles.tpl.php @@ -62,14 +62,14 @@ else $remise = $tab[$i]['remise']; - echo ('

'.$tab[$i]['qte'].' x '.price2num($tab[$i]['price'], 'MT').$remise_percent.' = '.price2num($tab[$i]['total_ht'], 'MT').' '.$conf->currency.' '.$langs->trans("HT").' ('.price2num($tab[$i]['total_ttc'], 'MT').' '.$conf->currency.' '.$langs->trans("TTC").')

'."\n"); + echo ('

'.$tab[$i]['qte'].' x '.price2num($tab[$i]['price'], 'MT').$remise_percent.' = '.price(price2num($tab[$i]['total_ht'], 'MT'),0,$langs,0,0,-1,$conf->currency).' '.$langs->trans("HT").' ('.price(price2num($tab[$i]['total_ttc'], 'MT'),0,$langs,0,0,-1,$conf->currency).' '.$langs->trans("TTC").')

'."\n"); echo (''."\n"); } } $obj_facturation->calculTotaux(); $total_ttc = $obj_facturation->prixTotalTtc(); -echo ('

'.$langs->trans("Total").' : '.price2num($total_ttc, 'MT').' '.$conf->currency.'

'."\n"); +echo ('

'.$langs->trans("Total").' : '.price(price2num($total_ttc, 'MT'),0,$langs,0,0,-1,$conf->currency).'

'."\n"); ?> diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php index cae461fe7fc..3e154585e54 100644 --- a/htdocs/cashdesk/tpl/ticket.tpl.php +++ b/htdocs/cashdesk/tpl/ticket.tpl.php @@ -132,7 +132,7 @@ print $object->ref; for($i=0;$i < $tab_size;$i++) { $remise = $tab[$i]['remise']; - echo (''.$tab[$i]['ref'].''.$tab[$i]['label'].''.$tab[$i]['qte'].''.$tab[$i]['remise_percent'].''.price2num($tab[$i]['total_ht'],'MT').' '.$conf->currency.''."\n"); + echo (''.$tab[$i]['ref'].''.$tab[$i]['label'].''.$tab[$i]['qte'].''.$tab[$i]['remise_percent'].''.price(price2num($tab[$i]['total_ht'],'MT'),0,$langs,0,0,-1,$conf->currency).''."\n"); } ?> diff --git a/htdocs/cashdesk/tpl/validation1.tpl.php b/htdocs/cashdesk/tpl/validation1.tpl.php index 6fdf7952207..2542993b314 100644 --- a/htdocs/cashdesk/tpl/validation1.tpl.php +++ b/htdocs/cashdesk/tpl/validation1.tpl.php @@ -26,12 +26,12 @@ $langs->load("main"); - + montantTva() ) { - echo (''); + echo (''); } else @@ -41,7 +41,7 @@ $langs->load("main"); } ?> - + '); + echo (''); } // Affichage du montant rendu (reglement en especes) if ( $obj_facturation->montantRendu() ) { - echo (''); + echo (''); } diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index eb81c4a46ae..71302baf542 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -796,7 +796,7 @@ else if ($action == "addline" && $user->rights->propal->creer) if (! empty($price_min) && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) { - $mesg = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').$langs->getCurrencySymbol($conf->currency)); + $mesg = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); setEventMessage($mesg, 'errors'); } else @@ -927,7 +927,7 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa if ($price_min && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) { - setEventMessage($langs->trans("CantBeLessThanMinPrice", price2num($price_min,'MU')).$langs->getCurrencySymbol($conf->currency), 'errors'); + setEventMessage($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)), 'errors'); $error++; } } diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 2c60093ab06..203dbe4be96 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -732,7 +732,7 @@ else if ($action == 'addline' && $user->rights->commande->creer) if (! empty($price_min) && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) { - $mesg = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').$langs->getCurrencySymbol($conf->currency)); + $mesg = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); setEventMessage($mesg, 'errors'); } else @@ -865,7 +865,7 @@ else if ($action == 'updateligne' && $user->rights->commande->creer && GETPOST(' if ($price_min && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) { - setEventMessage($langs->trans("CantBeLessThanMinPrice", price2num($price_min,'MU')).$langs->getCurrencySymbol($conf->currency), 'errors'); + setEventMessage($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)), 'errors'); $error++; } } diff --git a/htdocs/compta/dons/fiche.php b/htdocs/compta/dons/fiche.php index 1e13c9f9874..95f5985b56f 100644 --- a/htdocs/compta/dons/fiche.php +++ b/htdocs/compta/dons/fiche.php @@ -482,7 +482,7 @@ if (! empty($id) && $action != 'edit') print ''; - print "".''; + print "".''; print "'; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; - print ''; + print ''; // Affiche statut de la facture print ''; print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; print ''; print ''; } diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index ddf8a988b48..0e47fd7c109 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -201,7 +201,7 @@ if ($resql) print $thirdpartystatic->getNomUrl(1,'customer'); print ''; print ''; // Date print '\n"; print '\n"; - print '\n"; + print '\n"; print "\n"; $i++; diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 060d9c546b0..fa9c99a8571 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -459,7 +459,7 @@ else if ($action == 'addline' && $user->rights->contrat->creer) if($price_min && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) { - $object->error = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').' '.$langs->trans("Currency".$conf->currency)); + $object->error = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); $result = -1 ; } else diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index 50401f58694..8f191415deb 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -118,7 +118,7 @@ class box_activity extends ModeleBoxes ); $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => dol_trunc(number_format($objp->Mnttot, 0, ',', ' '),40)." ".$langs->getCurrencySymbol($conf->currency) + 'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency) ); // We add only for the current year @@ -165,7 +165,7 @@ class box_activity extends ModeleBoxes ); $totalnb += $objp->nb; $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => dol_trunc(number_format($objp->Mnttot, 0, ',', ' '),40)." ".$langs->getCurrencySymbol($conf->currency) + 'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency) ); $totalMnt += $objp->Mnttot; $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', @@ -219,7 +219,7 @@ class box_activity extends ModeleBoxes $totalnb += $objp->nb; $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => dol_trunc(number_format($objp->Mnttot, 0, ',', ' '),40)." ".$langs->getCurrencySymbol($conf->currency) + 'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency) ); $totalMnt += $objp->Mnttot; $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $commandestatic->LibStatut($objp->fk_statut,0,3)); @@ -270,7 +270,7 @@ class box_activity extends ModeleBoxes $totalnb += $objp->nb; $this->info_box_contents[$i][3] = array('td' => 'align="right"', - 'text' => dol_trunc(number_format($objp->Mnttot, 0, ',', ' '),40)." ".$langs->getCurrencySymbol($conf->currency) + 'text' => price($objp->Mnttot,1,$langs,0,0,-1,$conf->currency) ); $totalMnt += $objp->Mnttot; $this->info_box_contents[$i][4] = array('td' => 'align="right" width="18"', 'text' => $propalstatic->LibStatut($objp->fk_statut,3)); @@ -283,8 +283,8 @@ class box_activity extends ModeleBoxes // Add the sum in the bottom of the boxes $this->info_box_contents[$i][1] = array('td' => 'align="left" ', 'text' => $langs->trans("Total")." ".$textHead); - $this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => number_format($totalnb, 0, ',', ' ')); - $this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => number_format($totalMnt, 0, ',', ' ')." ".$langs->getCurrencySymbol($conf->currency)); + $this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => price($totalnb,1,$langs,0,0,-1,$conf->currency)); + $this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => price($totalMnt,1,$langs,0,0,-1,$conf->currency)); $this->info_box_contents[$i][4] = array('td' => 'align="right" ', 'text' => ""); $this->info_box_contents[$i][5] = array('td' => 'align="right"', 'text' => ""); } diff --git a/htdocs/core/boxes/box_comptes.php b/htdocs/core/boxes/box_comptes.php index b48d7993d27..9b80ffefb74 100644 --- a/htdocs/core/boxes/box_comptes.php +++ b/htdocs/core/boxes/box_comptes.php @@ -141,7 +141,7 @@ class box_comptes extends ModeleBoxes $this->info_box_contents[$i][2] = array('td' => 'align="right" class="liste_total"', 'text' => ' ' ); - $totalamount=price($solde_total).' '.$langs->trans("Currency".$conf->currency); + $totalamount=price($solde_total,0,$langs,0,0,-1,$conf->currency); $this->info_box_contents[$i][3] = array('td' => 'align="right" class="liste_total"', 'text' => $totalamount ); diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 1cf128cc150..92a4dcd07a5 100755 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -185,7 +185,7 @@ abstract class CommonDocGenerator { if($extrafields->attribute_type[$key] == 'price') { - $object->array_options['options_'.$key] = price($object->array_options['options_'.$key]).' '.$outputlangs->getCurrencySymbol($conf->currency); + $object->array_options['options_'.$key] = price($object->array_options['options_'.$key],0,$outputlangs,0,0,-1,$conf->currency); } else if($extrafields->attribute_type[$key] == 'select') { @@ -322,8 +322,8 @@ abstract class CommonDocGenerator { if($extrafields->attribute_type[$key] == 'price') { - $object->array_options['options_'.$key] = price2num($object->array_options['options_'.$key],2); - $object->array_options['options_'.$key.'_currency'] = $object->array_options['options_'.$key].' '.$outputlangs->getCurrencySymbol($conf->currency); + $object->array_options['options_'.$key] = price2num($object->array_options['options_'.$key]); + $object->array_options['options_'.$key.'_currency'] = price($object->array_options['options_'.$key],0,$outputlangs,0,0,-1,$conf->currency); //Add value to store price with currency $array_to_fill=array_merge($array_to_fill,array($array_key.'_options_'.$key.'_currency' => $object->array_options['options_'.$key.'_currency'])); } diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 2e014321b05..dcff2aedf14 100755 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -828,7 +828,7 @@ class ExtraFields } elseif ($type == 'price') { - $value=price($value).' '.$langs->getCurrencySymbol($conf->currency); + $value=price($value,0,$langs,0,0,-1,$conf->currency); } elseif ($type == 'select') { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ef9a416d1df..4e1ca4e3bbb 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1461,10 +1461,6 @@ class Form $outval.=$objRef.' - '.dol_trunc($label,32).' - '; $found=0; - $currencytext=$langs->trans("Currency".$conf->currency); - $currencytextnoent=$langs->transnoentities("Currency".$conf->currency); - if (dol_strlen($currencytext) > 10) $currencytext=$conf->currency; // If text is too long, we use the short code - if (dol_strlen($currencytextnoent) > 10) $currencytextnoent=$conf->currency; // If text is too long, we use the short code // Multiprice if ($price_level >= 1) // If we need a particular price level (from 1 to 6) @@ -1486,13 +1482,13 @@ class Form $found=1; if ($objp2->price_base_type == 'HT') { - $opt.= price($objp2->price,1).' '.$currencytext.' '.$langs->trans("HT"); - $outval.= price($objp2->price,1).' '.$currencytextnoent.' '.$langs->transnoentities("HT"); + $opt.= price($objp2->price,1,$langs,0,0,-1,$conf->currency).' '.$langs->trans("HT"); + $outval.= price($objp2->price,0,$langs,0,0,-1,$conf->currency).' '.$langs->transnoentities("HT"); } else { - $opt.= price($objp2->price_ttc,1).' '.$currencytext.' '.$langs->trans("TTC"); - $outval.= price($objp2->price_ttc,1).' '.$currencytextnoent.' '.$langs->transnoentities("TTC"); + $opt.= price($objp2->price_ttc,1,$langs,0,0,-1,$conf->currency).' '.$langs->trans("TTC"); + $outval.= price($objp2->price_ttc,0,$langs,0,0,-1,$conf->currency).' '.$langs->transnoentities("TTC"); } $outprice_ht=price($objp2->price); $outprice_ttc=price($objp2->price_ttc); @@ -1514,15 +1510,15 @@ class Form $outdiscount=$objp->remise_percent; if ($objp->quantity == 1) { - $opt.= price($objp->unitprice).' '.$currencytext."/"; - $outval.= price($objp->unitprice).' '.$currencytextnoent."/"; + $opt.= price($objp->unitprice,1,$langs,0,0,-1,$conf->currency)."/"; + $outval.= price($objp->unitprice,0,$langs,0,0,-1,$conf->currency)."/"; $opt.= $langs->trans("Unit"); // Do not use strtolower because it breaks utf8 encoding $outval.=$langs->transnoentities("Unit"); } else { - $opt.= price($objp->price).' '.$currencytext."/".$objp->quantity; - $outval.= price($objp->price).' '.$currencytextnoent."/".$objp->quantity; + $opt.= price($objp->price,1,$langs,0,0,-1,$conf->currency)."/".$objp->quantity; + $outval.= price($objp->price,0,$langs,0,0,-1,$conf->currency)."/".$objp->quantity; $opt.= $langs->trans("Units"); // Do not use strtolower because it breaks utf8 encoding $outval.=$langs->transnoentities("Units"); } @@ -1534,8 +1530,8 @@ class Form } if (!empty($objp->quantity) && $objp->quantity >= 1) { - $opt.=" (".price($objp->unitprice).' '.$currencytext."/".$langs->trans("Unit").")"; // Do not use strtolower because it breaks utf8 encoding - $outval.=" (".price($objp->unitprice).' '.$currencytextnoent."/".$langs->transnoentities("Unit").")"; // Do not use strtolower because it breaks utf8 encoding + $opt.=" (".price($objp->unitprice,1,$langs,0,0,-1,$conf->currency)."/".$langs->trans("Unit").")"; // Do not use strtolower because it breaks utf8 encoding + $outval.=" (".price($objp->unitprice,0,$langs,0,0,-1,$conf->currency)."/".$langs->transnoentities("Unit").")"; // Do not use strtolower because it breaks utf8 encoding } if (!empty($objp->remise_percent) && $objp->remise_percent >= 1) { @@ -1548,13 +1544,13 @@ class Form { if ($objp->price_base_type == 'HT') { - $opt.= price($objp->price,1).' '.$currencytext.' '.$langs->trans("HT"); - $outval.= price($objp->price,1).' '.$currencytextnoent.' '.$langs->transnoentities("HT"); + $opt.= price($objp->price,1,$langs,0,0,-1,$conf->currency).' '.$langs->trans("HT"); + $outval.= price($objp->price,0,$langs,0,0,-1,$conf->currency).' '.$langs->transnoentities("HT"); } else { - $opt.= price($objp->price_ttc,1).' '.$currencytext.' '.$langs->trans("TTC"); - $outval.= price($objp->price_ttc,1).' '.$currencytextnoent.' '.$langs->transnoentities("TTC"); + $opt.= price($objp->price_ttc,1,$langs,0,0,-1,$conf->currency).' '.$langs->trans("TTC"); + $outval.= price($objp->price_ttc,0,$langs,0,0,-1,$conf->currency).' '.$langs->transnoentities("TTC"); } $outprice_ht=price($objp->price); $outprice_ttc=price($objp->price_ttc); @@ -1720,33 +1716,27 @@ class Form if (! empty($objp->idprodfournprice)) { - $currencytext=$langs->trans("Currency".$conf->currency); - $currencytextnoent=$langs->transnoentities("Currency".$conf->currency); - if (dol_strlen($currencytext) > 10) $currencytext=$conf->currency; // If text is too long, we use the short code - if (dol_strlen($currencytextnoent) > 10) $currencytextnoent=$conf->currency; // If text is too long, we use the short code - - $outqty=$objp->quantity; $outdiscount=$objp->remise_percent; if ($objp->quantity == 1) { - $opt.= price($objp->fprice).' '.$currencytext."/"; - $outval.= price($objp->fprice).' '.$currencytextnoent."/"; + $opt.= price($objp->fprice,1,$langs,0,0,-1,$conf->currency)."/"; + $outval.= price($objp->fprice,0,$langs,0,0,-1,$conf->currency)."/"; $opt.= $langs->trans("Unit"); // Do not use strtolower because it breaks utf8 encoding $outval.=$langs->transnoentities("Unit"); } else { - $opt.= price($objp->fprice).' '.$currencytext."/".$objp->quantity; - $outval.= price($objp->fprice).' '.$currencytextnoent."/".$objp->quantity; + $opt.= price($objp->fprice,1,$langs,0,0,-1,$conf->currency)."/".$objp->quantity; + $outval.= price($objp->fprice,0,$langs,0,0,-1,$conf->currency)."/".$objp->quantity; $opt.= $langs->trans("Units"); // Do not use strtolower because it breaks utf8 encoding $outval.= $langs->transnoentities("Units"); } if ($objp->quantity >= 1) { - $opt.=" (".price($objp->unitprice).' '.$currencytext."/".$langs->trans("Unit").")"; // Do not use strtolower because it breaks utf8 encoding - $outval.=" (".price($objp->unitprice).' '.$currencytextnoent."/".$langs->transnoentities("Unit").")"; // Do not use strtolower because it breaks utf8 encoding + $opt.=" (".price($objp->unitprice,1,$langs,0,0,-1,$conf->currency)."/".$langs->trans("Unit").")"; // Do not use strtolower because it breaks utf8 encoding + $outval.=" (".price($objp->unitprice,0,$langs,0,0,-1,$conf->currency)."/".$langs->transnoentities("Unit").")"; // Do not use strtolower because it breaks utf8 encoding } if ($objp->remise_percent >= 1) { @@ -1853,24 +1843,23 @@ class Form if ($objp->quantity == 1) { - $opt.= price($objp->fprice); - $opt.= $langs->trans("Currency".$conf->currency)."/"; + $opt.= price($objp->fprice,1,$langs,0,0,-1,$conf->currency)."/"; } $opt.= $objp->quantity.' '; if ($objp->quantity == 1) { - $opt.= strtolower($langs->trans("Unit")); + $opt.= $langs->trans("Unit"); } else { - $opt.= strtolower($langs->trans("Units")); + $opt.= $langs->trans("Units"); } if ($objp->quantity > 1) { $opt.=" - "; - $opt.= price($objp->unitprice).$langs->trans("Currency".$conf->currency)."/".strtolower($langs->trans("Unit")); + $opt.= price($objp->unitprice,1,$langs,0,0,-1,$conf->currency)."/".$langs->trans("Unit"); } if ($objp->duration) $opt .= " - ".$objp->duration; $opt .= "\n"; @@ -2987,13 +2976,13 @@ class Form print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print "\n"; @@ -158,7 +158,8 @@ else dol_print_error($db); } -$db->close(); llxFooter(); + +$db->close(); ?> diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index add9a5f1b5c..5a18c9b9bcc 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -194,6 +194,8 @@ class CompanyBankAccount extends Account */ function getRibLabel() { + global $langs; + if ($this->code_banque || $this->code_guichet || $this->number || $this->cle_rib) { $rib = $this->code_banque." ".$this->code_guichet." ".$this->number; diff --git a/htdocs/user/logout.php b/htdocs/user/logout.php index edd860426aa..77a382d9d0e 100644 --- a/htdocs/user/logout.php +++ b/htdocs/user/logout.php @@ -76,9 +76,10 @@ session_name($sessionname); session_destroy(); dol_syslog("End of session ".$sessionname); -// TODO Not sure this is required +// Not sure this is required unset($_SESSION['dol_login']); unset($_SESSION['dol_entity']); -header("Location: ".$url); -?> +if (GETPOST('noredirect')) return; +header("Location: ".$url); // Default behaviour is redirect to index.php page +?> \ No newline at end of file diff --git a/test/soapui/Dolibarr-soapui-project.xml b/test/soapui/Dolibarr-soapui-project.xml index 5c00d85eb04..0dad335ed67 100755 --- a/test/soapui/Dolibarr-soapui-project.xml +++ b/test/soapui/Dolibarr-soapui-project.xml @@ -1,4 +1,4 @@ - +http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl @@ -757,285 +757,285 @@ all -]]>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php?wsdl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - WS to get product or service - - - - - WS to create a product or service - - - - - WS to get list of all products or services id and ref - - - - - WS to get list of all products or services for a category - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]]>http://schemas.xmlsoap.org/wsdl/http://localhost/dolibarrnew/webservices/server_productorservice.phphttp://localhostdolibarr/dolibarrnew/webservices/server_productorservice.phphttp://localhost/dolibarr/htdocs/webservices/server_productorservice.php<xml-fragment/>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php - - - - dolibarrkey - PRESTASHOP - admin - admin - - - - - aaa - aaa - 0 - - les couteurs isolation sonore ergonomiques et l gers offrent la reproduction audio la plus fid le en provenance de sources audio st r o portables ou de salon. - 2013-03-06 09:24:51 - 2013-03-06 09:24:51 - imported from Prestashop - 0 - 1 - - upc - - - - - 149 - - - 0 - - - - - - -]]>UTF-8http://localhost/dolibarrnew/webservices/server_productorservice.php - - - - - - ? - ? - ? - ? - ? - - - - ? - ? - ? - ? - - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - ? - - - - - ? - ? - ? - ? - - - - - +]]>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php?wsdl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + WS to get product or service + + + + + WS to create a product or service + + + + + WS to get list of all products or services id and ref + + + + + WS to get list of all products or services for a category + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]>http://schemas.xmlsoap.org/wsdl/http://localhost/dolibarrnew/webservices/server_productorservice.phphttp://localhostdolibarr/dolibarrnew/webservices/server_productorservice.phphttp://localhost/dolibarr/htdocs/webservices/server_productorservice.php<xml-fragment/>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php + + + + dolibarrkey + PRESTASHOP + admin + admin + + + + + aaa + aaa + 0 + + les couteurs isolation sonore ergonomiques et l gers offrent la reproduction audio la plus fid le en provenance de sources audio st r o portables ou de salon. + 2013-03-06 09:24:51 + 2013-03-06 09:24:51 + imported from Prestashop + 0 + 1 + + upc + + + + + 149 + + + 0 + + + + + + +]]>UTF-8http://localhost/dolibarrnew/webservices/server_productorservice.php + + + + + + ? + ? + ? + ? + ? + + + + ? + ? + ? + ? + + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + + + + + ? + ? + ? + ? + + + + + ]]><xml-fragment/>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php
trans("Invoice"); ?>numInvoice(); ?>
trans("TotalHT"); ?>prixTotalHt(),'MT').' '.$conf->currency; ?>
trans("TotalHT"); ?>prixTotalHt(),'MT'),0,$langs,0,0,-1,$conf->currency); ?>
'.$langs->trans("VAT").''.price2num($obj_facturation->montantTva(),'MT').' '.$conf->currency.'
'.$langs->trans("VAT").''.price(price2num($obj_facturation->montantTva(),'MT'),0,$langs,0,0,-1,$conf->currency).'
trans("TotalTTC"); ?> prixTotalTtc(),'MT').' '.$conf->currency; ?>
trans("TotalTTC"); ?> prixTotalTtc(),'MT'),0,$langs,0,0,-1,$conf->currency); ?>
trans("PaymentMode"); ?> getSetPaymentMode()) @@ -85,14 +85,14 @@ $langs->load("main"); } else { - echo ('
'.$langs->trans("Received").''.price2num($obj_facturation->montantEncaisse(),'MT').' '.$conf->currency.'
'.$langs->trans("Received").''.price(price2num($obj_facturation->montantEncaisse(),'MT'),0,$langs,0,0,-1,$conf->currency).'
'.$langs->trans("Change").''.price2num($obj_facturation->montantRendu(),'MT').' '.$conf->currency.'
'.$langs->trans("Change").''.price(price2num($obj_facturation->montantRendu(),'MT'),0,$langs,0,0,-1,$conf->currency).'
'.$langs->trans("Comments").' :
'; print nl2br($don->note_private).'
'.$langs->trans("Amount").''.price($don->amount).' '.$langs->trans("Currency".$conf->currency).'
'.$langs->trans("Amount").''.price($don->amount,0,$langs,0,0,-1,$conf->currency).'
".$langs->trans("PublicDonation").""; print yn($don->public); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index c22a0becde1..d8379a02a07 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1,28 +1,28 @@ * Copyright (C) 2004 Eric Seigne -* Copyright (C) 2004-2013 Laurent Destailleur -* Copyright (C) 2005 Marc Barilley / Ocebo -* Copyright (C) 2005-2012 Regis Houssin -* Copyright (C) 2006 Andre Cianfarani -* Copyright (C) 2010-2013 Juanjo Menent -* Copyright (C) 2012 Christophe Battarel -* Copyright (C) 2013 Jean-Francois FERRY -* Copyright (C) 2013 Florian Henry -* -* 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 -* the Free Software Foundation; either version 3 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see . -*/ + * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2010-2013 Juanjo Menent + * Copyright (C) 2012 Christophe Battarel + * Copyright (C) 2013 Jean-Francois FERRY + * Copyright (C) 2013 Florian Henry + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ /** * \file htdocs/compta/facture.php @@ -1304,7 +1304,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- if (! empty($price_min) && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) { - $mesg = $langs->trans("CantBeLessThanMinPrice",price2num($price_min,'MU').$langs->getCurrencySymbol($conf->currency)); + $mesg = $langs->trans("CantBeLessThanMinPrice",price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)); setEventMessage($mesg, 'errors'); } else @@ -1443,7 +1443,7 @@ else if ($action == 'updateligne' && $user->rights->facture->creer && $_POST['sa if ($price_min && (price2num($pu_ht)*(1-price2num(GETPOST('remise_percent'))/100) < price2num($price_min))) { - setEventMessage($langs->trans("CantBeLessThanMinPrice", price2num($price_min,'MU')).$langs->getCurrencySymbol($conf->currency), 'errors'); + setEventMessage($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min,'MU'),0,$langs,0,0,-1,$conf->currency)), 'errors'); $error++; } } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 6f41995971e..c1172913944 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -367,13 +367,13 @@ if ($resql) print $thirdparty->getNomUrl(1,'customer'); print ''.price($objp->total_ht).' '.$langs->getCurrencySymbol($conf->currency).''.price($objp->total_ht,0,$langs,0,0,-1,$conf->currency).''.price($objp->total_tva).' '.$langs->getCurrencySymbol($conf->currency).''.price($objp->total_tva,0,$langs,0,0,-1,$conf->currency).''.price($objp->total_ttc).' '.$langs->getCurrencySymbol($conf->currency).''.price($objp->total_ttc,0,$langs,0,0,-1,$conf->currency).''.(! empty($paiement)?price($paiement).' '.$langs->getCurrencySymbol($conf->currency):' ').''.(! empty($paiement)?price($paiement,0,$langs,0,0,-1,$conf->currency):' ').''; @@ -393,10 +393,10 @@ if ($resql) // Print total print '
'.$langs->trans('Total').''.price($total_ht).' '.$langs->getCurrencySymbol($conf->currency).''.price($total_tva).' '.$langs->getCurrencySymbol($conf->currency).''.price($total_ttc).' '.$langs->getCurrencySymbol($conf->currency).''.price($totalrecu).' '.$langs->getCurrencySymbol($conf->currency).''.price($total_ht,0,$langs,0,0,-1,$conf->currency).''.price($total_tva,0,$langs,0,0,-1,$conf->currency).''.price($total_ttc,0,$langs,0,0,-1,$conf->currency).''.price($totalrecu,0,$langs,0,0,-1,$conf->currency).' 
'; - print price($obj->total_ttc).' '.$langs->trans("Currency".$conf->currency); + print price($obj->total_ttc,0,$langs,0,0,-1,$conf->currency); print ''; @@ -261,7 +261,7 @@ if ($result) print "'.dol_print_date($db->jdate($obj->datec),'day')."'.price($obj->amount).' '.$langs->trans("Currency".$conf->currency)."'.price($obj->amount,0,$langs,0,0,-1,$conf->currency)."
'; if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { - if (! $filter || $filter=="fk_facture_source IS NULL") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount),$langs->transnoentities("Currency".$conf->currency)).': '; // If we want deposit to be substracted to payments only and not to total of final invoice - else print $langs->trans("CompanyHasCreditNote",price($amount),$langs->transnoentities("Currency".$conf->currency)).': '; + if (! $filter || $filter=="fk_facture_source IS NULL") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,1,$langs,0,0,-1,$conf->currency)).': '; // If we want deposit to be substracted to payments only and not to total of final invoice + else print $langs->trans("CompanyHasCreditNote",price($amount,1,$langs,0,0,-1,$conf->currency)).': '; } else { - if (! $filter || $filter=="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount),$langs->transnoentities("Currency".$conf->currency)).': '; - else print $langs->trans("CompanyHasCreditNote",price($amount),$langs->transnoentities("Currency".$conf->currency)).': '; + if (! $filter || $filter=="fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND description='(DEPOSIT)')") print $langs->trans("CompanyHasAbsoluteDiscount",price($amount,1,$langs,0,0,-1,$conf->currency)).': '; + else print $langs->trans("CompanyHasCreditNote",price($amount,1,$langs,0,0,-1,$conf->currency)).': '; } $newfilter='fk_facture IS NULL AND fk_facture_line IS NULL'; // Remises disponibles if ($filter) $newfilter.=' AND ('.$filter.')'; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index a3c1ed0acd9..86eb04b970f 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -450,7 +450,7 @@ class FormFile $langs->load("errors"); $genbutton.= ' '.img_warning($langs->transnoentitiesnoconv("WarningNoDocumentModelActivated")); } - if (! $allowgenifempty && ! is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') $genbutton=''; + if (! $allowgenifempty && ! is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') $genbutton=''; $out.= $genbutton; $out.= ''; diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 7f82247397c..5045283abe3 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -312,17 +312,17 @@ function ajax_combobox($htmlname, $event=array(), $minLengthToAutocomplete=0) /* Some properties for combobox: minLengthToAutocomplete: 2, - comboboxContainerClass: "comboboxContainer", - comboboxValueContainerClass: "comboboxValueContainer", - comboboxValueContentClass: "comboboxValueContent", - comboboxDropDownClass: "comboboxDropDownContainer", - comboboxDropDownButtonClass: "comboboxDropDownButton", - comboboxDropDownItemClass: "comboboxItem", - comboboxDropDownItemHoverClass: "comboboxItemHover", - comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader", - comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer", - animationType: "slide", - width: "500px" */ + comboboxContainerClass: "comboboxContainer", + comboboxValueContainerClass: "comboboxValueContainer", + comboboxValueContentClass: "comboboxValueContent", + comboboxDropDownClass: "comboboxDropDownContainer", + comboboxDropDownButtonClass: "comboboxDropDownButton", + comboboxDropDownItemClass: "comboboxItem", + comboboxDropDownItemHoverClass: "comboboxItemHover", + comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader", + comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer", + animationType: "slide", + width: "500px" */ $msg = ''."\n"; if (constant('JS_JQUERY_UI')) print ''."\n"; else print ''."\n"; - print ''."\n"; + print ''."\n"; print ''."\n"; // jQuery Layout if (! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) || defined('REQUIRE_JQUERY_LAYOUT')) diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index 842c2163202..4b30b01ad69 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -127,8 +127,8 @@ if ($result) print '
'.$langs->trans("Total").''.price(price2num($total,'MT')).' '.$langs->trans('Currency'.$conf->currency).''.price(price2num($totalsell,'MT')).' '.$langs->trans('Currency'.$conf->currency).''.price(price2num($total,'MT'),1,$langs,0,0,-1,$conf->currency).''.price(price2num($totalsell,'MT'),1,$langs,0,0,-1,$conf->currency).'