This commit is contained in:
tianshujie
2021-11-12 13:10:52 +08:00
parent b71f540905
commit 44bfbb7cdc
4 changed files with 29 additions and 7 deletions
+15 -3
View File
@@ -329,13 +329,25 @@ class productplan extends control
* @param int $productID
* @param int $branch
* @param string $number
*
* @param string $from
* @access public
* @return void
*/
public function ajaxGetProductplans($productID, $branch = 0, $number = '')
public function ajaxGetProductplans($productID, $branch = 0, $number = '', $from = '')
{
$plans = $this->productplan->getPairs($productID, $branch);
if($from == 'story' and $branch == BRANCH_MAIN)
{
$plans = $this->productplan->getPairs($productID);
}
elseif($from == 'story' and $branch)
{
$plans = $this->productplan->getPairs($productID, 0);
$plans += $this->productplan->getPairs($productID, $branch);
}
else
{
$plans = $this->productplan->getPairs($productID, $branch, $expired);
}
$planName = $number === '' ? 'plan' : "plan[$number]";
$plans = empty($plans) ? array('' => '') : $plans;