Update Framework, Invoices
This commit is contained in:
parent
cc5c147c27
commit
9b0b5feb7e
174 changed files with 28356 additions and 8093 deletions
|
|
@ -113,6 +113,8 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereIsFrom($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingEmail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShoppingUserId($value)
|
||||
* @property int|null $homeparty_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingUser whereHomepartyId($value)
|
||||
*/
|
||||
class ShoppingUser extends Model
|
||||
{
|
||||
|
|
@ -246,6 +248,26 @@ class ShoppingUser extends Model
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function getOrderPaymentFor() {
|
||||
|
||||
switch($this->is_from){
|
||||
case 'wizard':
|
||||
return 1;
|
||||
case 'membership':
|
||||
return 2;
|
||||
case 'user_order':
|
||||
return $this->is_for === 'me' ? 3 : 4;
|
||||
case 'homeparty':
|
||||
return 5;
|
||||
case 'shopping':
|
||||
return 6;
|
||||
case 'extern':
|
||||
return 7;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public function getAPIShippedType() {
|
||||
if($this->shopping_order){
|
||||
return $this->shopping_order->getAPIShippedType();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue