Ejemplo n.º 1
0
 public function actionWorkshopTo()
 {
     $consignments = ConsignmentModel::read();
     $places_workshop = PlaceModel::readByColumnValue('id_warehouse', 2);
     if (isset($_POST['id_consignment']) && isset($_POST['id_from']) && isset($_POST['qty']) && isset($_POST['qty_t']) && isset($_POST['kr']) && isset($_POST['parts'])) {
         $move = new MoveModel();
         $move->id_type = '4';
         $move->id_consignment = $_POST['id_consignment'];
         $move->id_from = $_POST['id_from'];
         $move->qty_from = $_POST['qty'];
         $move->qty_t = $_POST['qty_t'];
         $move->kr = $_POST['kr'];
         $move->parts = $_POST['parts'];
         $move->create();
         header('Location: /report/main');
     }
     $this->render('workshop_to', ['consignments' => $consignments, 'places_workshop' => $places_workshop]);
 }
Ejemplo n.º 2
0
 public function actionDelete($id)
 {
     $place = PlaceModel::readById($id);
     $place->delete();
     header('Location: /place/read');
 }