mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
New: Add supplier ref on supplier orders
This commit is contained in:
parent
f4cd202a29
commit
0cb1e4fe7c
|
|
@ -3,7 +3,8 @@ English Dolibarr ChangeLog
|
|||
--------------------------------------------------------------
|
||||
|
||||
***** ChangeLog for 3.3 compared to 3.2 *****
|
||||
|
||||
For users:
|
||||
- New: Add supplier ref on supplier orders
|
||||
|
||||
|
||||
***** ChangeLog for 3.2 compared to 3.1 *****
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class CommandeFournisseur extends Commande
|
|||
var $cond_reglement_code;
|
||||
var $mode_reglement_id;
|
||||
var $mode_reglement_code;
|
||||
|
||||
|
||||
var $extraparams=array();
|
||||
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ class CommandeFournisseur extends Commande
|
|||
// Check parameters
|
||||
if (empty($id) && empty($ref)) return -1;
|
||||
|
||||
$sql = "SELECT c.rowid, c.ref, c.date_creation, c.fk_soc, c.fk_user_author, c.fk_statut, c.amount_ht, c.total_ht, c.total_ttc, c.tva,";
|
||||
$sql = "SELECT c.rowid, c.ref, ref_supplier, c.date_creation, c.fk_soc, c.fk_user_author, c.fk_statut, c.amount_ht, c.total_ht, c.total_ttc, c.tva,";
|
||||
$sql.= " c.localtax1, c.localtax2, ";
|
||||
$sql.= " c.date_commande as date_commande, c.date_livraison as date_livraison, c.fk_cond_reglement, c.fk_mode_reglement, c.fk_projet as fk_project, c.remise_percent, c.source, c.fk_methode_commande,";
|
||||
$sql.= " c.note as note_private, c.note_public, c.model_pdf, c.extraparams,";
|
||||
|
|
@ -140,6 +140,7 @@ class CommandeFournisseur extends Commande
|
|||
|
||||
$this->id = $obj->rowid;
|
||||
$this->ref = $obj->ref;
|
||||
$this->ref_supplier = $obj->ref_supplier;
|
||||
$this->socid = $obj->fk_soc;
|
||||
$this->fourn_id = $obj->fk_soc;
|
||||
$this->statut = $obj->fk_statut;
|
||||
|
|
@ -170,7 +171,7 @@ class CommandeFournisseur extends Commande
|
|||
$this->note_private = $obj->note_private;
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->modelpdf = $obj->model_pdf;
|
||||
|
||||
|
||||
$this->extraparams = (array) json_decode($obj->extraparams, true);
|
||||
|
||||
$this->db->free($resql);
|
||||
|
|
|
|||
|
|
@ -72,6 +72,12 @@ $object = new CommandeFournisseur($db);
|
|||
/*
|
||||
* Actions
|
||||
*/
|
||||
if ($action == 'setref_supplier' && $user->rights->fournisseur->commande->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result=$object->setValueFrom('ref_supplier',GETPOST('ref_supplier','alpha'));
|
||||
if ($result < 0) dol_print_error($db, $object->error);
|
||||
}
|
||||
|
||||
// conditions de reglement
|
||||
if ($action == 'setconditions' && $user->rights->fournisseur->commande->creer)
|
||||
|
|
@ -1037,10 +1043,12 @@ if ($id > 0 || ! empty($ref))
|
|||
print '</tr>';
|
||||
|
||||
// Ref supplier
|
||||
/* print '<tr><td>'.$langs->trans("RefSupplier")."</td>";
|
||||
print '<td colspan="2">'.$object->ref_supplier.'</td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
print '<tr><td>';
|
||||
print $form->editfieldkey("RefSupplier",'ref_supplier',$langs->trans($object->ref_supplier),$object,$user->rights->fournisseur->commande->creer);
|
||||
print '</td><td colspan="2">';
|
||||
print $form->editfieldval("RefSupplier",'ref_supplier',$langs->trans($object->ref_supplier),$object,$user->rights->fournisseur->commande->creer);
|
||||
print '</td></tr>';
|
||||
|
||||
// Fournisseur
|
||||
print '<tr><td>'.$langs->trans("Supplier")."</td>";
|
||||
print '<td colspan="2">'.$soc->getNomUrl(1,'supplier').'</td>';
|
||||
|
|
@ -1758,5 +1766,6 @@ if ($id > 0 || ! empty($ref))
|
|||
|
||||
// End of page
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user