mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
fix 1688 purchase order
This commit is contained in:
+15
-11
@@ -386,18 +386,22 @@ Route::get('/payments/manual', function(){
|
||||
|
||||
|
||||
|
||||
Route::get('/1688/fix', function(){
|
||||
set_time_limit(1800);
|
||||
$purchaseOrderDocuments = \App\Models\Document::where('document_type', DocumentType::ECOMMERCE_PURCHASE_ORDER)->get();
|
||||
Route::get('/1688/fix/{reference}', function($reference){
|
||||
|
||||
foreach($purchaseOrderDocuments as $document){
|
||||
$booking = $document->owner;
|
||||
$booking->status = ApprovalStatus::APPROVED;
|
||||
$booking->save();
|
||||
$booking = Booking::where('marking', $reference)->first();
|
||||
|
||||
$booking->documents()->whereIn('document_type', [DocumentType::INVOICE, DocumentType::PURCHASE_ORDER, DocumentType::DELIVER_ORDER, DocumentType::SUPPLIER_DELIVER_ORDER])->delete();
|
||||
|
||||
(App()->make(createPurchaseOrderFor1688OrderProcessor::class))->execute($document->owner);
|
||||
}
|
||||
$this->createPurchaseOrderFor1688OrderProcessor->execute($booking);
|
||||
// set_time_limit(1800);
|
||||
// $purchaseOrderDocuments = \App\Models\Document::where('document_type', DocumentType::ECOMMERCE_PURCHASE_ORDER)->get();
|
||||
//
|
||||
// foreach($purchaseOrderDocuments as $document){
|
||||
// $booking = $document->owner;
|
||||
// $booking->status = ApprovalStatus::APPROVED;
|
||||
// $booking->save();
|
||||
//
|
||||
// $booking->documents()->whereIn('document_type', [DocumentType::INVOICE, DocumentType::PURCHASE_ORDER, DocumentType::DELIVER_ORDER, DocumentType::SUPPLIER_DELIVER_ORDER])->delete();
|
||||
//
|
||||
// (App()->make(createPurchaseOrderFor1688OrderProcessor::class))->execute($document->owner);
|
||||
// }
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user