Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'develop' of ssh://git@github.com/Dolibarr/dolibarr.git …

…into develop
  • Loading branch information...
commit 545eaa15c626697ac34a514c254c7a17e8c2cef3 2 parents 864ca30 + 99ac04b
Laurent Destailleur eldy authored
182 htdocs/admin/company.php
@@ -51,11 +51,11 @@
51 51 {
52 52 require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
53 53
54   - $new_country_id=$_POST["country_id"];
55   - $new_country_code=getCountry($new_country_id,2);
56   - $new_country_label=getCountry($new_country_id,0);
  54 + $mysoc->country_id=$_POST["country_id"];
  55 + $mysoc->country_code=getCountry($mysoc->country_id,2);
  56 + $mysoc->country_label=getCountry($mysoc->country_id,0);
57 57
58   - dolibarr_set_const($db, "MAIN_INFO_SOCIETE_PAYS", $new_country_id.':'.$new_country_code.':'.$new_country_label,'chaine',0,'',$conf->entity);
  58 + dolibarr_set_const($db, "MAIN_INFO_SOCIETE_PAYS", $mysoc->country_id.':'.$mysoc->country_code.':'.$mysoc->country_label,'chaine',0,'',$conf->entity);
59 59
60 60 dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"],'chaine',0,'',$conf->entity);
61 61 dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADRESSE",$_POST["address"],'chaine',0,'',$conf->entity);
@@ -236,31 +236,6 @@
236 236
237 237 $countrynotdefined='<font class="error">'.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')</font>';
238 238
239   -// We define country_id, country_code and country
240   -if (! empty($conf->global->MAIN_INFO_SOCIETE_PAYS))
241   -{
242   - $tmp=explode(':',$conf->global->MAIN_INFO_SOCIETE_PAYS);
243   - $country_id=$tmp[0];
244   - if (! empty($tmp[1])) // If $conf->global->MAIN_INFO_SOCIETE_PAYS is "id:code:label"
245   - {
246   - $country_code=$tmp[1];
247   - $country=$tmp[2];
248   - }
249   - else
250   - {
251   - $tmparray=getCountry($country_id,'all');
252   - $country_code=$tmparray['code'];
253   - $country=$tmparray['label'];
254   - }
255   -}
256   -else
257   -{
258   - $country_id=0;
259   - $country_code='';
260   - $country='';
261   -}
262   -
263   -
264 239 print_fiche_titre($langs->trans("CompanyFoundation"),'','setup');
265 240
266 241 print $langs->trans("CompanyFundationDesc")."<br>\n";
@@ -307,15 +282,14 @@
307 282 // Country
308 283 $var=!$var;
309 284 print '<tr '.$bc[$var].'><td class="fieldrequired">'.$langs->trans("Country").'</td><td>';
310   - $pays_selected=$country_id;
311 285 //if (empty($pays_selected)) $pays_selected=substr($langs->defaultlang,-2); // Par defaut, pays de la localisation
312   - print $form->select_country($pays_selected,'country_id');
  286 + print $form->select_country($mysoc->country_id,'country_id');
313 287 if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
314 288 print '</td></tr>'."\n";
315 289
316 290 $var=!$var;
317 291 print '<tr '.$bc[$var].'><td>'.$langs->trans("State").'</td><td>';
318   - $formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT,$country_code,'departement_id');
  292 + $formcompany->select_departement($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT,$mysoc->country_code,'departement_id');
319 293 print '</td></tr>'."\n";
320 294
321 295 $var=!$var;
@@ -400,9 +374,9 @@
400 374 // Forme juridique
401 375 $var=!$var;
402 376 print '<tr '.$bc[$var].'><td>'.$langs->trans("JuridicalStatus").'</td><td>';
403   - if ($country_code)
  377 + if ($mysoc->country_code)
404 378 {
405   - $formcompany->select_forme_juridique($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,$country_code);
  379 + $formcompany->select_forme_juridique($conf->global->MAIN_INFO_SOCIETE_FORME_JURIDIQUE,$mysoc->country_code);
406 380 }
407 381 else
408 382 {
@@ -411,11 +385,11 @@
411 385 print '</td></tr>';
412 386
413 387 // ProfID1
414   - if ($langs->transcountry("ProfId1",$country_code) != '-')
  388 + if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
415 389 {
416 390 $var=!$var;
417   - print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$country_code).'</td><td>';
418   - if ($country_code)
  391 + print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$mysoc->country_code).'</td><td>';
  392 + if ($mysoc->country_code)
419 393 {
420 394 print '<input name="siren" size="20" value="' . $conf->global->MAIN_INFO_SIREN . '">';
421 395 }
@@ -427,11 +401,11 @@
427 401 }
428 402
429 403 // ProfId2
430   - if ($langs->transcountry("ProfId2",$country_code) != '-')
  404 + if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
431 405 {
432 406 $var=!$var;
433   - print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$country_code).'</td><td>';
434   - if ($country_code)
  407 + print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$mysoc->country_code).'</td><td>';
  408 + if ($mysoc->country_code)
435 409 {
436 410 print '<input name="siret" size="20" value="' . $conf->global->MAIN_INFO_SIRET . '">';
437 411 }
@@ -443,11 +417,11 @@
443 417 }
444 418
445 419 // ProfId3
446   - if ($langs->transcountry("ProfId3",$country_code) != '-')
  420 + if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
447 421 {
448 422 $var=!$var;
449   - print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$country_code).'</td><td>';
450   - if ($country_code)
  423 + print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$mysoc->country_code).'</td><td>';
  424 + if ($mysoc->country_code)
451 425 {
452 426 print '<input name="ape" size="20" value="' . $conf->global->MAIN_INFO_APE . '">';
453 427 }
@@ -459,11 +433,11 @@
459 433 }
460 434
461 435 // ProfId4
462   - if ($langs->transcountry("ProfId4",$country_code) != '-')
  436 + if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
463 437 {
464 438 $var=!$var;
465   - print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$country_code).'</td><td>';
466   - if ($country_code)
  439 + print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$mysoc->country_code).'</td><td>';
  440 + if ($mysoc->country_code)
467 441 {
468 442 print '<input name="rcs" size="20" value="' . $conf->global->MAIN_INFO_RCS . '">';
469 443 }
@@ -475,11 +449,11 @@
475 449 }
476 450
477 451 // ProfId5
478   - if ($langs->transcountry("ProfId5",$country_code) != '-')
  452 + if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
479 453 {
480 454 $var=!$var;
481   - print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId5",$country_code).'</td><td>';
482   - if ($country_code)
  455 + print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId5",$mysoc->country_code).'</td><td>';
  456 + if ($mysoc->country_code)
483 457 {
484 458 print '<input name="MAIN_INFO_PROFID5" size="20" value="' . $conf->global->MAIN_INFO_PROFID5 . '">';
485 459 }
@@ -491,11 +465,11 @@
491 465 }
492 466
493 467 // ProfId6
494   - if ($langs->transcountry("ProfId6",$country_code) != '-')
  468 + if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
495 469 {
496 470 $var=!$var;
497   - print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId6",$country_code).'</td><td>';
498   - if ($country_code)
  471 + print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId6",$mysoc->country_code).'</td><td>';
  472 + if ($mysoc->country_code)
499 473 {
500 474 print '<input name="MAIN_INFO_PROFID6" size="20" value="' . $conf->global->MAIN_INFO_PROFID6 . '">';
501 475 }
@@ -566,32 +540,32 @@
566 540 /*
567 541 * Local Taxes
568 542 */
569   - if ($country_code=='ES')
  543 + if ($mysoc->country_code=='ES')
570 544 {
571 545 // Local Tax 1
572 546 print '<br>';
573 547 print '<table class="noborder" width="100%">';
574 548 print '<tr class="liste_titre">';
575   - print '<td>'.$langs->transcountry("LocalTax1Management",$country_code).'</td><td>'.$langs->trans("Description").'</td>';
  549 + print '<td>'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
576 550 print '<td align="right">&nbsp;</td>';
577 551 print "</tr>\n";
578 552 $var=true;
579 553
580 554 $var=!$var;
581   - print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax1\" value=\"localtax1on\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION != "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$country_code)."</label></td>";
  555 + print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax1\" value=\"localtax1on\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION != "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."</label></td>";
582 556 print '<td colspan="2">';
583 557 print "<table>";
584   - print "<tr><td>".$langs->transcountry("LocalTax1IsUsedDesc",$country_code)."</td></tr>";
585   - print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$country_code)."</i></td></tr>\n";
  558 + print "<tr><td>".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."</td></tr>";
  559 + print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)."</i></td></tr>\n";
586 560 print "</table>";
587 561 print "</td></tr>\n";
588 562
589 563 $var=!$var;
590   - print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax1\" value=\"localtax1off\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$country_code)."</label></td>";
  564 + print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax1\" value=\"localtax1off\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."</label></td>";
591 565 print '<td colspan="2">';
592 566 print "<table>";
593   - print "<tr><td>".$langs->transcountry("LocalTax1IsNotUsedDesc",$country_code)."</td></tr>";
594   - print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample",$country_code)."</i></td></tr>\n";
  567 + print "<tr><td>".$langs->transcountry("LocalTax1IsNotUsedDesc",$mysoc->country_code)."</td></tr>";
  568 + print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code)."</i></td></tr>\n";
595 569 print "</table>";
596 570 print "</td></tr>\n";
597 571 print "</table>";
@@ -600,26 +574,26 @@
600 574 print '<br>';
601 575 print '<table class="noborder" width="100%">';
602 576 print '<tr class="liste_titre">';
603   - print '<td>'.$langs->transcountry("LocalTax2Management",$country_code).'</td><td>'.$langs->trans("Description").'</td>';
  577 + print '<td>'.$langs->transcountry("LocalTax2Management",$mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
604 578 print '<td align="right">&nbsp;</td>';
605 579 print "</tr>\n";
606 580 $var=true;
607 581
608 582 $var=!$var;
609   - print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax2\" value=\"localtax2on\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION != "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$country_code)."</label></td>";
  583 + print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax2\" value=\"localtax2on\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION != "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."</label></td>";
610 584 print '<td colspan="2">';
611 585 print "<table>";
612   - print "<tr><td>".$langs->transcountry("LocalTax2IsUsedDesc",$country_code)."</td></tr>";
613   - print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$country_code)."</i></td></tr>\n";
  586 + print "<tr><td>".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."</td></tr>";
  587 + print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)."</i></td></tr>\n";
614 588 print "</table>";
615 589 print "</td></tr>\n";
616 590
617 591 $var=!$var;
618   - print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax2\" value=\"localtax2off\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$country_code)."</label></td>";
  592 + print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optionlocaltax2\" value=\"localtax2off\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."</label></td>";
619 593 print '<td colspan="2">';
620 594 print "<table>";
621   - print "<tr><td>".$langs->transcountry("LocalTax2IsNotUsedDesc",$country_code)."</td></tr>";
622   - print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$country_code)."</i></td></tr>\n";
  595 + print "<tr><td>".$langs->transcountry("LocalTax2IsNotUsedDesc",$mysoc->country_code)."</td></tr>";
  596 + print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code)."</i></td></tr>\n";
623 597 print "</table>";
624 598 print "</td></tr>\n";
625 599 print "</table>";
@@ -669,11 +643,11 @@
669 643
670 644 $var=!$var;
671 645 print '<tr '.$bc[$var].'><td>'.$langs->trans("CompanyCountry").'</td><td>';
672   - if ($country_code)
  646 + if ($mysoc->country_code)
673 647 {
674   - $img=picto_from_langcode($country_code);
  648 + $img=picto_from_langcode($mysoc->country_code);
675 649 print $img?$img.' ':'';
676   - print getCountry($country_code,1);
  650 + print getCountry($mysoc->country_code,1);
677 651 }
678 652 else print img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
679 653 print '</td></tr>';
@@ -763,24 +737,24 @@
763 737 print '</td></tr>';
764 738
765 739 // ProfId1
766   - if ($langs->transcountry("ProfId1",$country_code) != '-')
  740 + if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
767 741 {
768 742 $var=!$var;
769   - print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$country_code).'</td><td>';
770   - if ($langs->transcountry("ProfId1",$country_code) != '-')
  743 + print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId1",$mysoc->country_code).'</td><td>';
  744 + if ($langs->transcountry("ProfId1",$mysoc->country_code) != '-')
771 745 {
772 746 print $conf->global->MAIN_INFO_SIREN;
773   - if ($conf->global->MAIN_INFO_SIREN && $country_code == 'FR') print ' &nbsp; <a href="http://avis-situation-sirene.insee.fr/avisitu/jsp/avis.jsp" target="_blank">'.$langs->trans("Check").'</a>';
  747 + if ($conf->global->MAIN_INFO_SIREN && $mysoc->country_code == 'FR') print ' &nbsp; <a href="http://avis-situation-sirene.insee.fr/avisitu/jsp/avis.jsp" target="_blank">'.$langs->trans("Check").'</a>';
774 748 }
775 749 print '</td></tr>';
776 750 }
777 751
778 752 // ProfId2
779   - if ($langs->transcountry("ProfId2",$country_code) != '-')
  753 + if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
780 754 {
781 755 $var=!$var;
782   - print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$country_code).'</td><td>';
783   - if ($langs->transcountry("ProfId2",$country_code) != '-')
  756 + print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId2",$mysoc->country_code).'</td><td>';
  757 + if ($langs->transcountry("ProfId2",$mysoc->country_code) != '-')
784 758 {
785 759 print $conf->global->MAIN_INFO_SIRET;
786 760 }
@@ -788,11 +762,11 @@
788 762 }
789 763
790 764 // ProfId3
791   - if ($langs->transcountry("ProfId3",$country_code) != '-')
  765 + if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
792 766 {
793 767 $var=!$var;
794   - print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$country_code).'</td><td>';
795   - if ($langs->transcountry("ProfId3",$country_code) != '-')
  768 + print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId3",$mysoc->country_code).'</td><td>';
  769 + if ($langs->transcountry("ProfId3",$mysoc->country_code) != '-')
796 770 {
797 771 print $conf->global->MAIN_INFO_APE;
798 772 }
@@ -800,11 +774,11 @@
800 774 }
801 775
802 776 // ProfId4
803   - if ($langs->transcountry("ProfId4",$country_code) != '-')
  777 + if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
804 778 {
805 779 $var=!$var;
806   - print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$country_code).'</td><td>';
807   - if ($langs->transcountry("ProfId4",$country_code) != '-')
  780 + print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId4",$mysoc->country_code).'</td><td>';
  781 + if ($langs->transcountry("ProfId4",$mysoc->country_code) != '-')
808 782 {
809 783 print $conf->global->MAIN_INFO_RCS;
810 784 }
@@ -812,11 +786,11 @@
812 786 }
813 787
814 788 // ProfId5
815   - if ($langs->transcountry("ProfId5",$country_code) != '-')
  789 + if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
816 790 {
817 791 $var=!$var;
818   - print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId5",$country_code).'</td><td>';
819   - if ($langs->transcountry("ProfId5",$country_code) != '-')
  792 + print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId5",$mysoc->country_code).'</td><td>';
  793 + if ($langs->transcountry("ProfId5",$mysoc->country_code) != '-')
820 794 {
821 795 print $conf->global->MAIN_INFO_PROFID5;
822 796 }
@@ -824,11 +798,11 @@
824 798 }
825 799
826 800 // ProfId6
827   - if ($langs->transcountry("ProfId6",$country_code) != '-')
  801 + if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
828 802 {
829 803 $var=!$var;
830   - print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId6",$country_code).'</td><td>';
831   - if ($langs->transcountry("ProfId6",$country_code) != '-')
  804 + print '<tr '.$bc[$var].'><td width="35%">'.$langs->transcountry("ProfId6",$mysoc->country_code).'</td><td>';
  805 + if ($langs->transcountry("ProfId6",$mysoc->country_code) != '-')
832 806 {
833 807 print $conf->global->MAIN_INFO_PROFID6;
834 808 }
@@ -928,32 +902,32 @@
928 902 /*
929 903 * Local Taxes
930 904 */
931   - if ($country_code=='ES')
  905 + if ($mysoc->country_code=='ES')
932 906 {
933 907 // Local Tax 1
934 908 print '<br>';
935 909 print '<table class="noborder" width="100%">';
936 910 print '<tr class="liste_titre">';
937   - print '<td>'.$langs->transcountry("LocalTax1Management",$country_code).'</td><td>'.$langs->trans("Description").'</td>';
  911 + print '<td>'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
938 912 print '<td align="right">&nbsp;</td>';
939 913 print "</tr>\n";
940 914 $var=true;
941 915
942 916 $var=!$var;
943   - print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax1\" disabled value=\"localtax1on\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION != "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$country_code)."</label></td>";
  917 + print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax1\" disabled value=\"localtax1on\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION != "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."</label></td>";
944 918 print '<td colspan="2">';
945 919 print "<table>";
946   - print "<tr><td>".$langs->transcountry("LocalTax1IsUsedDesc",$country_code)."</td></tr>";
947   - print "<tr><td><i>".$langs->trans("Example",$country_code).': '.$langs->transcountry("LocalTax1IsUsedExample",$country_code)."</i></td></tr>\n";
  920 + print "<tr><td>".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."</td></tr>";
  921 + print "<tr><td><i>".$langs->trans("Example",$mysoc->country_code).': '.$langs->transcountry("LocalTax1IsUsedExample",$mysoc->country_code)."</i></td></tr>\n";
948 922 print "</table>";
949 923 print "</td></tr>\n";
950 924
951 925 $var=!$var;
952   - print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax1\" disabled value=\"localtax1off\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$country_code)."</label></td>";
  926 + print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax1\" disabled value=\"localtax1off\"".($conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off"?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."</label></td>";
953 927 print '<td colspan="2">';
954 928 print "<table>";
955   - print "<tr><td>".$langs->transcountry("LocalTax1IsNotUsedDesc",$country_code)."</td></tr>";
956   - print "<tr><td><i>".$langs->trans("Example",$country_code).': '.$langs->transcountry("LocalTax1IsNotUsedExample",$country_code)."</i></td></tr>\n";
  929 + print "<tr><td>".$langs->transcountry("LocalTax1IsNotUsedDesc",$mysoc->country_code)."</td></tr>";
  930 + print "<tr><td><i>".$langs->trans("Example",$mysoc->country_code).': '.$langs->transcountry("LocalTax1IsNotUsedExample",$mysoc->country_code)."</i></td></tr>\n";
957 931 print "</table>";
958 932 print "</td></tr>\n";
959 933
@@ -963,26 +937,26 @@
963 937 print '<br>';
964 938 print '<table class="noborder" width="100%">';
965 939 print '<tr class="liste_titre">';
966   - print '<td>'.$langs->transcountry("LocalTax2Management",$country_code).'</td><td>'.$langs->trans("Description").'</td>';
  940 + print '<td>'.$langs->transcountry("LocalTax2Management",$mysoc->country_code).'</td><td>'.$langs->trans("Description").'</td>';
967 941 print '<td align="right">&nbsp;</td>';
968 942 print "</tr>\n";
969 943 $var=true;
970 944
971 945 $var=!$var;
972   - print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax2\" disabled value=\"localtax2on\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION != "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$country_code)."</label></td>";
  946 + print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax2\" disabled value=\"localtax2on\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION != "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."</label></td>";
973 947 print '<td colspan="2">';
974 948 print "<table>";
975   - print "<tr><td>".$langs->transcountry("LocalTax2IsUsedDesc",$country_code)."</td></tr>";
976   - print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$country_code)."</i></td></tr>\n";
  949 + print "<tr><td>".$langs->transcountry("LocalTax2IsUsedDesc",$mysoc->country_code)."</td></tr>";
  950 + print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsUsedExample",$mysoc->country_code)."</i></td></tr>\n";
977 951 print "</table>";
978 952 print "</td></tr>\n";
979 953
980 954 $var=!$var;
981   - print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax2\" disabled value=\"localtax2off\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$country_code)."</label></td>";
  955 + print "<tr ".$bc[$var]."><td width=\"140\"><label><input ".$bc[$var]." type=\"radio\" name=\"optionlocaltax2\" disabled value=\"localtax2off\"".($conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off"?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."</label></td>";
982 956 print '<td colspan="2">';
983 957 print "<table>";
984   - print "<tr><td>".$langs->transcountry("LocalTax2IsNotUsedDesc",$country_code)."</td></tr>";
985   - print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$country_code)."</i></td></tr>\n";
  958 + print "<tr><td>".$langs->transcountry("LocalTax2IsNotUsedDesc",$mysoc->country_code)."</td></tr>";
  959 + print "<tr><td><i>".$langs->trans("Example").': '.$langs->transcountry("LocalTax2IsNotUsedExample",$mysoc->country_code)."</i></td></tr>\n";
986 960 print "</table>";
987 961 print "</td></tr>\n";
988 962
12 htdocs/fichinter/class/fichinter.class.php
@@ -73,10 +73,10 @@ function __construct($db)
73 73 // List of language codes for status
74 74 $this->statuts[0]='Draft';
75 75 $this->statuts[1]='Validated';
76   - $this->statuts[2]='Invoiced';
  76 + $this->statuts[2]='StatusInterInvoiced';
77 77 $this->statuts_short[0]='Draft';
78 78 $this->statuts_short[1]='Validated';
79   - $this->statuts_short[2]='Invoiced';
  79 + $this->statuts_short[2]='StatusInterInvoiced';
80 80 }
81 81
82 82
@@ -426,25 +426,25 @@ function LibStatut($statut,$mode=0)
426 426 {
427 427 if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts_short[$statut]);
428 428 if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts_short[$statut]);
429   - if ($statut==2) return img_picto($langs->trans('StatusInterInvoiced'),'statut6').' '.$langs->trans('StatusOrderProcessed');
  429 + if ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6').' '.$langs->trans($this->statuts_short[$statut]);
430 430 }
431 431 if ($mode == 3)
432 432 {
433 433 if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
434 434 if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4');
435   - if ($statut==2) return img_picto($langs->trans('StatusInterInvoiced'),'statut6');
  435 + if ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6');
436 436 }
437 437 if ($mode == 4)
438 438 {
439 439 if ($statut==0) return img_picto($langs->trans($this->statuts_short[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
440 440 if ($statut==1) return img_picto($langs->trans($this->statuts_short[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]);
441   - if ($statut==2) return img_picto($langs->trans('StatusInterInvoiced'),'statut6').' '.$langs->trans('StatusInterInvoiced');
  441 + if ($statut==2) return img_picto($langs->trans($this->statuts_short[$statut]),'statut6').' '.$langs->trans($this->statuts[$statut]);
442 442 }
443 443 if ($mode == 5)
444 444 {
445 445 if ($statut==0) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut0');
446 446 if ($statut==1) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut4');
447   - if ($statut==2) return $langs->trans('StatusInterInvoiced').' '.img_picto($langs->trans('StatusInterInvoiced'),'statut6');
  447 + if ($statut==2) return $langs->trans($this->statuts_short[$statut]).' '.img_picto($langs->trans($this->statuts_short[$statut]),'statut6');
448 448 }
449 449 }
450 450

0 comments on commit 545eaa1

Please sign in to comment.
Something went wrong with that request. Please try again.