コード例 #1
0
ファイル: bpartner.php プロジェクト: gauravsaxena21/simantz
$filterstring = $_GET['filterstring'];
/*
	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);