/* if($filterstring=="") $filterstring=$o->searchAToZ(); else{ $o->searchAToZ(); } */ $o->searchAToZ(); switch ($action) { //When user submit new organization case "create": // if the token is exist and not yet expired $log->showLog(4, "Accessing create record event, with bpartner name={$o->bpartner_name}"); if ($s->check(true, $token, "CREATE_BPARTNER")) { if ($o->insertBPartner()) { $latest_id = $o->getLatestBPartnerID(); $log->saveLog($latest_id, $tablebpartner, $o->updatesql, "I", "O"); /* if($accountmoduleexist==true && $o->accounts_id>0){ include_once "../simbiz/class/Accounts.php"; $acc = new Accounts(); $acc->fetchAccounts($o->accounts_id); $acc->openingbalance=$o->openingbalance+$acc->openingbalance; $acc->createdby=$o->createdby; $acc->updatedby=$o->updatedby; $effectedamt=$o->openingbalance-$o->previousopeningbalance; $acc->updateLastBalance($o->accounts_id,$o->openingbalance,$o->previousopeningbalance,$latest_id); $acc->updateOpenBalance($o->accounts_id,$effectedamt); $acc->updateOpeningBalanceAccount($o->openingbalance,$o->previousopeningbalance); $acc->recalculateAllParentAccounts();
} if ($issales) { $o->salespricelistctrl = '<select name="salespricelist_id" id="salespricelist_id">' . $simerpctrl->getSelectPriceList($o->salespricelist_id, 'Y', " AND issotrx=1 ") . '</select >'; } else { $o->salespricelistctrl = "Sales Module doesn't exist <input type='hidden' name='salespricelist_id' value='0'>"; } if ($ispurchase) { $o->purchasepricelistctrl = '<select name="purchasepricelist_id" id="purchasepricelist_id">' . $simerpctrl->getSelectPriceList($o->purchasepricelist_id, 'Y', " AND issotrx=0 ") . '</select >'; } else { $o->purchasepricelistctrl = "Purchase Module doesn't exist <input type='hidden' name='purchasepricelist_id' value='0'>"; } if ($o->saveBPartner()) { if ($isaddnew == "1") { redirect_header("bpartner.php", $pausetime, "Your data is saved, redirect to add employee."); } else { $getid = $o->getLatestBPartnerID(); redirect_header("bpartner.php?action=edit&bpartner_id={$getid}", $pausetime, "Your data is saved, redirect to employee details."); } } else { echo "<div align='center'><font style='color:red;font-weight:bold'>Failed to saved data. Please try again.</font></div>"; $o->getInputForm("new"); } require XOOPS_ROOT_PATH . '/footer.php'; break; /* start iframe bpartner nitobi */ // /* start iframe bpartner nitobi */ // case "update": //bpartnerinfo tab $o->bpartnergroup_id = $_POST['bpartnergroup_id'];