コード例 #1
0
ファイル: Item.php プロジェクト: pneal-vital/vital4.0
 /**
  * This function can set objectID, set default values, and validate the entered field values.
  *
  * Register this function in an Event Listener, see: http://laravel.com/docs/master/events
  * or call it from EventServiceProvider::boot(..)
  */
 public function isCreating()
 {
     // set objectID
     $inserted = VitalObject::create(['classID' => 'Item']);
     $this->objectID = $inserted->objectID;
     // set default values
     if (isset($this->Per_Unit_Weight) == false || strlen($this->Per_Unit_Weight) < 1) {
         $this->Per_Unit_Weight = 0;
     }
     if (isset($this->Retail_Price) == false || strlen($this->Retail_Price) < 1) {
         $this->Retail_Price = 0;
     }
     if (isset($this->Case_Pack) == false || strlen($this->Case_Pack) < 1) {
         $this->Case_Pack = 0;
     }
     $this->Delivery_Number = "";
     $this->PO_Number = "";
     $this->Vendor_Item_Number = "";
     $this->Cases_Ordered = "";
     $this->Master_Pack_Cube = "";
     if (isset($this->Master_Pack_Weight) == false || strlen($this->Master_Pack_Weight) < 1) {
         $this->Master_Pack_Weight = 0;
     }
     $this->Total_Weight = "";
     $this->Total_Cube = "";
     //dd($this);
     /* validate the entered field values.
     		if ( ! $this->isValid()) return false;
     		*/
     // validation can also be in app\Http\Requests\..Request.php
 }
コード例 #2
0
 /**
  * This function can set objectID, set default values, and validate the entered field values.
  *
  * Register this function in an Event Listener, see: http://laravel.com/docs/master/events
  * or call it from EventServiceProvider::boot(..)
  */
 public function isCreating()
 {
     // set objectID
     $inserted = VitalObject::create(['classID' => self::TABLE_NAME]);
     $this->objectID = $inserted->objectID;
     // set default values
     //$this->Status = "OPEN";
     /* validate the entered field values.
        if ( ! $this->isValid()) return false;
        */
 }
コード例 #3
0
 /**
  * This function can set objectID, set default values, and validate the entered field values.
  *
  * Register this function in an Event Listener, see: http://laravel.com/docs/master/events
  * or call it from EventServiceProvider::boot(..)
  */
 public function isCreating()
 {
     // set objectID
     $inserted = VitalObject::create(['classID' => 'Inbound_Order_Detail']);
     $this->objectID = $inserted->objectID;
     // set default values
     $this->Line_Number = "";
     $this->Status = "NEW";
     $this->Received = "";
     $this->UCC = "";
     /* validate the entered field values.
     		if ( ! $this->isValid()) return false;
     		*/
 }
コード例 #4
0
 /**
  * Implement filterOn($filter)
  */
 public function filterOn($filter, $limit = 10)
 {
     // Build a query based on filter $filter
     $query = VitalObject::orderBy('objectID', 'asc');
     if (isset($filter['classID']) && strlen($filter['classID']) > 0) {
         $query = $query->where('classID', $filter['classID']);
     }
     if ($limit == 0) {
         return $query->get();
     } elseif ($limit == 1) {
         return $query->first();
     }
     return $query->limit($limit)->get();
 }
コード例 #5
0
ファイル: InboundOrder.php プロジェクト: pneal-vital/vital4.0
 /**
  * This function can set objectID, set default values, and validate the entered field values.
  *
  * Register this function in an Event Listener, see: http://laravel.com/docs/master/events
  * or call it from EventServiceProvider::boot(..)
  */
 public function isCreating()
 {
     // set objectID
     $inserted = VitalObject::create(['classID' => 'Inbound_Order']);
     $this->objectID = $inserted->objectID;
     // set default values
     $this->Special_Instructions = "";
     $this->Status = "NEW";
     $this->Created = Carbon::now();
     $this->Actual = "";
     $this->VendorID = 0;
     /* validate the entered field values.
     		if ( ! $this->isValid()) return false;
     		*/
 }
コード例 #6
0
ファイル: Pallet.php プロジェクト: pneal-vital/vital4.0
 /**
  * This function can set objectID, set default values, and validate the entered field values.
  *
  * Register this function in an Event Listener, see: http://laravel.com/docs/master/events
  * or call it from EventServiceProvider::boot(..)
  */
 public function isCreating()
 {
     // set objectID
     $inserted = VitalObject::create(['classID' => self::TABLE_NAME]);
     $this->objectID = $inserted->objectID;
     if (!isset($this->Pallet_ID) || strlen($this->Pallet_ID) == 0) {
         $this->Pallet_ID = $inserted->objectID;
     }
     // set default values
     $this->x = '1';
     $this->y = '1';
     $this->z = '1';
     /* validate the entered field values.
        if ( ! $this->isValid()) return false;
        */
 }
コード例 #7
0
ファイル: Location.php プロジェクト: pneal-vital/vital4.0
 /**
  * This function can set objectID, set default values, and validate the entered field values.
  *
  * Register this function in an Event Listener, see: http://laravel.com/docs/master/events
  * or call it from EventServiceProvider::boot(..) .. Location::creating
  */
 public function isCreating()
 {
     // set objectID
     $inserted = VitalObject::create(['classID' => self::TABLE_NAME]);
     $this->objectID = $inserted->objectID;
     // set default values
     $this->Capacity = '1';
     $this->x = '3.00';
     $this->y = '2.00';
     $this->z = '2.00';
     $this->Status = "OPEN";
     $this->ChargeType = "";
     /* validate the entered field values.
        if ( ! $this->isValid()) return false;
        */
 }
コード例 #8
0
ファイル: Inventory.php プロジェクト: pneal-vital/vital4.0
 /**
  * This function can set objectID, set default values, and validate the entered field values.
  *
  * Register this function in an Event Listener, see: http://laravel.com/docs/master/events
  * or call it from EventServiceProvider::boot(..)
  */
 public function isCreating()
 {
     // set objectID
     $inserted = VitalObject::create(['classID' => 'Inventory']);
     $this->objectID = $inserted->objectID;
     Log::debug('objectID: ' . $this->objectID);
     // set default values
     $this->Status = "RECD";
     //Log::debug('Status: '.$this->Status);
     $now = Carbon::now();
     //Log::debug('now: '.$now);
     $this->Created = $now;
     //Log::debug('Created: '.$this->Created);
     /* validate the entered field values.
     		if ( ! $this->isValid()) return false;
     		*/
 }
コード例 #9
0
ファイル: UOM.php プロジェクト: pneal-vital/vital4.0
 /**
  * This function can set objectID, set default values, and validate the entered field values.
  *
  * Register this function in an Event Listener, see: http://laravel.com/docs/master/events
  * or call it from EventServiceProvider::boot(..)
  */
 public function isCreating()
 {
     // set objectID
     $inserted = VitalObject::create(['classID' => 'UOM']);
     $this->objectID = $inserted->objectID;
 }