Skip to content

Commit

Permalink
QUAL rename facnumber by ref
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-maxime committed Dec 2, 2018
1 parent aa2ecd4 commit 2e496ea
Show file tree
Hide file tree
Showing 77 changed files with 284 additions and 253 deletions.
4 changes: 2 additions & 2 deletions htdocs/accountancy/customer/card.php
Expand Up @@ -94,7 +94,7 @@
$formaccounting = new FormAccounting($db);

if (! empty($id)) {
$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.price,";
$sql = "SELECT f.ref, f.rowid as facid, l.fk_product, l.description, l.price,";
$sql .= " l.qty, l.rowid, l.tva_tx, l.remise_percent, l.subprice, p.accountancy_code_sell as code_sell,";
$sql .= " l.fk_code_ventilation, aa.account_number, aa.label";
$sql .= " FROM " . MAIN_DB_PREFIX . "facturedet as l";
Expand Down Expand Up @@ -128,7 +128,7 @@

// Ref facture
print '<tr><td>' . $langs->trans("Invoice") . '</td>';
$facture_static->ref = $objp->facnumber;
$facture_static->ref = $objp->ref;
$facture_static->id = $objp->facid;
print '<td>' . $facture_static->getNomUrl(1) . '</td>';
print '</tr>';
Expand Down
10 changes: 5 additions & 5 deletions htdocs/accountancy/customer/lines.php
Expand Up @@ -64,7 +64,7 @@
$pagenext = $page + 1;
$offset = $limit * $page;
if (! $sortfield)
$sortfield = "f.datef, f.facnumber, fd.rowid";
$sortfield = "f.datef, f.ref, fd.rowid";
if (! $sortorder) {
if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE > 0) {
$sortorder = "DESC";
Expand Down Expand Up @@ -167,7 +167,7 @@
/*
* Customer Invoice lines
*/
$sql = "SELECT f.rowid as facid, f.facnumber as ref, f.type, f.datef, f.ref_client,";
$sql = "SELECT f.rowid as facid, f.ref as ref, f.type, f.datef, f.ref_client,";
$sql.= " fd.rowid, fd.description, fd.product_type as line_type, fd.total_ht, fd.total_tva, fd.tva_tx, fd.vat_src_code, fd.total_ttc,";
$sql.= " s.rowid as socid, s.nom as name, s.code_compta, s.code_client,";
$sql.= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.accountancy_code_sell, aa.rowid as fk_compte, aa.account_number, aa.label as label_compte,";
Expand Down Expand Up @@ -195,7 +195,7 @@
$sql .= natural_search("fd.rowid", $search_lineid, 1);
}
if (strlen(trim($search_invoice))) {
$sql .= natural_search("f.facnumber", $search_invoice);
$sql .= natural_search("f.ref", $search_invoice);
}
if (strlen(trim($search_ref))) {
$sql .= natural_search("p.ref", $search_ref);
Expand Down Expand Up @@ -331,8 +331,8 @@

print '<tr class="liste_titre">';
print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "fd.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.facnumber", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.facnumber, fd.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, fd.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "fd.description", "", $param, '', $sortfield, $sortorder);
Expand Down
10 changes: 5 additions & 5 deletions htdocs/accountancy/customer/list.php
Expand Up @@ -75,7 +75,7 @@
$pageprev = $page - 1;
$pagenext = $page + 1;
if (! $sortfield)
$sortfield = "f.datef, f.facnumber, l.rowid";
$sortfield = "f.datef, f.ref, l.rowid";
if (! $sortorder) {
if ($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO > 0) {
$sortorder = "DESC";
Expand Down Expand Up @@ -209,7 +209,7 @@
}

// Customer Invoice lines
$sql = "SELECT f.rowid as facid, f.facnumber as ref, f.datef, f.type as ftype,";
$sql = "SELECT f.rowid as facid, f.ref as ref, f.datef, f.type as ftype,";
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,";
$sql.= " aa.rowid as aarowid,";
Expand All @@ -233,7 +233,7 @@
$sql .= natural_search("l.rowid", $search_lineid, 1);
}
if (strlen(trim($search_invoice))) {
$sql .= natural_search("f.facnumber", $search_invoice);
$sql .= natural_search("f.ref", $search_invoice);
}
if (strlen(trim($search_ref))) {
$sql .= natural_search("p.ref", $search_ref);
Expand Down Expand Up @@ -399,8 +399,8 @@

print '<tr class="liste_titre">';
print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.facnumber", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.facnumber, l.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, l.rowid", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "l.description", "", $param, '', $sortfield, $sortorder);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/journal/bankjournal.php
Expand Up @@ -1179,7 +1179,7 @@ function getSourceDocRef($val, $typerecord)
$sqlmid = '';
if ($typerecord == 'payment')
{
$sqlmid = 'SELECT payfac.fk_facture as id, f.facnumber as ref';
$sqlmid = 'SELECT payfac.fk_facture as id, f.ref as ref';
$sqlmid .= " FROM ".MAIN_DB_PREFIX."paiement_facture as payfac, ".MAIN_DB_PREFIX."facture as f";
$sqlmid .= " WHERE payfac.fk_facture = f.rowid AND payfac.fk_paiement=" . $val["paymentid"];
$ref = $langs->trans("Invoice");
Expand Down
4 changes: 2 additions & 2 deletions htdocs/accountancy/journal/sellsjournal.php
Expand Up @@ -97,7 +97,7 @@

$idpays = $mysoc->country_id;

$sql = "SELECT f.rowid, f.facnumber, f.type, f.datef as df, f.ref_client, f.date_lim_reglement as dlr, f.close_code,";
$sql = "SELECT f.rowid, f.ref, f.type, f.datef as df, f.ref_client, f.date_lim_reglement as dlr, f.close_code,";
$sql .= " fd.rowid as fdid, fd.description, fd.product_type, fd.total_ht, fd.total_tva, fd.total_localtax1, fd.total_localtax2, fd.tva_tx, fd.total_ttc, fd.situation_percent, fd.vat_src_code,";
$sql .= " s.rowid as socid, s.nom as name, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,";
$sql .= " p.rowid as pid, p.ref as pref, p.accountancy_code_sell, aa.rowid as fk_compte, aa.account_number as compte, aa.label as label_compte";
Expand Down Expand Up @@ -195,7 +195,7 @@
// Invoice lines
$tabfac[$obj->rowid]["date"] = $db->jdate($obj->df);
$tabfac[$obj->rowid]["datereg"] = $db->jdate($obj->dlr);
$tabfac[$obj->rowid]["ref"] = $obj->facnumber;
$tabfac[$obj->rowid]["ref"] = $obj->ref;
$tabfac[$obj->rowid]["type"] = $obj->type;
$tabfac[$obj->rowid]["description"] = $obj->label_compte;
$tabfac[$obj->rowid]["close_code"] = $obj->close_code; // close_code = 'replaced' for replacement invoices (not used in most european countries)
Expand Down
4 changes: 2 additions & 2 deletions htdocs/accountancy/supplier/card.php
Expand Up @@ -96,7 +96,7 @@
$formaccounting = new FormAccounting($db);

if (! empty($id)) {
$sql = "SELECT f.ref as facnumber, f.rowid as facid, l.fk_product, l.description, l.rowid, l.fk_code_ventilation, ";
$sql = "SELECT f.ref as ref, f.rowid as facid, l.fk_product, l.description, l.rowid, l.fk_code_ventilation, ";
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label";
$sql .= ", aa.account_number, aa.label";
$sql .= " FROM " . MAIN_DB_PREFIX . "facture_fourn_det as l";
Expand Down Expand Up @@ -129,7 +129,7 @@

// ref invoice
print '<tr><td>' . $langs->trans("BillsSuppliers") . '</td>';
$facturefournisseur_static->ref = $objp->facnumber;
$facturefournisseur_static->ref = $objp->ref;
$facturefournisseur_static->id = $objp->facid;
print '<td>' . $facturefournisseur_static->getNomUrl(1) . '</td>';
print '</tr>';
Expand Down
6 changes: 3 additions & 3 deletions htdocs/blockedlog/class/blockedlog.class.php
Expand Up @@ -413,7 +413,7 @@ public function setObjectData(&$object, $action, $amounts, $fuser = null)
{
if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties
if (! in_array($key, array(
'ref','facnumber','ref_client','ref_supplier','date','datef','type','total_ht','total_tva','total_ttc','localtax1','localtax2','revenuestamp','datepointoftax','note_public','lines'
'ref','ref_client','ref_supplier','date','datef','type','total_ht','total_tva','total_ttc','localtax1','localtax2','revenuestamp','datepointoftax','note_public','lines'
))) continue; // Discard if not into a dedicated list
if ($key == 'lines')
{
Expand Down Expand Up @@ -444,7 +444,7 @@ public function setObjectData(&$object, $action, $amounts, $fuser = null)
{
if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties
if (! in_array($key, array(
'ref','facnumber','ref_client','ref_supplier','date','datef','type','total_ht','total_tva','total_ttc','localtax1','localtax2','revenuestamp','datepointoftax','note_public'
'ref','ref_client','ref_supplier','date','datef','type','total_ht','total_tva','total_ttc','localtax1','localtax2','revenuestamp','datepointoftax','note_public'
))) continue; // Discard if not into a dedicated list
if (!is_object($value)) $this->object_data->{$key} = $value;
}
Expand Down Expand Up @@ -557,7 +557,7 @@ public function setObjectData(&$object, $action, $amounts, $fuser = null)
{
if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties
if (! in_array($key, array(
'ref','facnumber','ref_client','ref_supplier','date','datef','type','total_ht','total_tva','total_ttc','localtax1','localtax2','revenuestamp','datepointoftax','note_public'
'ref','ref_client','ref_supplier','date','datef','type','total_ht','total_tva','total_ttc','localtax1','localtax2','revenuestamp','datepointoftax','note_public'
))) continue; // Discard if not into a dedicated list
if (!is_object($value))
{
Expand Down
6 changes: 3 additions & 3 deletions htdocs/comm/card.php
Expand Up @@ -1136,7 +1136,7 @@
*/
if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
{
$sql = 'SELECT f.rowid as facid, f.facnumber, f.type, f.amount';
$sql = 'SELECT f.rowid as facid, f.ref, f.type, f.amount';
$sql.= ', f.total as total_ht';
$sql.= ', f.tva as total_tva';
$sql.= ', f.total_ttc';
Expand All @@ -1147,7 +1147,7 @@
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiement_facture as pf ON f.rowid=pf.fk_facture';
$sql.= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$object->id;
$sql.= " AND f.entity = ".$conf->entity;
$sql.= ' GROUP BY f.rowid, f.facnumber, f.type, f.amount, f.total, f.tva, f.total_ttc,';
$sql.= ' GROUP BY f.rowid, f.ref, f.type, f.amount, f.total, f.tva, f.total_ttc,';
$sql.= ' f.datef, f.datec, f.paye, f.fk_statut,';
$sql.= ' s.nom, s.rowid';
$sql.= " ORDER BY f.datef DESC, f.datec DESC";
Expand Down Expand Up @@ -1176,7 +1176,7 @@
$objp = $db->fetch_object($resql);

$facturestatic->id = $objp->facid;
$facturestatic->ref = $objp->facnumber;
$facturestatic->ref = $objp->ref;
$facturestatic->type = $objp->type;
$facturestatic->total_ht = $objp->total_ht;
$facturestatic->total_tva = $objp->total_tva;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/comm/propal/class/propal.class.php
Expand Up @@ -2775,7 +2775,7 @@ function InvoiceArrayList($id)

if (count($linkedInvoices) > 0)
{
$sql= "SELECT rowid as facid, facnumber, total, datef as df, fk_user_author, fk_statut, paye";
$sql= "SELECT rowid as facid, ref, total, datef as df, fk_user_author, fk_statut, paye";
$sql.= " FROM ".MAIN_DB_PREFIX."facture";
$sql.= " WHERE rowid IN (".implode(',',$linkedInvoices).")";

Expand Down
18 changes: 9 additions & 9 deletions htdocs/comm/remx.php
Expand Up @@ -415,7 +415,7 @@
$sql.= " rc.datec as dc, rc.description,";
$sql.= " rc.fk_facture_source,";
$sql.= " u.login, u.rowid as user_id,";
$sql.= " fa.facnumber as ref, fa.type as type";
$sql.= " fa.ref as ref, fa.type as type";
$sql.= " FROM ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."societe_remise_except as rc";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture as fa ON rc.fk_facture_source = fa.rowid";
$sql.= " WHERE rc.fk_soc = " . $object->id;
Expand Down Expand Up @@ -704,8 +704,8 @@
$sql.= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,";
$sql.= " rc.fk_facture_source,";
$sql.= " u.login, u.rowid as user_id,";
$sql.= " f.rowid, f.facnumber,";
$sql.= " fa.facnumber as ref, fa.type as type";
$sql.= " f.rowid, f.ref,";
$sql.= " fa.ref as ref, fa.type as type";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
$sql.= " , ".MAIN_DB_PREFIX."user as u";
$sql.= " , ".MAIN_DB_PREFIX."facturedet as fc";
Expand All @@ -723,8 +723,8 @@
$sql2.= " rc.datec as dc, rc.description, rc.fk_facture_line, rc.fk_facture,";
$sql2.= " rc.fk_facture_source,";
$sql2.= " u.login, u.rowid as user_id,";
$sql2.= " f.rowid, f.facnumber,";
$sql2.= " fa.facnumber as ref, fa.type as type";
$sql2.= " f.rowid, f.ref,";
$sql2.= " fa.ref as ref, fa.type as type";
$sql2.= " FROM ".MAIN_DB_PREFIX."facture as f";
$sql2.= " , ".MAIN_DB_PREFIX."user as u";
$sql2.= " , ".MAIN_DB_PREFIX."societe_remise_except as rc";
Expand Down Expand Up @@ -819,7 +819,7 @@
print $obj->description;
print '</td>';
}
print '<td align="left" class="nowrap"><a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"),'bill').' '.$obj->facnumber.'</a></td>';
print '<td align="left" class="nowrap"><a href="'.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"),'bill').' '.$obj->ref.'</a></td>';
print '<td align="right">'.price($obj->amount_ht).'</td>';
print '<td align="right">'.price2num($obj->tva_tx,'MU').'%</td>';
print '<td align="right">'.price($obj->amount_ttc).'</td>';
Expand Down Expand Up @@ -858,7 +858,7 @@
$sql.= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,";
$sql.= " rc.fk_invoice_supplier_source,";
$sql.= " u.login, u.rowid as user_id,";
$sql.= " f.rowid, f.ref as facnumber,";
$sql.= " f.rowid, f.ref as ref,";
$sql.= " fa.ref, fa.type as type";
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
$sql.= " , ".MAIN_DB_PREFIX."user as u";
Expand All @@ -877,7 +877,7 @@
$sql2.= " rc.datec as dc, rc.description, rc.fk_invoice_supplier_line, rc.fk_invoice_supplier,";
$sql2.= " rc.fk_invoice_supplier_source,";
$sql2.= " u.login, u.rowid as user_id,";
$sql2.= " f.rowid, f.ref as facnumber,";
$sql2.= " f.rowid, f.ref as ref,";
$sql2.= " fa.ref, fa.type as type";
$sql2.= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
$sql2.= " , ".MAIN_DB_PREFIX."user as u";
Expand Down Expand Up @@ -973,7 +973,7 @@
print $obj->description;
print '</td>';
}
print '<td align="left" class="nowrap"><a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"),'bill').' '.$obj->facnumber.'</a></td>';
print '<td align="left" class="nowrap"><a href="'.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$obj->rowid.'">'.img_object($langs->trans("ShowBill"),'bill').' '.$obj->ref.'</a></td>';
print '<td align="right">'.price($obj->amount_ht).'</td>';
print '<td align="right">'.price2num($obj->tva_tx,'MU').'%</td>';
print '<td align="right">'.price($obj->amount_ttc).'</td>';
Expand Down
6 changes: 3 additions & 3 deletions htdocs/commande/orderstoinvoice.php
Expand Up @@ -136,7 +136,7 @@
$closeOrders = GETPOST('autocloseorders') ? true : false;

// Security check
$fieldid = GETPOST('ref','alpha')?'facnumber':'rowid';
$fieldid = GETPOST('ref','alpha')?'ref':'rowid';
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'facture', $id,'','','fk_soc',$fieldid);

Expand All @@ -163,7 +163,7 @@
// Si facture standard
$object->socid = $_POST['socid'];
$object->type = $_POST['type'];
$object->number = $_POST['facnumber'];
$object->number = $_POST['ref'];
$object->date = $datefacture;
$object->note_public = trim($_POST['note_public']);
$object->note = trim($_POST['note']);
Expand Down Expand Up @@ -405,7 +405,7 @@
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="socid" value="'.$soc->id.'">' ."\n";
print '<input name="facnumber" type="hidden" value="provisoire">';
print '<input name="ref" type="hidden" value="provisoire">';
print '<input name="ref_client" type="hidden" value="'.$ref_client.'">';
print '<input name="ref_int" type="hidden" value="'.$ref_int.'">';
print '<input type="hidden" name="origin" value="'.GETPOST('origin').'">';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/bank/treso.php
Expand Up @@ -136,7 +136,7 @@
$sqls = array();

// Customer invoices
$sql = "SELECT 'invoice' as family, f.rowid as objid, f.facnumber as ref, f.total_ttc, f.type, f.date_lim_reglement as dlr,";
$sql = "SELECT 'invoice' as family, f.rowid as objid, f.ref as ref, f.total_ttc, f.type, f.date_lim_reglement as dlr,";
$sql.= " s.rowid as socid, s.nom as name, s.fournisseur";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON f.fk_soc = s.rowid";
Expand Down
2 changes: 1 addition & 1 deletion htdocs/compta/compta-files.php
Expand Up @@ -88,7 +88,7 @@
$result=false;
if(($action=="searchfiles"||$action=="dl" ) && $date_start && $date_stop){
$wheretail=" '".$db->idate($date_start)."' AND '".$db->idate($date_stop)."'";
$sql="SELECT rowid as id, facnumber as ref,paye as paid,total_ttc,fk_soc,datef as date, 'Invoice' as item FROM ".MAIN_DB_PREFIX."facture";
$sql="SELECT rowid as id, ref as ref,paye as paid,total_ttc,fk_soc,datef as date, 'Invoice' as item FROM ".MAIN_DB_PREFIX."facture";
$sql.=" WHERE datef between ".$wheretail;
$sql.=" UNION ALL";
$sql.=" SELECT rowid as id,ref, paye as paid, total_ttc, fk_soc,datef as date, 'InvoiceSupplier' as item FROM ".MAIN_DB_PREFIX."facture_fourn";
Expand Down
12 changes: 6 additions & 6 deletions htdocs/compta/facture/card.php
Expand Up @@ -128,7 +128,7 @@
$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdonw.inc.php

// Security check
$fieldid = (! empty($ref) ? 'facnumber' : 'rowid');
$fieldid = (! empty($ref) ? 'ref' : 'rowid');
if ($user->societe_id) $socid = $user->societe_id;
$isdraft = (($object->statut == Facture::STATUS_DRAFT) ? 1 : 0);
$result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid, $isdraft);
Expand Down Expand Up @@ -912,7 +912,7 @@
if (! $error)
{
$object->socid = GETPOST('socid','int');
$object->number = $_POST['facnumber'];
$object->number = $_POST['ref'];
$object->date = $dateinvoice;
$object->date_pointoftax = $date_pointoftax;
$object->note_public = trim(GETPOST('note_public','none'));
Expand Down Expand Up @@ -1093,7 +1093,7 @@
{
$object->socid = GETPOST('socid','int');
$object->type = $_POST['type'];
$object->number = $_POST['facnumber'];
$object->number = $_POST['ref'];
$object->date = $dateinvoice;
$object->date_pointoftax = $date_pointoftax;
$object->note_public = trim(GETPOST('note_public','none'));
Expand Down Expand Up @@ -1144,7 +1144,7 @@
// Si facture standard
$object->socid = GETPOST('socid','int');
$object->type = GETPOST('type');
$object->number = $_POST['facnumber'];
$object->number = $_POST['ref'];
$object->date = $dateinvoice;
$object->date_pointoftax = $date_pointoftax;
$object->note_public = trim(GETPOST('note_public','none'));
Expand Down Expand Up @@ -2718,7 +2718,7 @@
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="action" value="add">';
if ($soc->id > 0) print '<input type="hidden" name="socid" value="' . $soc->id . '">' . "\n";
print '<input name="facnumber" type="hidden" value="provisoire">';
print '<input name="ref" type="hidden" value="provisoire">';
print '<input name="ref_client" type="hidden" value="' . $ref_client . '">';
print '<input name="ref_int" type="hidden" value="' . $ref_int . '">';
print '<input type="hidden" name="origin" value="' . $origin . '">';
Expand Down Expand Up @@ -3740,7 +3740,7 @@

$object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status

dol_banner_tab($object, 'ref', $linkback, 1, 'facnumber', 'ref', $morehtmlref, '', 0, '', '');
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '');

print '<div class="fichecenter">';
print '<div class="fichehalfleft">';
Expand Down

0 comments on commit 2e496ea

Please sign in to comment.