mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Add stock information in products list.
This commit is contained in:
parent
f7c956454a
commit
b31d25e767
|
|
@ -24,7 +24,8 @@ For users:
|
|||
- New: Can add personalised fields in emailing selectors.
|
||||
- New: Customer code and supplier code can be defined automatically.
|
||||
- New: Emailing feature can extract civility from contacts.
|
||||
- New: Can creat a third party from a member of fundation module.
|
||||
- New: Can create a third party from a member of fundation module.
|
||||
- New: Can set a limit for stock alert to 0.
|
||||
- Fix: Handle correctly the comment in status changing of supplier orders.
|
||||
- Fix: Author, title and topic are correctly encoded in PDF.
|
||||
- Fix: Now HTML output is always UTF8, this solve bad PDF encoding on old users.
|
||||
|
|
|
|||
|
|
@ -140,9 +140,9 @@ class modProduit extends DolibarrModules
|
|||
$this->export_code[$r]=$this->rights_class.'_'.$r;
|
||||
$this->export_label[$r]="ProductsOrServices"; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
$this->export_permission[$r]=array(array("produit","export"));
|
||||
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"Price",'p.tva_tx'=>'VAT','p.envente'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification','p.stock'=>'Stock','p.pmp'=>'PMPValue');
|
||||
$this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.tva_tx'=>'product','p.envente'=>"product",'p.duration'=>"product",'p.datec'=>'product','p.tms'=>'product','p.stock'=>'product','p.pmp'=>'product');
|
||||
$this->export_alias_array[$r]=array('p.rowid'=>"id",'p.ref'=>"ref",'p.fk_product_type'=>"type",'p.label'=>"label",'p.description'=>"description",'p.note'=>"note",'p.price'=>"price",'p.tva_tx'=>'vat','p.envente'=>"onsell",'p.duration'=>"duration",'p.datec'=>'datecreation','p.tms'=>'datemodification','p.stock'=>'stock','p.pmp'=>'pmp');
|
||||
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.fk_product_type'=>"Type",'p.label'=>"Label",'p.description'=>"Description",'p.note'=>"Note",'p.price'=>"Price",'p.tva_tx'=>'VAT','p.envente'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification');
|
||||
$this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.fk_product_type'=>"product",'p.label'=>"product",'p.description'=>"product",'p.note'=>"product",'p.price'=>"product",'p.tva_tx'=>'product','p.envente'=>"product",'p.duration'=>"product",'p.datec'=>'product','p.tms'=>'product');
|
||||
$this->export_alias_array[$r]=array('p.rowid'=>"id",'p.ref'=>"ref",'p.fk_product_type'=>"type",'p.label'=>"label",'p.description'=>"description",'p.note'=>"note",'p.price'=>"price",'p.tva_tx'=>'vat','p.envente'=>"onsell",'p.duration'=>"duration",'p.datec'=>'datecreation','p.tms'=>'datemodification');
|
||||
$this->export_sql_start[$r]='SELECT DISTINCT ';
|
||||
$this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p';
|
||||
|
||||
|
|
|
|||
|
|
@ -375,7 +375,6 @@ class Product extends CommonObject
|
|||
$this->volume_units = trim($this->volume_units);
|
||||
if (empty($this->tva_tx)) $this->tva_tx = 0;
|
||||
if (empty($this->finished)) $this->finished = 0;
|
||||
if (empty($this->seuil_stock_alerte)) $this->seuil_stock_alerte = 0;
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."product ";
|
||||
$sql .= " SET label = '" . addslashes($this->libelle) ."'";
|
||||
|
|
@ -387,7 +386,7 @@ class Product extends CommonObject
|
|||
$sql .= ",weight_units = " . ($this->weight_units!='' ? "'".$this->weight_units."'": 'null');
|
||||
$sql .= ",volume = " . ($this->volume!='' ? "'".$this->volume."'" : 'null');
|
||||
$sql .= ",volume_units = " . ($this->volume_units!='' ? "'".$this->volume_units."'" : 'null');
|
||||
$sql .= ",seuil_stock_alerte = " . ($this->seuil_stock_alerte!='' ? $this->seuil_stock_alerte : "null");
|
||||
$sql .= ",seuil_stock_alerte = " . ((isset($this->seuil_stock_alerte) && $this->seuil_stock_alerte != '') ? "'".$this->seuil_stock_alerte."'" : "null");
|
||||
$sql .= ",description = '" . addslashes($this->description) ."'";
|
||||
$sql .= ",stock_loc = '" . addslashes($this->stock_loc) ."'";
|
||||
$sql .= ",note = '" . addslashes($this->note) ."'";
|
||||
|
|
|
|||
|
|
@ -779,7 +779,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||
$product->assign_smarty_values($smarty,$_GET["action"]);
|
||||
}
|
||||
}
|
||||
// END TODO RODO FINISH THIS PART
|
||||
|
||||
|
||||
llxHeader("","",$langs->trans("CardProduct".$product->type));
|
||||
|
||||
|
|
@ -1054,7 +1054,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||
}
|
||||
else
|
||||
{
|
||||
print '<input name="seuil_stock_alerte" type="hidden" value="0">';
|
||||
print '<input name="seuil_stock_alerte" type="hidden" value="'.$product->seuil_stock_alerte.'">';
|
||||
}
|
||||
|
||||
if ($product->isservice())
|
||||
|
|
@ -1081,6 +1081,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||
print '<input name="weight" size="5" value="'.$product->weight.'"> ';
|
||||
print $formproduct->select_measuring_units("weight_units", "weight", $product->weight_units);
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans("Volume").'</td><td>';
|
||||
print '<input name="volume" size="5" value="'.$product->volume.'"> ';
|
||||
print $formproduct->select_measuring_units("volume_units", "volume", $product->volume_units);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user