Commit 3c36a725 authored by Malcolm Blaney's avatar Malcolm Blaney

Fixed a bug in stock module where invite group supplier wasn't found.

parent 9cdab941
......@@ -356,7 +356,8 @@ class Post extends Base {
'"","indie-action .ui-icon","display","inline-block"',
'"","#indie-action-facebook","margin-left","10px"',
'"",".indie-config .ui-icon","display","inline-block"',
'"",".post .options *","padding","5px"');
'"",".post .options *","padding","5px"',
'"",".post-web-actions","padding-top","10px"');
$this->AddSiteStyle($site_style);
// The two formats are required because p-name needs to be either on the
......@@ -710,7 +711,8 @@ class Post extends Base {
'"","indie-action .ui-icon","display","inline-block"',
'"","#indie-action-facebook","margin-left","10px"',
'"",".indie-config .ui-icon","display","inline-block"',
'"",".post .options *","padding","5px"');
'"",".post .options *","padding","5px"',
'"",".post-web-actions","padding-top","10px"');
$this->AddSiteStyle($site_style);
}
......
......@@ -800,9 +800,11 @@ class Stock extends Base {
if ($this->Substitute('stock-track-quantity') != 'true') return;
$organiser = new Organiser($this->user, $this->owner);
$invite = new Invite($this->user, $this->owner);
$buying_groups = $invite->AllBuyingGroups();
$mysqli = connect_db();
foreach ($product_list as $user => $product) {
if (!$organiser->MatchUser($user)) {
if (!$organiser->MatchUser($user, $buying_groups)) {
$this->Log('Stock->Decrease 1: Supplier not found');
continue;
}
......@@ -842,9 +844,11 @@ class Stock extends Base {
if ($this->Substitute('stock-track-quantity') != 'true') return;
$organiser = new Organiser($this->user, $this->owner);
$invite = new Invite($this->user, $this->owner);
$buying_groups = $invite->AllBuyingGroups();
$mysqli = connect_db();
foreach ($product_list as $user => $product) {
if (!$organiser->MatchUser($user)) {
if (!$organiser->MatchUser($user, $buying_groups)) {
$this->Log('Stock->Increase 1: Supplier not found');
continue;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment