public function testSaveAndMark_deleted() { error_reporting(E_ERROR | E_PARSE); $aosQuotes = new AOS_Quotes(); $aosQuotes->name = 'test'; $aosQuotes->total_amt = 100; $aosQuotes->total_amt_usdollar = 100; $aosQuotes->save(); //test for record ID to verify that record is saved $this->assertTrue(isset($aosQuotes->id)); $this->assertEquals(36, strlen($aosQuotes->id)); //mark the record as deleted and verify that this record cannot be retrieved anymore. $aosQuotes->mark_deleted($aosQuotes->id); $result = $aosQuotes->retrieve($aosQuotes->id); $this->assertEquals(null, $result); }
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE * along with this program; if not, see http://www.gnu.org/licenses * or write to the Free Software Foundation,Inc., 51 Franklin Street, * Fifth Floor, Boston, MA 02110-1301 USA * * @author SalesAgility <*****@*****.**> */ if (!ACLController::checkAccess('AOS_Contracts', 'edit', true)) { ACLController::displayNoAccess(); die; } require_once 'modules/AOS_Quotes/AOS_Quotes.php'; require_once 'modules/AOS_Contracts/AOS_Contracts.php'; //Setting values in Quotes $quote = new AOS_Quotes(); $quote->retrieve($_REQUEST['record']); //Setting Contract Values $contract = new AOS_Contracts(); $contract->name = $quote->name; $contract->assigned_user_id = $quote->assigned_user_id; $contract->total_contract_value = format_number($quote->total_amount); $contract->contract_account_id = $quote->billing_account_id; $contract->contact_id = $quote->billing_contact_id; $contract->opportunity_id = $quote->opportunity_id; $contract->total_amt = $quote->total_amt; $contract->subtotal_amount = $quote->subtotal_amount; $contract->discount_amount = $quote->discount_amount; $contract->tax_amount = $quote->tax_amount; $contract->shipping_amount = $quote->shipping_amount; $contract->shipping_tax = $quote->shipping_tax; $contract->shipping_tax_amt = $quote->shipping_tax_amt;