#350 : bug for the possibility to change label for each item in ACH and VEN

This commit is contained in:
Dany De Bontridder 2011-12-20 21:50:40 +00:00
parent 6d578df2cc
commit a84e8d4ff1
7 changed files with 9 additions and 6 deletions

View file

@ -286,6 +286,7 @@ function ledger_add_row()
}
g("e_march"+nb.value+"_label").innerHTML=' ';
g("e_march"+nb.value+"_label").value='';
g("e_march"+nb.value+"_price").value='0';
g("e_march"+nb.value).value="";
g("e_quant"+nb.value).value="1";

View file

@ -354,7 +354,7 @@ class Acc_Ledger extends jrn_def_sql
case j_debit when 't' then j_montant::text else ' ' end as deb_montant,
case j_debit when 'f' then j_montant::text else ' ' end as cred_montant,
j_debit as debit,j_poste as poste,jr_montant , ".
"coalesce(j_text,pcm_lib) as description,j_grpt as grp,
"case when j_text='' or j_text is null then pcm_lib else j_text end as description,j_grpt as grp,
jr_comment||' ('||jr_internal||')' as jr_comment,
jr_pj_number,
j_qcode,
@ -374,7 +374,7 @@ class Acc_Ledger extends jrn_def_sql
case j_debit when 't' then j_montant::text else ' ' end as deb_montant,
case j_debit when 'f' then j_montant::text else ' ' end as cred_montant,
j_debit as debit,j_poste as poste,".
"coalesce(j_text,pcm_lib) as description,j_grpt as grp,
"case when j_text='' or j_text is null then pcm_lib else j_text end as description,j_grpt as grp,
jr_comment||' ('||jr_internal||')' as jr_comment,
jr_pj_number,
jr_montant,
@ -409,7 +409,7 @@ class Acc_Ledger extends jrn_def_sql
$tot_op=$line['jr_montant'];
/* Check first if there is a quickcode */
if ( strlen(trim($line['j_qcode'])) != 0 )
if (strlen(trim($line['description']))==0 && strlen(trim($line['j_qcode'])) != 0 )
{
if ( $fiche->get_by_qcode($line['j_qcode'],false) == 0 )
{

View file

@ -1490,6 +1490,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
for ($i=0;$i < $nb_item;$i++)
{
$r.=HtmlInput::hidden("e_march".$i,${"e_march".$i});
if (isset (${"e_march".$i."_label"})) $r.=HtmlInput::hidden("e_march".$i."_label",${"e_march".$i."_label"});
$r.=HtmlInput::hidden("e_march".$i."_price",${"e_march".$i."_price"});
if ( $g_parameter->MY_TVA_USE=='Y' )
{

View file

@ -902,6 +902,7 @@ class Acc_Ledger_Sold extends Acc_Ledger
for ($i=0;$i < $nb_item;$i++)
{
$r.=HtmlInput::hidden("e_march".$i,${"e_march".$i});
if (isset (${"e_march".$i."_label"})) $r.=HtmlInput::hidden("e_march".$i."_label",${"e_march".$i."_label"});
$r.=HtmlInput::hidden("e_march".$i."_price",${"e_march".$i."_price"});
if ( $g_parameter->MY_TVA_USE=='Y')
{

View file

@ -141,7 +141,7 @@ if (isset($_POST['record']))
/* Save the additional information into jrn_info */
$obj = new Acc_Ledger_Info($cn);
$obj->save_extra($Ledger->jr_id, $_POST);
printf('<a class="detail" style="display:inline" href="javascript:modifyOperation(%d,%d)">%s</a><hr>', $jr_id, dossier::id(), $internal);
printf('<a class="line" style="display:inline" href="javascript:modifyOperation(%d,%d)">%s</a><hr>', $jr_id, dossier::id(), $internal);
// Feedback
echo $Ledger->confirm($_POST, true);
echo '</div>';

View file

@ -149,7 +149,7 @@ global $g_parameter;
echo '<h3 class="notice"> '._('Attention numéro pièce existante, elle a du être adaptée').'</h3>';
}
printf ('<a class="detail" style="display:inline" href="javascript:modifyOperation(%d,%d)">%s</a><hr>',
printf ('<a class="line" style="display:inline" href="javascript:modifyOperation(%d,%d)">%s</a><hr>',
$jr_id,dossier::id(),$internal);
echo $Ledger->confirm($_POST,true);
/* Show link for Invoice */

View file

@ -153,7 +153,7 @@ echo '</tr>';
{
$l_lib = ($q['j_text'] == '') ? $fiche->strAttribut(ATTR_DEF_NAME) : $q['j_text'];
$hidden = HtmlInput::hidden("j_id[]", $q['j_id']);
$input = new IText("e_march" . $q[$e]['j_id'] . "_label", $l_lib);
$input = new IText("e_march" . $q['j_id'] . "_label", $l_lib);
}
else
{