Пример #1
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
 /**
  * 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;
     		*/
 }
Пример #5
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;
        */
 }
Пример #6
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;
        */
 }
Пример #7
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;
     		*/
 }
Пример #8
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;
 }