/** * Create a new blank discount for this invoice * Usually called when user add a new line on the GUI * This will serve as a form * * @param unknown $id invoice id */ public function actionCreateBlankDiscount($id) { $invoiceItem = new LbInvoiceItem(); $result = $invoiceItem->addBlankDiscount($id); if ($result) { $response = array(); $response['success'] = YES; $response['invoice_item_id'] = $invoiceItem->lb_record_primary_key; LBApplication::renderPlain($this, array('content' => CJSON::encode($response))); } }