Skip to content

Commit

Permalink
Work on MRP cration
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Dec 2, 2019
1 parent 92070fa commit 310e65b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 13 additions & 1 deletion htdocs/mrp/class/mo.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions htdocs/mrp/tpl/originproductline.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 310e65b

Please sign in to comment.