$log->showLog(3, "action: ajaxdelete, quotation_id={$o->quotation_id}"); echo "<?xml version='1.0' encoding='utf-8' ?><Result>"; if (!$o->deleteQuotation($o->quotation_id)) { echo "<status>0</status><detail><msg>Cannot delete this record due to internal error</msg></detail>"; } else { echo "<status>1</status><detail><msg>C</msg></detail>"; } echo "</Result>"; break; case "refreshsubtable": include "../simantz/class/FormElement.php"; include "../bpartner/class/BPartnerFormElement.inc.php"; $fe = new FormElement(); $sbfe = new BPartnerFormElement(); $o->quotation_id = $_REQUEST['quotation_id']; $o->fetchQuotation($o->quotation_id); echo $o->subtable(); break; case "getbpartnerinfo": include_once "../simantz/class/SelectCtrl.inc.php"; $ctrl = new SelectCtrl(); include "../bpartner/class/BPSelectCtrl.inc.php"; $bpctrl = new BPSelectCtrl(); include "../bpartner/class/BPartner.php"; $bp = new BPartner(); $bpartner_id = $_REQUEST['bpartner_id']; $bp->fetchBpartnerData($bpartner_id); $addressxml = str_replace(">", "}}}", str_replace("<", "{{{", $bpctrl->getSelectAddress(0, "N", $bpartner_id))); $termsxml = str_replace(">", "}}}", str_replace("<", "{{{", $bpctrl->getSelectTerms($bp->terms_id, "N"))); $contactxml = str_replace(">", "}}}", str_replace("<", "{{{", $bpctrl->getSelectContacts(0, 'N', "", "", " and bpartner_id={$bpartner_id}"))); $currencyxml = str_replace(">", "}}}", str_replace("<", "{{{", $ctrl->getSelectCurrency($bp->currency_id)));