Fix use of table llx_c_paiement (param showempty was not used/set)
This commit is contained in:
parent
65c689cc81
commit
fe45e82e99
@ -673,7 +673,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
print '<td> </td>';
|
||||
print '<td class="nowrap">';
|
||||
$form->select_types_paiements((GETPOST('operation')?GETPOST('operation'):($object->courant == Account::TYPE_CASH ? 'LIQ' : '')),'operation','1,2',2,1);
|
||||
$form->select_types_paiements((GETPOST('operation')?GETPOST('operation'):($object->courant == Account::TYPE_CASH ? 'LIQ' : '')), 'operation', '1,2', 2, 1);
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print '<input name="num_chq" class="flat" type="text" size="4" value="'.GETPOST("num_chq","alpha").'">';
|
||||
@ -852,7 +852,7 @@ if ($resql)
|
||||
if (! empty($arrayfields['type']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
$form->select_types_paiements(empty($search_type)?'':$search_type, 'search_type', '', 2, 0, 1, 0, 1, 'maxwidth100');
|
||||
$form->select_types_paiements(empty($search_type)?'':$search_type, 'search_type', '', 2, 1, 1, 0, 1, 'maxwidth100');
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['b.num_chq']['checked']))
|
||||
|
||||
@ -187,7 +187,7 @@ if ($result)
|
||||
|
||||
// Type
|
||||
print '<td class="liste_titre" align="left">';
|
||||
$form->select_types_paiements($typeid,'typeid','',0,0,1,16);
|
||||
$form->select_types_paiements($typeid,'typeid','',0,1,1,16);
|
||||
print '</td>';
|
||||
|
||||
// Account
|
||||
|
||||
@ -419,19 +419,19 @@ if ($resql)
|
||||
// Date invoice
|
||||
if (! empty($arrayfields['f.date_last_gen']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
$formother->select_year($search_year?$search_year:-1,'search_year',1, 20, 5);
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day" value="'.$search_day.'">';
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month" value="'.$search_month.'">';
|
||||
$formother->select_year($search_year?$search_year:-1,'search_year',1, 20, 5, 0, 0, '', 'witdhauto valignmiddle');
|
||||
print '</td>';
|
||||
}
|
||||
// Date next generation
|
||||
if (! empty($arrayfields['f.date_when']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="search_day_date_when" value="'.$search_day_date_when.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="search_month_date_when" value="'.$search_month_date_when.'">';
|
||||
$formother->select_year($search_year_date_when?$search_year_date_when:-1,'search_year_date_when',1, 20, 5);
|
||||
print '<td class="liste_titre nowraponall" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_day_date_when" value="'.$search_day_date_when.'">';
|
||||
print '<input class="flat valignmiddle" type="text" size="1" maxlength="2" name="search_month_date_when" value="'.$search_month_date_when.'">';
|
||||
$formother->select_year($search_year_date_when?$search_year_date_when:-1,'search_year_date_when',1, 20, 5, 0, 0, '', 'witdhauto valignmiddle');
|
||||
print '</td>';
|
||||
}
|
||||
// Extra fields
|
||||
|
||||
@ -756,7 +756,7 @@ if ($resql)
|
||||
if (! empty($arrayfields['f.fk_mode_reglement']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
$form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 0, 1, 10);
|
||||
$form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 10);
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_ht']['checked']))
|
||||
@ -775,14 +775,14 @@ if ($resql)
|
||||
}
|
||||
if (! empty($arrayfields['f.total_localtax1']['checked']))
|
||||
{
|
||||
// Amount
|
||||
// Localtax1
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_localtax1" value="'.$search_montant_localtax1.'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_localtax2']['checked']))
|
||||
{
|
||||
// Amount
|
||||
// Localtax2
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_localtax2" value="'.$search_montant_localtax2.'">';
|
||||
print '</td>';
|
||||
|
||||
@ -179,7 +179,7 @@ if ($result)
|
||||
print '<td class="liste_titre"> </td>';
|
||||
// Type
|
||||
print '<td class="liste_titre" align="left">';
|
||||
$form->select_types_paiements($typeid,'typeid','',0,0,1,16);
|
||||
$form->select_types_paiements($typeid,'typeid','',0,1,1,16);
|
||||
print '</td>';
|
||||
// Account
|
||||
if (! empty($conf->banque->enabled))
|
||||
|
||||
@ -173,7 +173,7 @@ if ($result)
|
||||
print '</td>';
|
||||
// Type
|
||||
print '<td class="liste_titre" align="left">';
|
||||
$form->select_types_paiements($typeid,'typeid','',0,0,1,16);
|
||||
$form->select_types_paiements($typeid,'typeid','',0,1,1,16);
|
||||
print '</td>';
|
||||
// Account
|
||||
if (! empty($conf->banque->enabled))
|
||||
|
||||
@ -3100,7 +3100,7 @@ class Form
|
||||
* @param string $morecss Add more CSS on select tag
|
||||
* @return void
|
||||
*/
|
||||
function select_types_paiements($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=0, $noadmininfo=0, $maxlength=0, $active=1, $morecss='')
|
||||
function select_types_paiements($selected='', $htmlname='paiementtype', $filtertype='', $format=0, $empty=1, $noadmininfo=0, $maxlength=0, $active=1, $morecss='')
|
||||
{
|
||||
global $langs,$user;
|
||||
|
||||
|
||||
@ -655,7 +655,7 @@ if ($resql)
|
||||
if (! empty($arrayfields['f.fk_mode_reglement']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
$form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 0, 1, 10);
|
||||
$form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 10);
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_ht']['checked']))
|
||||
|
||||
@ -30,13 +30,12 @@
|
||||
-- Types paiement
|
||||
--
|
||||
|
||||
insert into llx_c_paiement (id,code,libelle,type,active) values ( 1, '', '-', 2,1);
|
||||
insert into llx_c_paiement (id,code,libelle,type,active) values ( 1, 'TIP', 'TIP', 2,0);
|
||||
insert into llx_c_paiement (id,code,libelle,type,active) values ( 2, 'VIR', 'Transfer', 2,1);
|
||||
insert into llx_c_paiement (id,code,libelle,type,active) values ( 3, 'PRE', 'Debit order', 2,1);
|
||||
insert into llx_c_paiement (id,code,libelle,type,active) values ( 4, 'LIQ', 'Cash', 2,1);
|
||||
insert into llx_c_paiement (id,code,libelle,type,active) values ( 6, 'CB', 'Credit card', 2,1);
|
||||
insert into llx_c_paiement (id,code,libelle,type,active) values ( 7, 'CHQ', 'Cheque', 2,1);
|
||||
insert into llx_c_paiement (id,code,libelle,type,active) values ( 8, 'TIP', 'TIP', 2,0);
|
||||
insert into llx_c_paiement (id,code,libelle,type,active) values (50, 'VAD', 'Online payment', 2,0);
|
||||
insert into llx_c_paiement (id,code,libelle,type,active) values (51, 'TRA', 'Traite', 2,0);
|
||||
insert into llx_c_paiement (id,code,libelle,type,active) values (52, 'LCR', 'LCR', 2,0);
|
||||
|
||||
@ -71,6 +71,7 @@ ALTER TABLE llx_expensereport_det ADD COLUMN docnumber varchar(128) after fk_exp
|
||||
ALTER TABLE llx_website_page ADD COLUMN aliasalt varchar(255) after pageurl;
|
||||
|
||||
-- Add missing keys and primary key
|
||||
DELETE FROM llx_c_paiement WHERE code = '' or code = '-' or id = 0;
|
||||
ALTER TABLE llx_c_paiement DROP INDEX uk_c_paiement;
|
||||
ALTER TABLE llx_c_paiement ADD UNIQUE INDEX uk_c_paiement_code(entity, code);
|
||||
ALTER TABLE llx_c_paiement CHANGE COLUMN id id INTEGER AUTO_INCREMENT PRIMARY KEY;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user