@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | $id = GETPOSTINT('id'); |
103 | 103 | $rowid = GETPOST('rowid', 'alpha'); |
104 | -$entity = GETPOST('entity', 'alpha'); // Do not use GETPOSTINT here. Should be '', 0 or >0. |
|
104 | +$entity = GETPOST('entity', 'alpha'); // Do not use GETPOSTINT here. Should be '', 0 or >0. |
|
105 | 105 | $code = GETPOST('code', 'alpha'); |
106 | 106 | $from = GETPOST('from', 'alpha'); |
107 | 107 | |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | $tabcond[DICT_STCOMM] = isModEnabled("societe"); |
571 | 571 | $tabcond[DICT_HOLIDAY_TYPES] = isModEnabled('holiday'); |
572 | 572 | $tabcond[DICT_LEAD_STATUS] = isModEnabled('project'); |
573 | -$tabcond[DICT_FORMAT_CARDS] = (isModEnabled('label') || isModEnabled('barcode') || isModEnabled('member')); // stickers format dictionary |
|
573 | +$tabcond[DICT_FORMAT_CARDS] = (isModEnabled('label') || isModEnabled('barcode') || isModEnabled('member')); // stickers format dictionary |
|
574 | 574 | $tabcond[DICT_INVOICE_SUBTYPE] = ((isModEnabled('invoice') || isModEnabled('supplier_invoice')) && $mysoc->country_code == 'GR'); |
575 | 575 | $tabcond[DICT_HRM_PUBLIC_HOLIDAY] = (isModEnabled('holiday') || isModEnabled('hrm')); |
576 | 576 | $tabcond[DICT_HRM_DEPARTMENT] = isModEnabled('hrm'); |
@@ -973,7 +973,7 @@ discard block |
||
973 | 973 | if ($value == 'price' || preg_match('/^amount/i', $value)) { |
974 | 974 | $_POST[$keycode] = price2num(GETPOST($keycode), 'MU'); |
975 | 975 | } elseif ($value == 'taux' || $value == 'localtax1') { |
976 | - $_POST[$keycode] = price2num(GETPOST($keycode), 8); // Note that localtax2 can be a list of rates separated by coma like X:Y:Z |
|
976 | + $_POST[$keycode] = price2num(GETPOST($keycode), 8); // Note that localtax2 can be a list of rates separated by coma like X:Y:Z |
|
977 | 977 | } elseif ($value == 'entity') { |
978 | 978 | $_POST[$keycode] = getEntity($tablename); |
979 | 979 | } |
@@ -1042,7 +1042,7 @@ discard block |
||
1042 | 1042 | if ($field == 'price' || preg_match('/^amount/i', $field)) { |
1043 | 1043 | $_POST[$keycode] = price2num(GETPOST($keycode), 'MU'); |
1044 | 1044 | } elseif ($field == 'taux' || $field == 'localtax1') { |
1045 | - $_POST[$keycode] = price2num(GETPOST($keycode), 8); // Note that localtax2 can be a list of rates separated by coma like X:Y:Z |
|
1045 | + $_POST[$keycode] = price2num(GETPOST($keycode), 8); // Note that localtax2 can be a list of rates separated by coma like X:Y:Z |
|
1046 | 1046 | } elseif ($field == 'entity') { |
1047 | 1047 | $_POST[$keycode] = getEntity($tablename); |
1048 | 1048 | } |
@@ -2520,7 +2520,7 @@ discard block |
||
2520 | 2520 | } |
2521 | 2521 | // Show value for field |
2522 | 2522 | if ($showfield) { |
2523 | - print '<!-- '. $value .' --><td class="'.$class.'"'.($titletoshow ? ' title="'.dolPrintHTMLForAttribute($titletoshow).'"' : '').'>'.$valuetoshow.'</td>'; |
|
2523 | + print '<!-- '.$value.' --><td class="'.$class.'"'.($titletoshow ? ' title="'.dolPrintHTMLForAttribute($titletoshow).'"' : '').'>'.$valuetoshow.'</td>'; |
|
2524 | 2524 | } |
2525 | 2525 | } |
2526 | 2526 | |
@@ -2704,7 +2704,7 @@ discard block |
||
2704 | 2704 | // Special case for c_actioncomm (field that should not be modified) |
2705 | 2705 | $hidden = (!empty($obj->{$value}) ? $obj->{$value} : ''); |
2706 | 2706 | print '<td>'; |
2707 | - print '<input type="hidden" name="'. $value .'" value="'.$hidden.'">'; |
|
2707 | + print '<input type="hidden" name="'.$value.'" value="'.$hidden.'">'; |
|
2708 | 2708 | print $langs->trans($hidden); |
2709 | 2709 | print '</td>'; |
2710 | 2710 | } elseif ($value == 'country') { |
@@ -2725,7 +2725,7 @@ discard block |
||
2725 | 2725 | if (!in_array('country', $fieldlist)) { // If there is already a field country, we don't show country_id (avoid duplicate) |
2726 | 2726 | $country_id = (!empty($obj->{$value}) ? $obj->{$value} : 0); |
2727 | 2727 | print '<td class="tdoverflowmax100">'; |
2728 | - print '<input type="hidden" name="'. $value .'" value="'.$country_id.'">'; |
|
2728 | + print '<input type="hidden" name="'.$value.'" value="'.$country_id.'">'; |
|
2729 | 2729 | print '</td>'; |
2730 | 2730 | } |
2731 | 2731 | } elseif ($value == 'region') { |
@@ -2735,7 +2735,7 @@ discard block |
||
2735 | 2735 | } elseif ($value == 'region_id') { |
2736 | 2736 | $region_id = (!empty($obj->{$value}) ? $obj->{$value} : 0); |
2737 | 2737 | print '<td>'; |
2738 | - print '<input type="hidden" name="'. $value .'" value="'.$region_id.'">'; |
|
2738 | + print '<input type="hidden" name="'.$value.'" value="'.$region_id.'">'; |
|
2739 | 2739 | print '</td>'; |
2740 | 2740 | } elseif ($value == 'lang') { |
2741 | 2741 | print '<td>'; |
@@ -2791,7 +2791,7 @@ discard block |
||
2791 | 2791 | $class = "center"; // Fields aligned on right |
2792 | 2792 | } |
2793 | 2793 | print '<td class="'.$class.'">'; |
2794 | - print '<input type="text" class="flat" value="'.(isset($obj->{$value}) ? $obj->{$value} : '').'" size="3" name="'. $value .'">'; |
|
2794 | + print '<input type="text" class="flat" value="'.(isset($obj->{$value}) ? $obj->{$value} : '').'" size="3" name="'.$value.'">'; |
|
2795 | 2795 | print '</td>'; |
2796 | 2796 | } elseif (in_array($value, array('libelle_facture'))) { |
2797 | 2797 | print '<td>'; |
@@ -2801,7 +2801,7 @@ discard block |
||
2801 | 2801 | if ($tabname == 'c_payment_term') { |
2802 | 2802 | $langs->load("bills"); |
2803 | 2803 | if (isset($obj->code) && !empty($obj->code)) { |
2804 | - $transkey = "PaymentCondition" . strtoupper($obj->code); |
|
2804 | + $transkey = "PaymentCondition".strtoupper($obj->code); |
|
2805 | 2805 | if ($langs->trans($transkey) != $transkey) { |
2806 | 2806 | $transfound = 1; |
2807 | 2807 | print $form->textwithpicto($langs->trans($transkey), $langs->trans("GoIntoTranslationMenuToChangeThis")); |
@@ -2809,21 +2809,21 @@ discard block |
||
2809 | 2809 | } |
2810 | 2810 | } |
2811 | 2811 | if (!$transfound) { |
2812 | - print '<textarea cols="30" rows="'.ROWS_2.'" class="flat" name="'. $value .'">'.(empty($obj->{$value}) ? '' : $obj->{$value}).'</textarea>'; |
|
2812 | + print '<textarea cols="30" rows="'.ROWS_2.'" class="flat" name="'.$value.'">'.(empty($obj->{$value}) ? '' : $obj->{$value}).'</textarea>'; |
|
2813 | 2813 | } else { |
2814 | - print '<input type="hidden" name="'. $value .'" value="'.$transkey.'">'; |
|
2814 | + print '<input type="hidden" name="'.$value.'" value="'.$transkey.'">'; |
|
2815 | 2815 | } |
2816 | 2816 | print '</td>'; |
2817 | 2817 | } elseif ($value == 'price' || preg_match('/^amount/i', (string) $value)) { |
2818 | - print '<td><input type="text" class="flat minwidth75" value="'.price((!empty($obj->{$value}) ? $obj->{$value} : '')).'" name="'. $value .'"></td>'; |
|
2818 | + print '<td><input type="text" class="flat minwidth75" value="'.price((!empty($obj->{$value}) ? $obj->{$value} : '')).'" name="'.$value.'"></td>'; |
|
2819 | 2819 | } elseif ($value == 'code' && isset($obj->{$value})) { |
2820 | 2820 | print '<td>'; |
2821 | 2821 | if ($tabname == 'c_paiement' && in_array($obj->{$value}, array('LIQ', 'CB', 'CHQ', 'VIR'))) { |
2822 | 2822 | // Case of code that should not be modified |
2823 | - print '<input type="hidden" class="flat minwidth75 maxwidth100" value="'.(empty($obj->{$value}) ? '' : $obj->{$value}).'" name="'. $value .'">'; |
|
2823 | + print '<input type="hidden" class="flat minwidth75 maxwidth100" value="'.(empty($obj->{$value}) ? '' : $obj->{$value}).'" name="'.$value.'">'; |
|
2824 | 2824 | print $obj->{$value}; |
2825 | 2825 | } else { |
2826 | - print '<input type="text" class="flat minwidth75 maxwidth100" value="'.(empty($obj->{$value}) ? '' : $obj->{$value}).'" name="'. $value .'">'; |
|
2826 | + print '<input type="text" class="flat minwidth75 maxwidth100" value="'.(empty($obj->{$value}) ? '' : $obj->{$value}).'" name="'.$value.'">'; |
|
2827 | 2827 | } |
2828 | 2828 | print '</td>'; |
2829 | 2829 | } elseif ($value == 'unit') { |
@@ -2851,10 +2851,10 @@ discard block |
||
2851 | 2851 | if (isModEnabled('accounting')) { |
2852 | 2852 | $fieldname = $value; |
2853 | 2853 | $accountancy_account = (empty($obj->$fieldname) ? 0 : $obj->$fieldname); |
2854 | - print $formaccounting->select_account($accountancy_account, '.'. $value, 1, array(), 1, 1, 'maxwidth125 maxwidthonsmartphone'); |
|
2854 | + print $formaccounting->select_account($accountancy_account, '.'.$value, 1, array(), 1, 1, 'maxwidth125 maxwidthonsmartphone'); |
|
2855 | 2855 | } else { |
2856 | 2856 | $fieldname = $value; |
2857 | - print '<input type="text" class="flat minwidth100" value="'.(isset($obj->$fieldname) ? $obj->$fieldname : '').'" name="'. $value .'">'; |
|
2857 | + print '<input type="text" class="flat minwidth100" value="'.(isset($obj->$fieldname) ? $obj->$fieldname : '').'" name="'.$value.'">'; |
|
2858 | 2858 | } |
2859 | 2859 | print '</td>'; |
2860 | 2860 | } elseif ($value == 'fk_tva') { |
@@ -2875,7 +2875,7 @@ discard block |
||
2875 | 2875 | print '</td>'; |
2876 | 2876 | } elseif ($value == 'type_duration') { |
2877 | 2877 | print '<td>'; |
2878 | - print $form->selectTypeDuration('', (empty($obj->type_duration) ? '' : $obj->type_duration), array('i','h')); |
|
2878 | + print $form->selectTypeDuration('', (empty($obj->type_duration) ? '' : $obj->type_duration), array('i', 'h')); |
|
2879 | 2879 | print '</td>'; |
2880 | 2880 | } else { |
2881 | 2881 | $fieldValue = isset($obj->{$value}) ? $obj->{$value} : ''; |