function getVehiclePriceAction()
 {
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         $period_id = $post["period_id"];
         $db = new Booking_Model_DbTable_DbBooking();
         $row = $db->getVehiclePrice($period_id);
         print_r(Zend_Json::encode($row));
         exit;
     }
 }
 public function addAction()
 {
     $db = new Application_Model_DbTable_DbGlobal();
     $this->view->rs_tax = $db->getAllTax();
     $owner = $db->getAllNameOwner();
     //array_unshift($owner, array ('' => 'បន្ថែម​អ្នក​ទទួល​ថ្មី') );
     $this->view->rows_owner = $owner;
     $cus = new Booking_Model_DbTable_DbBooking();
     $rows_cus = $cus->getIdNamecustomer();
     $this->view->rows_cus = $rows_cus;
     $row_vehicle = $cus->getVehiclerefNo();
     $this->view->row_vehicle = $row_vehicle;
 }
Exemple #3
0
 public function editAction()
 {
     $db = new agreement_Model_DbTable_DbAgreement();
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         try {
             $db->addAgreement($data);
             Application_Form_FrmMessage::Sucessfull("EDIT_SUCCESS", "/agreement/imdex/add");
         } catch (Exception $e) {
             Application_Form_FrmMessage::message("Application Error");
             Application_Model_DbTable_DbUserLog::writeMessageError($e->getMessage());
         }
     }
     $id = $this->getRequest()->getParam('id');
     if (empty($id)) {
         $this->_redirect("/agreement");
     }
     $this->view->row_agreement = $db->getAgreementById($id);
     print_r($db->getAgreementById($id));
     $db = new Application_Model_DbTable_DbGlobal();
     $this->view->rs_tax = $db->getAllTax();
     $owner = $db->getAllNameOwner();
     $this->view->country = $db->getAllCountry();
     $this->view->rows_owner = $owner;
     $cus = new Booking_Model_DbTable_DbBooking();
     $rows_cus = $cus->getIdNamecustomer();
     $this->view->rows_cus = $rows_cus;
     $row_vehicle = $cus->getVehiclerefNo();
     $this->view->row_vehicle = $row_vehicle;
     $db = new agreement_Model_DbTable_DbAgreement();
     $this->view->rsbooking = $db->getAllBookingNumber();
 }