06 2022
This commit is contained in:
parent
9b0b5feb7e
commit
7a040c3e19
106 changed files with 4074 additions and 1349 deletions
|
|
@ -85,6 +85,11 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
* @property-read \App\Models\Homeparty|null $homeparty
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereHomepartyId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereWpNotice($value)
|
||||
* @property array|null $tax_split
|
||||
* @property-read \App\Models\UserInvoice|null $user_invoice
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\UserSalesVolume[] $user_sales_volume
|
||||
* @property-read int|null $user_sales_volume_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereTaxSplit($value)
|
||||
*/
|
||||
class ShoppingOrder extends Model
|
||||
{
|
||||
|
|
@ -265,6 +270,19 @@ class ShoppingOrder extends Model
|
|||
return "";
|
||||
}
|
||||
|
||||
public function getLastShoppingPaymentTransaction(){
|
||||
if($this->shopping_payments){
|
||||
$shopping_payment = $this->shopping_payments->last();
|
||||
if($shopping_payment){
|
||||
$payt = $shopping_payment->payment_transactions->last();
|
||||
if($payt){
|
||||
return $payt;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getShippedType(){
|
||||
return isset(self::$shippedTypes[$this->shipped]) ? self::$shippedTypes[$this->shipped] : "";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue