#315 Détail article
Pour journaux VEN et ach on peut changer le libellé de la ligne, par défaut, nom de la fiche. En cas de génération de document, ce libellé sera utilisé
This commit is contained in:
parent
1d5255c342
commit
cae5c0af76
6 changed files with 31 additions and 10 deletions
|
|
@ -362,6 +362,12 @@ case 'save':
|
|||
$cn->exec_sql("select comptaproc.jrn_add_note($1,$2)",
|
||||
array($jr_id,$_POST['jrn_note']));
|
||||
$rapt=$_POST['rapt'];
|
||||
$a_rowid=$_POST["j_id"];
|
||||
for ($e=0;$e<count($a_rowid);$e++)
|
||||
{
|
||||
$id="e_march".$a_rowid[$e]."_label";
|
||||
$cn->exec_sql('update jrnx set j_text=$1 where j_id=$2', array(strip_tags($_POST[$id]),$a_rowid[$e]));
|
||||
}
|
||||
if (trim($rapt) != '')
|
||||
{
|
||||
$rec=new Acc_Reconciliation ($cn);
|
||||
|
|
|
|||
|
|
@ -390,6 +390,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
|
|||
$acc_operation->type='d';
|
||||
$acc_operation->periode=$tperiode;
|
||||
$acc_operation->qcode="";
|
||||
$acc_operation->desc=strip_tags(${"e_march".$i."_label"});
|
||||
|
||||
|
||||
|
||||
|
|
@ -1068,8 +1069,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
|
|||
{
|
||||
// Code id, price & vat code
|
||||
//--
|
||||
$march=(isset(${"e_march$i"}))?${"e_march$i"}:""
|
||||
;
|
||||
$march=(isset(${"e_march$i"}))?${"e_march$i"}:"" ;
|
||||
$march_price=(isset(${"e_march".$i."_price"}))?${"e_march".$i."_price"}:""
|
||||
;
|
||||
/* use vat */
|
||||
|
|
@ -1083,7 +1083,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
|
|||
|
||||
|
||||
|
||||
$march_label=" ";
|
||||
$march_label=(isset(${"e_march".$i."_label"}))?${"e_march".$i."_label"}:"";
|
||||
// retrieve the tva label and name
|
||||
//--
|
||||
if ( strlen(trim($march))!=0 )
|
||||
|
|
@ -1146,7 +1146,8 @@ class Acc_Ledger_Purchase extends Acc_Ledger
|
|||
$htva->value=0;
|
||||
$array[$i]['htva']=$htva->input();
|
||||
|
||||
$Span=new ISpan();
|
||||
$Span=new IText("e_march".$i."_label");
|
||||
$Span->value=$march_label;
|
||||
$Span->setReadOnly(false);
|
||||
// card's name, price
|
||||
//--
|
||||
|
|
@ -1317,7 +1318,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
|
|||
/* retrieve information for card */
|
||||
$fiche=new Fiche($this->db);
|
||||
$fiche->get_by_qcode(${"e_march".$i});
|
||||
$fiche_name=h($fiche->getName());
|
||||
$fiche_name=h(${"e_march".$i."_label"});
|
||||
|
||||
if ( $g_parameter->MY_TVA_USE=='Y')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -307,6 +307,7 @@ class Acc_Ledger_Sold extends Acc_Ledger
|
|||
$acc_operation->jrn=$p_jrn;
|
||||
$acc_operation->type='c';
|
||||
$acc_operation->periode=$tperiode;
|
||||
$acc_operation->desc=strip_tags(${"e_march".$i."_label"});
|
||||
$acc_operation->qcode=${"e_march".$i};
|
||||
if ( $amount < 0 ) $tot_debit=bcadd($tot_debit,abs($amount));
|
||||
|
||||
|
|
@ -715,7 +716,7 @@ class Acc_Ledger_Sold extends Acc_Ledger
|
|||
/* retrieve information for card */
|
||||
$fiche=new Fiche($this->db);
|
||||
$fiche->get_by_qcode(${"e_march".$i});
|
||||
$fiche_name=h($fiche->getName());
|
||||
$fiche_name=h(${"e_march".$i."_label"});
|
||||
if ( $g_parameter->MY_TVA_USE=='Y')
|
||||
{
|
||||
$oTva=new Acc_Tva($this->db);
|
||||
|
|
@ -1187,7 +1188,7 @@ class Acc_Ledger_Sold extends Acc_Ledger
|
|||
$march_tva_amount=(isset(${"e_march$i"."_tva_amount"}))?${"e_march$i"."_tva_amount"}:""
|
||||
;
|
||||
}
|
||||
$march_label=' ';
|
||||
$march_label=(isset(${"e_march".$i."_label"}))?${"e_march".$i."_label"}:"";
|
||||
|
||||
// retrieve the tva label and name
|
||||
//--
|
||||
|
|
@ -1248,7 +1249,7 @@ class Acc_Ledger_Sold extends Acc_Ledger
|
|||
$array[$i]['tvac']=$tvac->input();
|
||||
|
||||
|
||||
$Span=new ISpan();
|
||||
$Span=new IText("e_march".$i."_label");
|
||||
$Span->setReadOnly(false);
|
||||
// card's name, price
|
||||
//--
|
||||
|
|
|
|||
|
|
@ -800,6 +800,13 @@ class Document
|
|||
}
|
||||
else $r = "";
|
||||
break;
|
||||
case 'VEN_ART_LABEL':
|
||||
extract ($_POST);
|
||||
$id='e_march'.$counter."_label";
|
||||
// check if the march exists
|
||||
if ( ! isset (${$id})) return "";
|
||||
$r=${'e_march'.$counter.'_label'};
|
||||
break;
|
||||
|
||||
case 'VEN_ART_PRICE':
|
||||
extract ($_POST);
|
||||
|
|
|
|||
|
|
@ -149,7 +149,10 @@ echo '</tr>';
|
|||
$tva->load();
|
||||
$sym_tva=h($tva->get_parameter('label'));
|
||||
}
|
||||
$row.=td($fiche->strAttribut(ATTR_DEF_NAME));
|
||||
$l_lib=($q[$e]['j_text']=='')?$fiche->strAttribut(ATTR_DEF_NAME):$q[$e]['j_text'];
|
||||
$hidden=HtmlInput::hidden("j_id[]",$q[$e]['j_id']);
|
||||
$input=new IText("e_march".$q[$e]['j_id']."_label",$l_lib);
|
||||
$row.=td($input->input().$hidden);
|
||||
$row.=td($sym_tva,'style="text-align:center"');
|
||||
$pu=bcdiv($q['qp_price'],$q['qp_quantite']);
|
||||
$row.=td(nbm($pu),'class="num"');
|
||||
|
|
|
|||
|
|
@ -139,7 +139,10 @@ echo '</tr>';
|
|||
$fiche->id, $gDossier, $fiche->strAttribut(ATTR_DEF_QUICKCODE));
|
||||
|
||||
$row=td($view_history);
|
||||
$row.=td($fiche->strAttribut(ATTR_DEF_NAME));
|
||||
$l_lib=($q[$e]['j_text']=='')?$fiche->strAttribut(ATTR_DEF_NAME):$q[$e]['j_text'];
|
||||
$hidden=HtmlInput::hidden("j_id[]",$q[$e]['j_id']);
|
||||
$input=new IText("e_march".$q[$e]['j_id']."_label",$l_lib);
|
||||
$row.=td($input->input().$hidden);
|
||||
$sym_tva='';
|
||||
$pu=bcdiv($q['qs_price'],$q['qs_quantite']);
|
||||
$row.=td(nbm($pu),'class="num"');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue