-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop'
- Loading branch information
Showing
6 changed files
with
101 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -365,6 +365,35 @@ public function declinedCheckout(User $declinedBy, $signature) | |
$accessory_user->limit(1)->delete(); | ||
} | ||
|
||
/** | ||
* ----------------------------------------------- | ||
* BEGIN MUTATORS | ||
* ----------------------------------------------- | ||
**/ | ||
|
||
/** | ||
* This sets a value for qty if no value is given. The database does not allow this | ||
* field to be null, and in the other areas of the code, we set a default, but the importer | ||
* does not. | ||
* | ||
* This simply checks that there is a value for quantity, and if there isn't, set it to 0. | ||
* | ||
* @author A. Gianotto <[email protected]> | ||
* @since v6.3.4 | ||
* @param $value | ||
* @return void | ||
*/ | ||
public function setQtyAttribute($value) | ||
{ | ||
$this->attributes['qty'] = (!$value) ? 0 : intval($value); | ||
} | ||
|
||
/** | ||
* ----------------------------------------------- | ||
* BEGIN QUERY SCOPES | ||
* ----------------------------------------------- | ||
**/ | ||
|
||
/** | ||
* Query builder scope to order on company | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -224,6 +224,37 @@ public function numRemaining() | |
return $this->qty - $this->numCheckedOut(); | ||
} | ||
|
||
|
||
/** | ||
* ----------------------------------------------- | ||
* BEGIN MUTATORS | ||
* ----------------------------------------------- | ||
**/ | ||
|
||
/** | ||
* This sets a value for qty if no value is given. The database does not allow this | ||
* field to be null, and in the other areas of the code, we set a default, but the importer | ||
* does not. | ||
* | ||
* This simply checks that there is a value for quantity, and if there isn't, set it to 0. | ||
* | ||
* @author A. Gianotto <[email protected]> | ||
* @since v6.3.4 | ||
* @param $value | ||
* @return void | ||
*/ | ||
public function setQtyAttribute($value) | ||
{ | ||
$this->attributes['qty'] = (!$value) ? 0 : intval($value); | ||
} | ||
|
||
/** | ||
* ----------------------------------------------- | ||
* BEGIN QUERY SCOPES | ||
* ----------------------------------------------- | ||
**/ | ||
|
||
|
||
/** | ||
* Query builder scope to order on company | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -339,6 +339,35 @@ public function numRemaining() | |
return $remaining; | ||
} | ||
|
||
/** | ||
* ----------------------------------------------- | ||
* BEGIN MUTATORS | ||
* ----------------------------------------------- | ||
**/ | ||
|
||
/** | ||
* This sets a value for qty if no value is given. The database does not allow this | ||
* field to be null, and in the other areas of the code, we set a default, but the importer | ||
* does not. | ||
* | ||
* This simply checks that there is a value for quantity, and if there isn't, set it to 0. | ||
* | ||
* @author A. Gianotto <[email protected]> | ||
* @since v6.3.4 | ||
* @param $value | ||
* @return void | ||
*/ | ||
public function setQtyAttribute($value) | ||
{ | ||
$this->attributes['qty'] = (!$value) ? 0 : intval($value); | ||
} | ||
|
||
/** | ||
* ----------------------------------------------- | ||
* BEGIN QUERY SCOPES | ||
* ----------------------------------------------- | ||
**/ | ||
|
||
/** | ||
* Query builder scope to order on company | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters