diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php index e70b4ed3483..e4f23785a97 100644 --- a/htdocs/cashdesk/facturation.php +++ b/htdocs/cashdesk/facturation.php @@ -55,6 +55,7 @@ if ( GETPOST('filtre') ) { } $i++; } + $db->free($resql); } else { @@ -90,6 +91,7 @@ if ( GETPOST('filtre') ) { } $i++; } + $db->free($resql); } else { @@ -147,6 +149,7 @@ if ($res) } $i++; } + $db->free($resql); } else { diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 4b438786d56..3fe597d5c66 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -494,7 +494,11 @@ if ($action == 'create') print ''.$langs->trans("Status").' / '.$langs->trans("Percentage").''; print ''; $percent=-1; - if (isset($_GET['percentage']) || isset($_POST['percentage'])) + if (isset($_GET['status']) || isset($_POST['status'])) + { + $percent=GETPOST('status'); + } + else if (isset($_GET['percentage']) || isset($_POST['percentage'])) { $percent=GETPOST('percentage'); } diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index a4b7ad69d24..cb35f6c782a 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -53,7 +53,8 @@ $endyear=$year; $form=new Form($db); -$langs->load("propal"); +$langs->load('propal'); +$langs->load('other'); llxHeader(); diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 07dfb674c74..85bbaae9ef2 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -51,7 +51,8 @@ $year = GETPOST('year')>0?GETPOST('year'):$nowyear; $startyear=$year-1; $endyear=$year; -$langs->load("orders"); +$langs->load('orders'); +$langs->load('other'); /* diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 54d0c800920..67b36fdc586 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -65,7 +65,7 @@ if ($action == 'add') { if (! GETPOST('titre')) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Title")), 'errors'); + setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("Title")), 'errors'); $action = "create"; $error++; } @@ -138,7 +138,7 @@ if ($action == 'create') print ''; // Title - print ''.$langs->trans("Title").''; + print ''.$langs->trans("Title").''; print ''; print ''; diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 4abff5b63be..af45fb24ca7 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -54,8 +54,9 @@ $endyear=$year; * View */ -$langs->load("bills"); -$langs->load("companies"); +$langs->load('bills'); +$langs->load('companies'); +$langs->load('other'); $form=new Form($db); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 000f14ee59f..cb8bc2ee872 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -701,13 +701,13 @@ class Form $selected_input_value=$product->ref; } ======= - if ($selected && empty($selected_input_value)) - { - require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; - $product = new Product($this->db); - $product->fetch($selected); - $selected_input_value=$product->ref; - } + if ($selected && empty($selected_input_value)) + { + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; + $product = new Product($this->db); + $product->fetch($selected); + $selected_input_value=$product->ref; + } >>>>>>> refs/remotes/origin/3.3 // mode=1 means customers products $ajaxoptions=array(); @@ -1657,8 +1657,8 @@ class Form { $opt.= price($objp->fprice).' '.$currencytext."/".$objp->quantity; $outval.= price($objp->fprice).' '.$currencytextnoent."/".$objp->quantity; - $opt.= $langs->trans("Units"); // Do not use strtolower because it breaks utf8 encoding - $outval.=$langs->transnoentities("Units"); + $opt.= ' '.$langs->trans("Units"); // Do not use strtolower because it breaks utf8 encoding + $outval.= ' '.$langs->transnoentities("Units"); } if ($objp->quantity >= 1) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index a9f882dd4e1..0a4842ec0fd 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1150,7 +1150,7 @@ function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0) } else { - if (empty($hidedetails) || $hidedetails > 1) return price($sign * $object->lines[$i]->subprice); + if (empty($hidedetails) || $hidedetails > 1) return price($sign * $object->lines[$i]->subprice, 0, $outputlangs); } } @@ -1175,11 +1175,11 @@ function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0) { if (method_exists($modules[$special_code],'pdf_getlineupwithtax')) return $modules[$special_code]->pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails); } - } - else - { - if (empty($hidedetails) || $hidedetails > 1) return price(($object->lines[$i]->subprice) + ($object->lines[$i]->subprice)*($object->lines[$i]->tva_tx)/100); - } + } + else + { + if (empty($hidedetails) || $hidedetails > 1) return price(($object->lines[$i]->subprice) + ($object->lines[$i]->subprice)*($object->lines[$i]->tva_tx)/100, 0, $outputlangs); + } } /** @@ -1366,7 +1366,7 @@ function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0) } else { - if (empty($hidedetails) || $hidedetails > 1) return price($sign * $object->lines[$i]->total_ht); + if (empty($hidedetails) || $hidedetails > 1) return price($sign * $object->lines[$i]->total_ht, 0, $outputlangs); } } } @@ -1398,13 +1398,13 @@ function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0) { if (method_exists($modules[$special_code],'pdf_getlinetotalwithtax')) return $modules[$special_code]->pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails); } - } - else - { - if (empty($hidedetails) || $hidedetails > 1) return - price(($object->lines[$i]->total_ht) + ($object->lines[$i]->total_ht)*($object->lines[$i]->tva_tx)/100); - } - } + } + else + { + if (empty($hidedetails) || $hidedetails > 1) return + price(($object->lines[$i]->total_ht) + ($object->lines[$i]->total_ht)*($object->lines[$i]->tva_tx)/100, 0, $outputlangs); + } + } } /** diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 67da7cc8540..4622c4fc055 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -698,7 +698,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + 0); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + (! empty($object->remise)?$object->remise:0)), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + (! empty($object->remise)?$object->remise:0), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248,248,248); @@ -739,7 +739,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -772,7 +772,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } @@ -799,7 +799,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } @@ -830,14 +830,14 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey, 0, $outputlangs), 0, 'R', 1); } else { $totalvat.=vatrate(abs($tvakey),1).$tvacompl; $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -870,7 +870,7 @@ class pdf_einstein extends ModelePDFCommandes if ($localtax_type == '7') { // amount on order $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey, 0, $outputlangs), 0, 'R', 1); } else { @@ -878,7 +878,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -893,7 +893,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc, 0, $outputlangs), $useborder, 'R', 1); } } @@ -915,7 +915,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPaid"), 0, 'L', 0); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle), 0, 'R', 0); + $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle, 0, $outputlangs), 0, 'R', 0); $index++; $pdf->SetTextColor(0,0,60); @@ -924,7 +924,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer, 0, $outputlangs), $useborder, 'R', 1); $pdf->SetFont('','', $default_font_size - 1); $pdf->SetTextColor(0,0,0); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 9ee7f701217..b74d31dad14 100755 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -585,7 +585,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($tab3_posx, $tab3_top+$y); $pdf->MultiCell(20, 3, dol_print_date($obj->datef,'day',false,$outputlangs,true), 0, 'L', 0); $pdf->SetXY($tab3_posx+21, $tab3_top+$y); - $pdf->MultiCell(20, 3, price($obj->amount_ttc), 0, 'L', 0); + $pdf->MultiCell(20, 3, price($obj->amount_ttc, 0, $outputlangs), 0, 'L', 0); $pdf->SetXY($tab3_posx+40, $tab3_top+$y); $pdf->MultiCell(20, 3, $text, 0, 'L', 0); $pdf->SetXY($tab3_posx+58, $tab3_top+$y); @@ -622,7 +622,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($tab3_posx, $tab3_top+$y); $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date),'day',false,$outputlangs,true), 0, 'L', 0); $pdf->SetXY($tab3_posx+21, $tab3_top+$y); - $pdf->MultiCell(20, 3, price($sign * $row->amount), 0, 'L', 0); + $pdf->MultiCell(20, 3, price($sign * $row->amount, 0, $outputlangs), 0, 'L', 0); $pdf->SetXY($tab3_posx+40, $tab3_top+$y); $oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort" . $row->code); @@ -732,7 +732,7 @@ class pdf_crabe extends ModelePDFFactures if (! empty($conf->global->FACTURE_CHQ_NUMBER)) { $diffsizetitle=(empty($conf->global->PDF_DIFFSIZE_TITLE)?3:$conf->global->PDF_DIFFSIZE_TITLE); - + if ($conf->global->FACTURE_CHQ_NUMBER > 0) { $account = new Account($this->db); @@ -831,7 +831,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + 0); - $pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($object->total_ht + (! empty($object->remise)?$object->remise:0))), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($object->total_ht + (! empty($object->remise)?$object->remise:0)), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248,248,248); @@ -874,7 +874,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -908,7 +908,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } @@ -935,7 +935,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } @@ -966,14 +966,14 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey, 0, $outputlangs), 0, 'R', 1); } else { $totalvat.=vatrate(abs($tvakey),1).$tvacompl; $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -1007,7 +1007,7 @@ class pdf_crabe extends ModelePDFFactures if ($localtax_type == '7') { // amount on order $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey, 0, $outputlangs), 0, 'R', 1); } else { @@ -1015,7 +1015,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -1041,7 +1041,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($sign * $object->total_ttc), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($sign * $object->total_ttc, 0, $outputlangs), $useborder, 'R', 1); } } @@ -1060,7 +1060,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("Paid"), 0, 'L', 0); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle + $depositsamount), 0, 'R', 0); + $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle + $depositsamount, 0, $outputlangs), 0, 'R', 0); // Credit note if ($creditnoteamount) @@ -1069,7 +1069,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("CreditNotes"), 0, 'L', 0); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($creditnoteamount), 0, 'R', 0); + $pdf->MultiCell($largcol2, $tab2_hl, price($creditnoteamount, 0, $outputlangs), 0, 'R', 0); } // Escompte @@ -1081,7 +1081,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOffered"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle - $creditnoteamount - $depositsamount), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 0, $outputlangs), $useborder, 'R', 1); $resteapayer=0; } @@ -1092,7 +1092,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer, 0, $outputlangs), $useborder, 'R', 1); // Fin $pdf->SetFont('','', $default_font_size - 1); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 6018456fce7..c8450c9369c 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -727,7 +727,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + 0); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + (! empty($object->remise)?$object->remise:0)), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + (! empty($object->remise)?$object->remise:0), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248,248,248); @@ -769,7 +769,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -803,7 +803,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } @@ -830,7 +830,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } @@ -861,14 +861,14 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey, 0, $outputlangs), 0, 'R', 1); } else { $totalvat.=vatrate(abs($tvakey),1).$tvacompl; $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -901,7 +901,7 @@ class pdf_azur extends ModelePDFPropales if ($localtax_type == '7') { // amount on order $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey, 0, $outputlangs), 0, 'R', 1); } else { @@ -909,7 +909,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -924,7 +924,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc, 0, $outputlangs), $useborder, 'R', 1); } } @@ -943,7 +943,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPaid"), 0, 'L', 0); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle), 0, 'R', 0); + $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle, 0, $outputlangs), 0, 'R', 0); /* if ($object->close_code == 'discount_vat') @@ -955,7 +955,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOffered"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle, 0, $outputlangs), $useborder, 'R', 1); $resteapayer=0; } @@ -968,7 +968,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer, 0, $outputlangs), $useborder, 'R', 1); $pdf->SetFont('','', $default_font_size - 1); $pdf->SetTextColor(0,0,0); diff --git a/htdocs/ecm/docmine.php b/htdocs/ecm/docmine.php index 23ac16e75fe..8ba84f6fc76 100644 --- a/htdocs/ecm/docmine.php +++ b/htdocs/ecm/docmine.php @@ -132,6 +132,7 @@ if ($action == 'confirm_deletedir' && $confirm == 'yes') } else { + $langs->load('errors'); setEventMessage($langs->trans($ecmdir->error,$ecmdir->label), 'errors'); } } diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 3374393310e..633115fa373 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -986,8 +986,7 @@ class CommandeFournisseur extends CommonOrder ); if ($result < 0) { - $this->error=$this->db->lasterror(); - dol_print_error($this->db); + dol_syslog(get_class($this)."::create ".$this->error, LOG_WARNING); // do not use dol_print_error here as it may be a functionnal error $this->db->rollback(); return -1; } @@ -1022,7 +1021,7 @@ class CommandeFournisseur extends CommonOrder } else if ($reshook < 0) $error++; } - + if (! $notrigger) { // Appel des triggers @@ -1441,7 +1440,7 @@ class CommandeFournisseur extends CommonOrder { $error++; } - + // Remove extrafields if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used { diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 1bb3fa405af..8bdd44adcf3 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1109,7 +1109,7 @@ elseif (! empty($object->id)) //'text' => $langs->trans("ConfirmClone"), //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), - array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)) + array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)) ); } diff --git a/htdocs/holiday/common.inc.php b/htdocs/holiday/common.inc.php index 072b4818be6..adf490b61a3 100644 --- a/htdocs/holiday/common.inc.php +++ b/htdocs/holiday/common.inc.php @@ -42,27 +42,4 @@ if (empty($conf->holiday->enabled)) exit(); } - -/*$sql = "SELECT value"; -$sql.= " FROM ".MAIN_DB_PREFIX."holiday_config"; -$sql.= " WHERE name = 'userGroup'"; - -$result = $db->query($sql); -$obj = $db->fetch_object($result); - -if ($obj->value == null || $obj->value < 0) -{ - llxHeader('',$langs->trans('CPTitreMenu')); - - $langs->load("errors"); - $warnpicto=img_error($langs->trans("WarningMandatorySetupNotComplete")); - print '
'; - print $warnpicto.' '.$langs->trans("NotConfigModCP"); - print '
'; - - llxFooter(); - exit(); -} -*/ - -?> +?> \ No newline at end of file diff --git a/htdocs/includes/tcpdf/tcpdf.php b/htdocs/includes/tcpdf/tcpdf.php index a2fe57578e1..aee6fedeef3 100644 --- a/htdocs/includes/tcpdf/tcpdf.php +++ b/htdocs/includes/tcpdf/tcpdf.php @@ -76,7 +76,7 @@ // dullus for text Justification. // Bob Vincent (pillarsdotnet@users.sourceforge.net) for
  • value attribute. // Patrick Benny for text stretch suggestion on Cell(). -// Johannes Gntert for JavaScript support. +// Johannes G�ntert for JavaScript support. // Denis Van Nuffelen for Dynamic Form. // Jacek Czekaj for multibyte justification // Anthony Ferrara for the reintroduction of legacy image methods. @@ -87,7 +87,7 @@ // Mohamad Ali Golkar, Saleh AlMatrafe, Charles Abbott for Arabic and Persian support. // Moritz Wagner and Andreas Wurmser for graphic functions. // Andrew Whitehead for core fonts support. -// Esteban Jol Marn for OpenType font conversion. +// Esteban Jo�l Mar�n for OpenType font conversion. // Teus Hagen for several suggestions and fixes. // Yukihiro Nakadaira for CID-0 CJK fonts fixes. // Kosmas Papachristos for some CSS improvements. @@ -5324,7 +5324,7 @@ class TCPDF { $cbbox = array(); } // initialize subsetchars - $subsetchars = array(); + $subsetchars = array_fill(0, 256, true); $this->setFontBuffer($fontkey, array('fontkey' => $fontkey, 'i' => $this->numfonts, 'type' => $type, 'name' => $name, 'desc' => $desc, 'up' => $up, 'ut' => $ut, 'cw' => $cw, 'cbbox' => $cbbox, 'dw' => $dw, 'enc' => $enc, 'cidinfo' => $cidinfo, 'file' => $file, 'ctg' => $ctg, 'subset' => $subset, 'subsetchars' => $subsetchars)); if ($this->inxobj) { // we are inside an XObject template @@ -7123,7 +7123,7 @@ class TCPDF { * @param $cellpadding (float) Internal cell padding, if empty uses default cell padding. * @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number: or a string containing some or all of the following characters (in any order): or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) * @return float Return the minimal height needed for multicell method for printing the $txt param. - * @author Alexander Escalona Fernndez, Nicola Asuni + * @author Alexander Escalona Fern�ndez, Nicola Asuni * @public * @since 4.5.011 */ @@ -7230,7 +7230,7 @@ class TCPDF { * @param $cellpadding (float) Internal cell padding, if empty uses default cell padding. * @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number: or a string containing some or all of the following characters (in any order): or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) * @return float Return the minimal height needed for multicell method for printing the $txt param. - * @author Nicola Asuni, Alexander Escalona Fernndez + * @author Nicola Asuni, Alexander Escalona Fern�ndez * @public */ public function getStringHeight($w, $txt, $reseth=false, $autopadding=true, $cellpadding='', $border=0) { @@ -15417,7 +15417,7 @@ class TCPDF { } /** - * Append a cubic Bzier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the Bzier control points. + * Append a cubic B�zier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the B�zier control points. * The new current point shall be (x3, y3). * @param $x1 (float) Abscissa of control point 1. * @param $y1 (float) Ordinate of control point 1. @@ -15435,7 +15435,7 @@ class TCPDF { } /** - * Append a cubic Bzier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using the current point and (x2, y2) as the Bzier control points. + * Append a cubic B�zier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using the current point and (x2, y2) as the B�zier control points. * The new current point shall be (x3, y3). * @param $x2 (float) Abscissa of control point 2. * @param $y2 (float) Ordinate of control point 2. @@ -15451,7 +15451,7 @@ class TCPDF { } /** - * Append a cubic Bzier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x3, y3) as the Bzier control points. + * Append a cubic B�zier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x3, y3) as the B�zier control points. * The new current point shall be (x3, y3). * @param $x1 (float) Abscissa of control point 1. * @param $y1 (float) Ordinate of control point 1. @@ -16855,7 +16855,7 @@ class TCPDF { /** * Insert Named Destinations. * @protected - * @author Johannes Gntert, Nicola Asuni + * @author Johannes G�ntert, Nicola Asuni * @since 5.9.098 (2011-06-23) */ protected function _putdests() { @@ -17054,7 +17054,7 @@ class TCPDF { * Adds a javascript * @param $script (string) Javascript code * @public - * @author Johannes Gntert, Nicola Asuni + * @author Johannes G�ntert, Nicola Asuni * @since 2.1.002 (2008-02-12) */ public function IncludeJS($script) { @@ -17083,7 +17083,7 @@ class TCPDF { /** * Create a javascript PDF string. * @protected - * @author Johannes Gntert, Nicola Asuni + * @author Johannes G�ntert, Nicola Asuni * @since 2.1.002 (2008-02-12) */ protected function _putjavascript() { @@ -19146,7 +19146,7 @@ class TCPDF { * @param $col1 (array) first color (Grayscale, RGB or CMYK components). * @param $col2 (array) second color (Grayscale, RGB or CMYK components). * @param $coords (array) array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). The default value is from left to right (x1=0, y1=0, x2=1, y2=0). - * @author Andreas Wrmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @public */ @@ -19164,7 +19164,7 @@ class TCPDF { * @param $col1 (array) first color (Grayscale, RGB or CMYK components). * @param $col2 (array) second color (Grayscale, RGB or CMYK components). * @param $coords (array) array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). (fx, fy) should be inside the circle, otherwise some areas will not be defined. - * @author Andreas Wrmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @public */ @@ -19187,7 +19187,7 @@ class TCPDF { * @param $coords_min (array) minimum value used by the coordinates. If a coordinate's value is smaller than this it will be cut to coords_min. default: 0 * @param $coords_max (array) maximum value used by the coordinates. If a coordinate's value is greater than this it will be cut to coords_max. default: 1 * @param $antialias (boolean) A flag indicating whether to filter the shading function to prevent aliasing artifacts. - * @author Andreas Wrmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @public */ @@ -19279,7 +19279,7 @@ class TCPDF { * @param $y (float) ordinate of the top left corner of the rectangle. * @param $w (float) width of the rectangle. * @param $h (float) height of the rectangle. - * @author Andreas Wrmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @protected */ @@ -20797,19 +20797,19 @@ class TCPDF { // remove empty blocks $cssdata = preg_replace('/([^\}\{]+)\{\}/', '', $cssdata); // replace media type parenthesis - $cssdata = preg_replace('/@media[\s]+([^\{]*)\{/i', '@media \\1', $cssdata); - $cssdata = preg_replace('/\}\}/si', '}', $cssdata); + $cssdata = preg_replace('/@media[\s]+([^\{]*)\{/i', '@media \\1�', $cssdata); + $cssdata = preg_replace('/\}\}/si', '}�', $cssdata); // trim string $cssdata = trim($cssdata); // find media blocks (all, braille, embossed, handheld, print, projection, screen, speech, tty, tv) $cssblocks = array(); $matches = array(); - if (preg_match_all('/@media[\s]+([^\]*)([^]*)/i', $cssdata, $matches) > 0) { + if (preg_match_all('/@media[\s]+([^\�]*)�([^�]*)�/i', $cssdata, $matches) > 0) { foreach ($matches[1] as $key => $type) { $cssblocks[$type] = $matches[2][$key]; } // remove media blocks - $cssdata = preg_replace('/@media[\s]+([^\]*)([^]*)/i', '', $cssdata); + $cssdata = preg_replace('/@media[\s]+([^\�]*)�([^�]*)�/i', '', $cssdata); } // keep 'all' and 'print' media, other media types are discarded if (isset($cssblocks['all']) AND !empty($cssblocks['all'])) { @@ -29032,7 +29032,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } break; } - case 'Q': { // quadratic Bzier curveto + case 'Q': { // quadratic B�zier curveto foreach ($params as $ck => $cp) { $params[$ck] = $cp; if ((($ck + 1) % 4) == 0) { @@ -29058,7 +29058,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } break; } - case 'T': { // shorthand/smooth quadratic Bzier curveto + case 'T': { // shorthand/smooth quadratic B�zier curveto foreach ($params as $ck => $cp) { $params[$ck] = $cp; if (($ck % 2) != 0) { diff --git a/htdocs/langs/el_GR/other.lang b/htdocs/langs/el_GR/other.lang index b3c717c3550..1afefb9578e 100644 --- a/htdocs/langs/el_GR/other.lang +++ b/htdocs/langs/el_GR/other.lang @@ -109,7 +109,6 @@ ToExport=Export NewExport=New export ##### External sites ##### ExternalSites=External sites -FONTFORPDF=Freemono // START - Lines generated via autotranslator.php tool (2011-06-26 15:35:22). diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 64f8fbd44cf..8a297b6adce 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -19,7 +19,7 @@ FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p DatabaseConnection=Database connection NoTranslation=No translation -NoRecordFound=Aucun enregistrement trouvé +NoRecordFound=No record found NoError=No error Error=Error ErrorFieldRequired=Field '%s' is required diff --git a/htdocs/langs/es_ES/products.lang b/htdocs/langs/es_ES/products.lang index 66d64d3d4ff..fc9a1fb1d3c 100644 --- a/htdocs/langs/es_ES/products.lang +++ b/htdocs/langs/es_ES/products.lang @@ -84,14 +84,14 @@ ShowService=Mostrar servicio ProductsAndServicesArea=Área productos y servicios ProductsArea=Área Productos ServicesArea=Área Servicios -AddToMyProposals=Adjuntar a mis presupuestos -AddToOtherProposals=Adjuntar a otros presupuestos -AddToMyBills=Adjuntar a mis facturas -AddToOtherBills=Adjuntar a otras facturas +AddToMyProposals=Añadir a mis presupuestos +AddToOtherProposals=Añadir a otros presupuestos +AddToMyBills=Añadir a mis facturas +AddToOtherBills=Añadir a otras facturas CorrectStock=Corregir stock AddPhoto=Adjuntar una foto ListOfStockMovements=Listado de movimientos de stock -NoPhotoYet=No hay fotografía disponible por el momento +NoPhotoYet=No hay fotografías disponibles por el momento BuyingPrice=Precio de compra SupplierCard=Ficha proveedor CommercialCard=Ficha comercial @@ -114,6 +114,8 @@ AssociatedProductsAbility=Activar productos compuestos AssociatedProducts=Productos compuestos AssociatedProductsNumber=Nº de productos que componen este producto ParentProductsNumber=Nº de productos que este producto compone +IfZeroItIsNotAVirtualProduct=Si 0, este producto no es un producto virtual +IfZeroItIsNotUsedByVirtualProduct=Si 0, este producto no está siendo utilizado por ningún producto virtual EditAssociate=Componer Translation=Traducción KeywordFilter=Filtro por clave diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/fiche.php index 71ce35c76e1..644c321b8bb 100644 --- a/htdocs/product/composition/fiche.php +++ b/htdocs/product/composition/fiche.php @@ -72,7 +72,6 @@ $cancel <> $langs->trans("Cancel") && $error=0; for($i=0;$i<$_POST["max_prod"];$i++) { - print "
    : ".$_POST["prod_id_chk".$i]; if ($_POST["prod_id_chk".$i] > 0) { if($product->add_sousproduit($id, $_POST["prod_id_".$i],$_POST["prod_qty_".$i]) > 0) diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 0a8aed4634f..fa1f0fa5621 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -1417,7 +1417,7 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) $langs->load("bills"); $html .= ''; - $html .= ''.$langs->trans("AddToOtherOrders").''; + $html .= ''.$langs->trans("AddToOtherBills").''; $html .= ''; $html .= ''; diff --git a/test/phpunit/NumberingModulesTest.php b/test/phpunit/NumberingModulesTest.php index 5e93e32fe22..0700c784bae 100644 --- a/test/phpunit/NumberingModulesTest.php +++ b/test/phpunit/NumberingModulesTest.php @@ -212,9 +212,9 @@ class NumberingModulesTest extends PHPUnit_Framework_TestCase $this->assertEquals(1, $result); // Case 1 can be deleted (because there was a reset for case 2) // Try an offset when an invoice already exists - $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000+9990}'; - $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000+9990}'; - $result=$numbering->getNextValue($mysoc, $localobject2); + $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000+9990}'; + $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000+9990}'; + $result=$numbering->getNextValue($mysoc, $localobject2); // Now we try with a different fiscal month (forced by mask) $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@6}'; diff --git a/test/phpunit/phpunittest.xml b/test/phpunit/phpunittest.xml index 424359786ae..35083cb6d0f 100644 --- a/test/phpunit/phpunittest.xml +++ b/test/phpunit/phpunittest.xml @@ -47,6 +47,7 @@ ../../htdocs/societe/canvas/ ../../htdocs/includes/ ../../htdocs/boutique/osc_master.inc.php + ../../htdocs/holiday/common.inc.php