Skip to content
Permalink
Browse files

Work on MRP cration

  • Loading branch information
eldy committed Dec 2, 2019
1 parent 92070fa commit 310e65b93c7a984fde3fd6699268f7a580ce8507
Showing with 15 additions and 3 deletions.
  1. +13 −1 htdocs/mrp/class/mo.class.php
  2. +2 −2 htdocs/mrp/tpl/originproductline.tpl.php
@@ -231,7 +231,19 @@ public function __construct(DoliDB $db)
*/
public function create(User $user, $notrigger = false)
{
return $this->createCommon($user, $notrigger);
$this->db->begin();
$result = $this->createCommon($user, $notrigger);
// Insert lines in mrp_production table
if ($result > 0) {
$this->db->commit();
} else {
$this->db->rollback();
}
return $result;
}
/**
@@ -30,8 +30,8 @@
print '<tr class="oddeven'.(empty($this->tpl['strike'])?'':' strikefordisabled').'">';
print '<td>'.$this->tpl['label'].'</td>';
print '<td class="right">'.$this->tpl['qty'].'</td>';
print '<td class="center">'.yn($this->tpl['qty_frozen']).'</td>';
print '<td class="center">'.yn($this->tpl['disable_stock_change']).'</td>';
print '<td class="center">'.($this->tpl['qty_frozen'] ? yn($this->tpl['qty_frozen']) : '').'</td>';
print '<td class="center">'.($this->tpl['disable_stock_change'] ? yn($this->tpl['disable_stock_change']) : '').'</td>';
//print '<td class="right">'.$this->tpl['efficiency'].'</td>';
$selected=1;

0 comments on commit 310e65b

Please sign in to comment.
You can’t perform that action at this time.