Code improvement : change fiche function
getAttribut becomes load_attribute, strAttribut becomes set_attribute getAttribut becomes get_attribute
This commit is contained in:
parent
bec8b39afa
commit
6c3154abbd
45 changed files with 316 additions and 311 deletions
|
|
@ -56,7 +56,7 @@ $from=$http->request("ac","string","");
|
|||
if ( !empty ($contact['contact_company']) ) {
|
||||
$l_company=new Fiche($cn);
|
||||
$l_company->get_by_qcode(trim($contact['contact_company']),false);
|
||||
$l_company_name=$l_company->strAttribut(ATTR_DEF_NAME,0);
|
||||
$l_company_name=$l_company->get_attribute(ATTR_DEF_NAME,0);
|
||||
|
||||
// add popup for detail if the company does exist
|
||||
if ( $l_company_name !="")
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ global $div,$g_parameter,$cn,$access,$jr_id,$obj;
|
|||
$row = '';
|
||||
$q = $obj->det->array[$e];
|
||||
$fiche = new Fiche($cn, $q['qp_fiche']);
|
||||
$qcode=$fiche->strAttribut(ATTR_DEF_QUICKCODE);
|
||||
$qcode=$fiche->get_attribute(ATTR_DEF_QUICKCODE);
|
||||
$view_card_detail = HtmlInput::card_detail($qcode, "", ' class="line" ');
|
||||
$row = td($view_card_detail);
|
||||
$sym_tva = '';
|
||||
|
|
@ -217,7 +217,7 @@ global $div,$g_parameter,$cn,$access,$jr_id,$obj;
|
|||
}
|
||||
if ($owner->MY_UPDLAB == 'Y')
|
||||
{
|
||||
$l_lib = ($q['j_text'] == '') ? $fiche->strAttribut(ATTR_DEF_NAME) : $q['j_text'];
|
||||
$l_lib = ($q['j_text'] == '') ? $fiche->get_attribute(ATTR_DEF_NAME) : $q['j_text'];
|
||||
$hidden = HtmlInput::hidden("j_id[]", $q['j_id']);
|
||||
$input = new IText("e_march" . $q['j_id'] . "_label", $l_lib);
|
||||
$input->css_size = "100%";
|
||||
|
|
@ -225,7 +225,7 @@ global $div,$g_parameter,$cn,$access,$jr_id,$obj;
|
|||
{
|
||||
$input = new ISpan("e_march" . $q['j_id'] . "_label");
|
||||
$hidden = HtmlInput::hidden("j_id[]", $q['j_id']);
|
||||
$input->value = $fiche->strAttribut(ATTR_DEF_NAME);
|
||||
$input->value = $fiche->get_attribute(ATTR_DEF_NAME);
|
||||
}
|
||||
$row.=td($input->input() . $hidden);
|
||||
$pu = $q['qp_unit'];
|
||||
|
|
@ -261,7 +261,7 @@ global $div,$g_parameter,$cn,$access,$jr_id,$obj;
|
|||
/* Analytic accountancy */
|
||||
if ($owner->MY_ANALYTIC != "nu" /*&& $div == 'popup'*/ )
|
||||
{
|
||||
$poste = $fiche->strAttribut(ATTR_DEF_ACCOUNT);
|
||||
$poste = $fiche->get_attribute(ATTR_DEF_ACCOUNT);
|
||||
if ( $g_parameter->match_analytic($poste))
|
||||
{
|
||||
$anc_op = new Anc_Operation($cn);
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ endif;
|
|||
// nom de la fiche
|
||||
$ff = new Fiche($cn);
|
||||
$ff->get_by_qcode($q[$e]['j_qcode']);
|
||||
$row.=td($ff->strAttribut(h(ATTR_DEF_NAME)));
|
||||
$row.=td($ff->get_attribute(h(ATTR_DEF_NAME)));
|
||||
} else
|
||||
{
|
||||
// libellé du compte
|
||||
|
|
|
|||
|
|
@ -152,10 +152,10 @@ if ($obj->det->currency_id!=0)
|
|||
/* Analytic accountancy */
|
||||
if ( $owner->MY_ANALYTIC != "nu" /*&& $div == 'popup'*/)
|
||||
{
|
||||
$poste=$fiche->strAttribut(ATTR_DEF_ACCOUNT);
|
||||
$poste=$fiche->get_attribute(ATTR_DEF_ACCOUNT);
|
||||
if ( $g_parameter->match_analytic($q[$e]['j_poste']))
|
||||
{
|
||||
$qcode=$fiche->strAttribut(ATTR_DEF_QUICKCODE);
|
||||
$qcode=$fiche->get_attribute(ATTR_DEF_QUICKCODE);
|
||||
$anc_op=new Anc_Operation($cn);
|
||||
$anc_op->j_id=$q[$e]['j_id'];
|
||||
$anc_op->in_div=$div;
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ $amount_idx=0; $sum_prod_currency=0;
|
|||
// nom de la fiche
|
||||
$ff=new Fiche($cn);
|
||||
$ff->get_by_qcode( $q[$e]['j_qcode']);
|
||||
$l_lib=$ff->strAttribut(ATTR_DEF_NAME);
|
||||
$l_lib=$ff->get_attribute(ATTR_DEF_NAME);
|
||||
} else {
|
||||
// libellé du compte
|
||||
$name=$cn->get_value('select pcm_lib from tmp_pcmn where pcm_val=$1',array($q[$e]['j_poste']));
|
||||
|
|
|
|||
|
|
@ -201,18 +201,18 @@ $str_anc = "";
|
|||
$row = '';
|
||||
$q = $obj->det->array[$e];
|
||||
$fiche = new Fiche($cn, $q['qs_fiche']);
|
||||
$qcode = $fiche->strAttribut(ATTR_DEF_QUICKCODE);
|
||||
$qcode = $fiche->get_attribute(ATTR_DEF_QUICKCODE);
|
||||
$view_card_detail = HtmlInput::card_detail($qcode, "", ' class="line" ');
|
||||
$row .= td($view_card_detail);
|
||||
if ($owner->MY_UPDLAB == 'Y') {
|
||||
$l_lib = ($q['j_text'] == '') ? $fiche->strAttribut(ATTR_DEF_NAME) : $q['j_text'];
|
||||
$l_lib = ($q['j_text'] == '') ? $fiche->get_attribute(ATTR_DEF_NAME) : $q['j_text'];
|
||||
$hidden = HtmlInput::hidden("j_id[]", $q['j_id']);
|
||||
$input = new IText("e_march" . $q['j_id'] . "_label", $l_lib);
|
||||
$input->css_size = "100%";
|
||||
} else {
|
||||
$input = new ISpan("e_march" . $q['j_id'] . "_label");
|
||||
$hidden = HtmlInput::hidden("j_id[]", $q['j_id']);
|
||||
$input->value = $fiche->strAttribut(ATTR_DEF_NAME);
|
||||
$input->value = $fiche->get_attribute(ATTR_DEF_NAME);
|
||||
}
|
||||
|
||||
$row .= td($input->input() . $hidden);
|
||||
|
|
@ -250,7 +250,7 @@ $str_anc = "";
|
|||
$total_htva = bcadd($total_htva, $htva);
|
||||
/* Analytic accountancy */
|
||||
if ($owner->MY_ANALYTIC != "nu" /*&& $div == 'popup' */) {
|
||||
$poste = $fiche->strAttribut(ATTR_DEF_ACCOUNT);
|
||||
$poste = $fiche->get_attribute(ATTR_DEF_ACCOUNT);
|
||||
if ($g_parameter->match_analytic($poste)) {
|
||||
$anc_op = new Anc_Operation($cn);
|
||||
$anc_op->in_div = $div;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue