08 2024
This commit is contained in:
parent
04d677d37a
commit
bfa3bb1df4
1191 changed files with 637397 additions and 10619 deletions
45
app/Services/SyS/RepairSalesVolumeInvoice.php
Normal file
45
app/Services/SyS/RepairSalesVolumeInvoice.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
namespace App\Services\SyS;
|
||||
|
||||
use Request;
|
||||
use App\Models\UserBusiness;
|
||||
use App\Models\UserInvoice;
|
||||
use App\Models\UserSalesVolume;
|
||||
|
||||
class RepairSalesVolumeInvoice
|
||||
{
|
||||
|
||||
public static function show()
|
||||
{
|
||||
|
||||
dump("RepairSalesVolumeInvoice");
|
||||
dd('check function');
|
||||
$UserSalesVolumes = UserSalesVolume::where('status', '<', 3)->where('user_invoice_id', null)->orderBy('id', 'desc')->limit(1000)->get();
|
||||
dump(count($UserSalesVolumes));
|
||||
$c = 0;
|
||||
foreach($UserSalesVolumes as $user_sales_volume){
|
||||
|
||||
if($user_sales_volume->shopping_order_id){
|
||||
$UserInvoice = UserInvoice::where('shopping_order_id', $user_sales_volume->shopping_order_id)->first();
|
||||
if($UserInvoice){
|
||||
$user_sales_volume->user_invoice_id = $UserInvoice->id;
|
||||
$user_sales_volume->save();
|
||||
$c++;
|
||||
}
|
||||
}
|
||||
}
|
||||
dump("counter");
|
||||
dd($c);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static function store()
|
||||
{
|
||||
$data = Request::all();
|
||||
\Session()->flash('alert-save', true);
|
||||
return back();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue