mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-27 00:13:59 +00:00
Merge branch 'dillon/39-crm-changes' into 'master'
Fix error from production logs + code sync meant See merge request CIEFWorldwideSdnBhd/exchange-2.0!145
This commit is contained in:
@@ -16,27 +16,17 @@ class CreatePerfexCRMInvoice implements ShouldQueue
|
||||
/** @var $transaction*/
|
||||
private $transaction;
|
||||
|
||||
/** @var $purchaseOrder*/
|
||||
private $purchaseOrder;
|
||||
|
||||
/** @var $supplier*/
|
||||
private $supplier;
|
||||
|
||||
/**
|
||||
* CreatePerfexCRMInvoice constructor.
|
||||
* @param $transaction
|
||||
* @param $purchaseOrder
|
||||
* @param $supplier
|
||||
*/
|
||||
public function __construct($transaction, $purchaseOrder, $supplier)
|
||||
public function __construct($transaction)
|
||||
{
|
||||
$this->transaction = $transaction;
|
||||
$this->purchaseOrder = $purchaseOrder;
|
||||
$this->supplier = $supplier;
|
||||
}
|
||||
|
||||
public function handle()
|
||||
{
|
||||
(App()->make(CreatePerfexCRMInvoiceProcessor::class))->execute($this->transaction, $this->purchaseOrder, $this->supplier);
|
||||
(App()->make(CreatePerfexCRMInvoiceProcessor::class))->execute($this->transaction);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ use App\Classes\Modules\PerfexCRM\DataTransferObjects\UpdatePerfexCRMInvoiceObje
|
||||
use App\Classes\Modules\PerfexCRM\DataTransferObjects\FetchPerfexCRMInvoiceObject;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use PhpOffice\PhpSpreadsheet\Calculation\Logical\Boolean;
|
||||
use App\Classes\ValueObjects\Constants\TransactionType;
|
||||
|
||||
class UpdatePerfexCRM implements ShouldQueue
|
||||
{
|
||||
@@ -44,7 +45,7 @@ class UpdatePerfexCRM implements ShouldQueue
|
||||
public function handle()
|
||||
{
|
||||
//To use invoice as a reference to decide whether more tasks should be created
|
||||
$this->updatePerfexCRMObject->setInvoiceId($this->getInvoiceId());
|
||||
$this->updatePerfexCRMObject->setInvoiceId($this->getInvoiceIdOrCreateInvoice());
|
||||
|
||||
$result = (App()->make(UpdatePerfexCRMProcessor::class))->execute($this->updatePerfexCRMObject);
|
||||
if($this->transaction != null && $this->shouldCreateInvoice){
|
||||
@@ -59,12 +60,11 @@ class UpdatePerfexCRM implements ShouldQueue
|
||||
}
|
||||
}
|
||||
|
||||
private function getInvoiceId(){
|
||||
private function getInvoiceIdOrCreateInvoice(){
|
||||
if($this->transaction != null){
|
||||
$fetchPerfexCRMInvoiceObject = new FetchPerfexCRMInvoiceObject(
|
||||
$this->updatePerfexCRMObject->getContactEmail(),
|
||||
$this->transaction,
|
||||
true
|
||||
$this->transaction
|
||||
);
|
||||
$invoiceId = (App()->make(FetchPerfexCRMInvoiceProcessor::class))->execute($fetchPerfexCRMInvoiceObject);
|
||||
return $invoiceId;
|
||||
|
||||
@@ -60,7 +60,7 @@ class UpdatePerfexCRMInvoice implements ShouldQueue
|
||||
Log::error(json_encode('UpdatePerfexCRMInvoice debug $number: '.$number));
|
||||
|
||||
if(is_null($invoice)){
|
||||
$result = (App()->make(CreatePerfexCRMInvoiceProcessor::class))->execute($transaction, null, null, $this->updatePerfexCRMInvoiceObject->getIsPaid());
|
||||
$result = (App()->make(CreatePerfexCRMInvoiceProcessor::class))->execute($transaction);
|
||||
if ($result) {
|
||||
$invoiceId = $result->payload['id'];
|
||||
} else {
|
||||
|
||||
@@ -13,15 +13,11 @@ class FetchPerfexCRMInvoiceObject implements DataTransferObject
|
||||
/** @var Transaction */
|
||||
private $transaction;
|
||||
|
||||
/** @var bool */
|
||||
private $isPaid;
|
||||
|
||||
|
||||
public function __construct(string $email, Transaction $transaction, bool $isPaid)
|
||||
public function __construct(string $email, Transaction $transaction)
|
||||
{
|
||||
$this->email = $email;
|
||||
$this->transaction = $transaction;
|
||||
$this->isPaid = $isPaid;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,12 +35,4 @@ class FetchPerfexCRMInvoiceObject implements DataTransferObject
|
||||
{
|
||||
return $this->transaction;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function getIsPaid(): bool
|
||||
{
|
||||
return $this->isPaid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,23 +59,16 @@ class CreatePerfexCRMInvoiceProcessor
|
||||
|
||||
/**
|
||||
* @param $transaction
|
||||
* @param $purchaseOrder
|
||||
* @param $supplier
|
||||
* @return null|object
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
*/
|
||||
public function execute($transaction, $purchaseOrder, $supplier) {
|
||||
public function execute($transaction) {
|
||||
$booking = $transaction->booking;
|
||||
|
||||
if(is_null($supplier)){
|
||||
$supplier = $this->fetchesCompany->execute(['id' => $transaction->receiver]);
|
||||
}
|
||||
if(is_null($purchaseOrder)){
|
||||
$purchaseOrder = $booking->transactions()
|
||||
$supplier = $this->fetchesCompany->execute(['id' => $transaction->receiver]);
|
||||
$purchaseOrder = $booking->transactions()
|
||||
->where('type', TransactionType::PURCHASE_ORDER)
|
||||
->complete()
|
||||
->first();
|
||||
}
|
||||
|
||||
$clientId = "";
|
||||
$number = $transaction->bill_no;
|
||||
@@ -120,7 +113,6 @@ class CreatePerfexCRMInvoiceProcessor
|
||||
$bookingMarking = $transaction->owner->marking;
|
||||
$serviceTypeName = $transaction->owner->company->services()->where('id', $transaction->owner->service_id)->first()->name;
|
||||
$projectName = 'Exchange | '.$serviceTypeName.' | '.$bookingMarking;
|
||||
Log::error('CreatePerfexCRMInvoiceProcessor debug:'.json_encode($transaction));
|
||||
Log::error('$projectName: '.$projectName);
|
||||
return $email;
|
||||
}
|
||||
@@ -229,26 +221,6 @@ class CreatePerfexCRMInvoiceProcessor
|
||||
);
|
||||
|
||||
$result = $this->createsPerfexCRMInvoice->execute($invoicePerfexCRMObject);
|
||||
|
||||
//cief todo: When invoices need to be regenerated, need to ensure payment do not get double created
|
||||
|
||||
// if(!is_null($result))
|
||||
// {
|
||||
// if($result->payload['id']){
|
||||
// $invoicePaymentPerfexCRMObject = new InvoicePaymentPerfexCRMObject(
|
||||
// $result->payload['id'],
|
||||
// $total,
|
||||
// $date,
|
||||
// 1,
|
||||
// "",
|
||||
// ""
|
||||
// );
|
||||
// $this->createsPerfexCRMInvoicePayment->execute($invoicePaymentPerfexCRMObject);
|
||||
// }
|
||||
// }
|
||||
//else: logs will record the following:
|
||||
//"status":false,"error":{"number":"The Invoice number is already in use"},"message":"<p>The Invoice number is already in use<\/p>"}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,20 +25,7 @@ class CreatePerfexCRMTaskProcessor
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
*/
|
||||
public function execute(CreateTaskPerfexCRMObject $createTaskPerfexCRMObject) {
|
||||
$this->createsPerfexCRMTask->execute(
|
||||
$createTaskPerfexCRMObject->getName(),
|
||||
$createTaskPerfexCRMObject->getDescription(),
|
||||
$createTaskPerfexCRMObject->getLeadId(),
|
||||
$createTaskPerfexCRMObject->getMilestoneId(),
|
||||
$createTaskPerfexCRMObject->getProjectId(),
|
||||
$createTaskPerfexCRMObject->getReference(),
|
||||
$createTaskPerfexCRMObject->getOnTaskCompletion(),
|
||||
$createTaskPerfexCRMObject->getDepartment(),
|
||||
$createTaskPerfexCRMObject->getStatus(),
|
||||
$createTaskPerfexCRMObject->getPriority(),
|
||||
$createTaskPerfexCRMObject->getDuedate(),
|
||||
$createTaskPerfexCRMObject->getInvoiceId(),
|
||||
);
|
||||
$this->createsPerfexCRMTask->execute($createTaskPerfexCRMObject);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,13 +56,12 @@ class FetchPerfexCRMInvoiceProcessor
|
||||
|
||||
$number = 'EXC-'.$number;
|
||||
$invoice = $this->fetchesPerfexCRMInvoice->execute($customer->userid,"INV-", $number);
|
||||
Log::error(json_encode('FetchPerfexCRMInvoiceProcessor debug $number: '.$number));
|
||||
if(is_null($invoice)){
|
||||
$result = $this->createPerfexCRMInvoiceProcessor->execute($transaction, null, null, $fetchPerfexCRMInvoiceObject->getIsPaid());
|
||||
$result = $this->createPerfexCRMInvoiceProcessor->execute($transaction);
|
||||
if ($result) {
|
||||
$invoiceId = $result->payload['id'];
|
||||
} else {
|
||||
$log['message'] = 'FetchPerfexCRMInvoiceProcessor failed';
|
||||
$log['message'] = 'FetchPerfexCRMInvoiceProcessor failed for transaction > bill_no: '.$number;
|
||||
Helper::debugLogger($log);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,12 +162,12 @@ class TransactionToPerfexCRMProcessorV2
|
||||
$tasks = array_merge($tasks, $this->payment1688Tasks());
|
||||
}
|
||||
|
||||
if ($model->owner->service_id === 1 || $model->owner->service_id === 3) {
|
||||
$purchaseOrder = $model->booking->transactions()->where('type', TransactionType::PURCHASE_ORDER)->complete()->first();
|
||||
if(is_null($purchaseOrder)){
|
||||
$tasks = array_merge($tasks, $this->purchaseOrderTasks());
|
||||
}
|
||||
}
|
||||
// if ($model->owner->service_id === 1 || $model->owner->service_id === 3) {
|
||||
// $purchaseOrder = $model->booking->transactions()->where('type', TransactionType::PURCHASE_ORDER)->complete()->first();
|
||||
// if(is_null($purchaseOrder)){
|
||||
// $tasks = array_merge($tasks, $this->purchaseOrderTasks());
|
||||
// }
|
||||
// }
|
||||
|
||||
return $tasks;
|
||||
}
|
||||
|
||||
@@ -15,8 +15,8 @@ use App\Classes\Modules\PerfexCRM\Services\UpdatesPerfexCRMTask;
|
||||
use App\Classes\Modules\PerfexCRM\Services\UpdatesPerfexCRMCustomer;
|
||||
use App\Classes\Modules\PerfexCRM\Services\UpdatesPerfexCRMProject;
|
||||
use App\Classes\Modules\PerfexCRM\DataTransferObjects\CustomerContactObject;
|
||||
use App\Classes\Exceptions\MalformedRequestException;
|
||||
use App\Classes\Modules\PerfexCRM\DataTransferObjects\UpdatePerfexCRMObject;
|
||||
use App\Classes\Modules\PerfexCRM\DataTransferObjects\CreateTaskPerfexCRMObject;
|
||||
use App\Classes\ValueObjects\Constants\PerfexCRMTaskStatus;
|
||||
use App\Classes\ValueObjects\Constants\PerfexCRMProjectStatus;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
@@ -203,10 +203,19 @@ class UpdatePerfexCRMProcessor
|
||||
}
|
||||
|
||||
// Get existing or create task
|
||||
$taskName = $tasks[$count]['name'];;
|
||||
if($updatePerfexCRMObject->getInvoiceId() != 0){
|
||||
$taskName = $tasks[$count]['name'];
|
||||
$taskReference = $tasks[$count]['reference'];
|
||||
$taskOnTaskCompletion = $tasks[$count]['on_task_completion'];
|
||||
$taskIsAllowMultiple = $tasks[$count]['is_allow_multiple'];
|
||||
$taskIsOnTaskCompletionUpdate = $tasks[$count]['is_on_task_completion_update'];
|
||||
if($updatePerfexCRMObject->getInvoiceId() != 0 && $taskIsAllowMultiple){
|
||||
$taskName = $taskName." (".$updatePerfexCRMObject->getInvoiceId().")";
|
||||
$taskReference = $taskReference."_".$updatePerfexCRMObject->getInvoiceId();
|
||||
if($taskOnTaskCompletion && $taskIsOnTaskCompletionUpdate){
|
||||
$taskOnTaskCompletion = $taskOnTaskCompletion."_".$updatePerfexCRMObject->getInvoiceId();
|
||||
}
|
||||
}
|
||||
|
||||
$result = $this->fetchesPerfexCRMTask->execute($taskName, $milestoneId, 'project', $projectId, $updatePerfexCRMObject->getInvoiceId());
|
||||
// Log::info("UpdatePerfexCRMProcessor task: ".json_encode($taskStatus)." , ".json_encode($result));
|
||||
|
||||
@@ -219,13 +228,23 @@ class UpdatePerfexCRMProcessor
|
||||
}
|
||||
}
|
||||
else{
|
||||
$result = $this->createsPerfexCRMTask->execute($taskName, $tasks[$count]['description'], '', $milestoneId, $projectId, $tasks[$count]['reference'], $tasks[$count]['on_task_completion'], $tasks[$count]['department'], $taskStatus, $tasks[$count]['priority'], $tasks[$count]['duedate'], $updatePerfexCRMObject->getInvoiceId());
|
||||
$createTaskPerfexCRMObject = new CreateTaskPerfexCRMObject(
|
||||
"",
|
||||
$taskName,
|
||||
$tasks[$count]['description'],
|
||||
"",
|
||||
$projectId,
|
||||
$milestoneId,
|
||||
$taskReference,
|
||||
$taskOnTaskCompletion,
|
||||
$taskStatus,
|
||||
$tasks[$count]['department'],
|
||||
$tasks[$count]['priority'],
|
||||
$tasks[$count]['duedate'],
|
||||
$updatePerfexCRMObject->getInvoiceId()
|
||||
);
|
||||
$result = $this->createsPerfexCRMTask->execute($createTaskPerfexCRMObject);
|
||||
}
|
||||
|
||||
//cief todo: to evaluate if this is still needed
|
||||
// if(is_null($result)){
|
||||
// break; //Breaking the rest of the tasks in array assuming that they are all created as a batch previously
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,70 +6,46 @@ use Illuminate\Support\Facades\Http;
|
||||
use App\Classes\Exceptions\MalformedRequestException;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use App\Classes\ValueObjects\Constants\PerfexCRMCustomFields;
|
||||
use App\Classes\Modules\PerfexCRM\DataTransferObjects\CreateTaskPerfexCRMObject;
|
||||
|
||||
class CreatesPerfexCRMTask
|
||||
{
|
||||
/**
|
||||
* @param string $taskName
|
||||
* @param string $taskDescription
|
||||
* @param string $leadId
|
||||
* @param string $milestoneId
|
||||
* @param string $projectId
|
||||
* @param string $reference
|
||||
* @param string $on_task_completion
|
||||
* @param string $department
|
||||
* @param string $status
|
||||
* @param string $priority
|
||||
* @param string $duedate
|
||||
* @param int $invoiceId
|
||||
* @param CreateTaskPerfexCRMObject $createTaskPerfexCRMObject
|
||||
* @return null|object
|
||||
* @throws MalformedRequestException
|
||||
*/
|
||||
public function execute(string $taskName, string $taskDescription, string $leadId, string $milestoneId, string $projectId, string $reference, string $on_task_completion, string $department, string $status, string $priority, string $duedate, int $invoiceId) {
|
||||
public function execute(CreateTaskPerfexCRMObject $createTaskPerfexCRMObject) {
|
||||
try{
|
||||
$custom_fields = [];
|
||||
if($department != ""){
|
||||
if($createTaskPerfexCRMObject->getDepartment() != ""){
|
||||
$custom_fields = [
|
||||
"tasks" => [
|
||||
PerfexCRMCustomFields::TASKS_DEPARTMENT => $department
|
||||
PerfexCRMCustomFields::TASKS_DEPARTMENT => $createTaskPerfexCRMObject->getDepartment()
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
$data = [
|
||||
'name' => $taskName,
|
||||
'description' => $taskDescription,
|
||||
'milestone' => $milestoneId,
|
||||
'name' => $createTaskPerfexCRMObject->getName(),
|
||||
'description' => $createTaskPerfexCRMObject->getDescription(),
|
||||
'milestone' => $createTaskPerfexCRMObject->getMilestoneId(),
|
||||
'startdate' => date('Y-m-d'),
|
||||
'rel_type' => 'project',
|
||||
'rel_id' => $projectId,
|
||||
'status' => $status,
|
||||
'rel_id' => $createTaskPerfexCRMObject->getProjectId(),
|
||||
'status' => $createTaskPerfexCRMObject->getStatus(),
|
||||
'is_system_created' => 1,
|
||||
'reference' => $reference,
|
||||
'on_task_completion' => $on_task_completion,
|
||||
'reference' => $createTaskPerfexCRMObject->getReference(),
|
||||
'on_task_completion' => $createTaskPerfexCRMObject->getOnTaskCompletion(),
|
||||
'custom_fields' => $custom_fields,
|
||||
'priority' => $priority,
|
||||
'duedate' => date('Y-m-d', strtotime('+' . $duedate . ' days')),
|
||||
'invoice_id' => $invoiceId,
|
||||
'priority' => $createTaskPerfexCRMObject->getPriority(),
|
||||
'duedate' => date('Y-m-d', strtotime('+' . $createTaskPerfexCRMObject->getDuedate() . ' days')),
|
||||
'invoice_id' => $createTaskPerfexCRMObject->getInvoiceId(),
|
||||
];
|
||||
|
||||
if($leadId != '') {
|
||||
$data = [
|
||||
'name' => $taskName,
|
||||
'description' => $taskDescription,
|
||||
'milestone' => $milestoneId,
|
||||
'startdate' => date('Y-m-d'),
|
||||
'rel_type' => 'lead',
|
||||
'rel_id' => $leadId,
|
||||
'status' => $status,
|
||||
'is_system_created' => 1,
|
||||
'reference' => $reference,
|
||||
'on_task_completion' => $on_task_completion,
|
||||
'custom_fields' => $custom_fields,
|
||||
'priority' => $priority,
|
||||
'duedate' => date('Y-m-d', strtotime('+' . $duedate . ' days')),
|
||||
'invoice_id' => 0
|
||||
];
|
||||
if($createTaskPerfexCRMObject->getLeadId() != '') {
|
||||
$data['rel_type'] = 'lead';
|
||||
$data['rel_id'] = $createTaskPerfexCRMObject->getLeadId();
|
||||
}
|
||||
|
||||
$response = Http::asForm()->withHeaders([
|
||||
|
||||
@@ -64,7 +64,6 @@ class UpdatesPerfexCRMInvoice
|
||||
return null;
|
||||
}
|
||||
}catch(\Exception $exception){
|
||||
dd(json_encode($exception));
|
||||
throw new MalformedRequestException('Unable to get correct response from Perfex CRM server: ' . $exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,9 @@ class PerfexCRMTasks
|
||||
'department' => '',
|
||||
'status' => PerfexCRMTaskStatus::COMPLETED,
|
||||
'priority' => PerfexCRMTaskPriority::DEFAULT,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
|
||||
public const TASK_1_DAY_TRANSFER_1 = [
|
||||
@@ -27,7 +29,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => PerfexCRMTaskStatus::IN_PROGRESS,
|
||||
'priority' => PerfexCRMTaskPriority::HIGH,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_1_DAY_TRANSFER_2 = [
|
||||
'name' => 'Approve Payment',
|
||||
@@ -47,7 +51,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => PerfexCRMTaskStatus::IN_PROGRESS,
|
||||
'priority' => PerfexCRMTaskPriority::HIGH,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => true,
|
||||
'is_on_task_completion_update' => true
|
||||
];
|
||||
public const TASK_1_DAY_TRANSFER_3 = [
|
||||
'name' => 'Issue Exchange Autocount Invoince',
|
||||
@@ -65,7 +71,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::MEDIUM,
|
||||
'duedate' => 1
|
||||
'duedate' => 1,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_1_DAY_TRANSFER_3_1 = [
|
||||
'name' => 'Issue Exchange Autocount OR',
|
||||
@@ -76,7 +84,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::DEFAULT,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_1_DAY_TRANSFER_4 = [
|
||||
'name' => 'Knockoff Invoice',
|
||||
@@ -94,7 +104,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::MEDIUM,
|
||||
'duedate' => 1
|
||||
'duedate' => 1,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_1_DAY_TRANSFER_5 = [
|
||||
'name' => 'Order Placed in White Form',
|
||||
@@ -114,7 +126,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Operations',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::HIGH,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => true,
|
||||
'is_on_task_completion_update' => true
|
||||
];
|
||||
public const TASK_1_DAY_TRANSFER_6 = [
|
||||
'name' => 'Upload China Bank Slip',
|
||||
@@ -132,7 +146,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Operations',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::MEDIUM,
|
||||
'duedate' => 1
|
||||
'duedate' => 1,
|
||||
'is_allow_multiple' => true,
|
||||
'is_on_task_completion_update' => true
|
||||
];
|
||||
|
||||
public const TASK_3_DAY_TRANSFER_1 = [
|
||||
@@ -151,7 +167,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => PerfexCRMTaskStatus::IN_PROGRESS,
|
||||
'priority' => PerfexCRMTaskPriority::HIGH,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_3_DAY_TRANSFER_2 = [
|
||||
'name' => 'Approve Payment',
|
||||
@@ -164,7 +182,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => PerfexCRMTaskStatus::IN_PROGRESS,
|
||||
'priority' => PerfexCRMTaskPriority::HIGH,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => true,
|
||||
'is_on_task_completion_update' => true
|
||||
];
|
||||
public const TASK_3_DAY_TRANSFER_3 = [
|
||||
'name' => 'Issue Exchange Autocount Invoince',
|
||||
@@ -182,7 +202,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::MEDIUM,
|
||||
'duedate' => 1
|
||||
'duedate' => 1,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_3_DAY_TRANSFER_3_1 = [
|
||||
'name' => 'Issue Exchange Autocount OR',
|
||||
@@ -193,7 +215,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::DEFAULT,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_3_DAY_TRANSFER_4 = [
|
||||
'name' => 'Knockoff Invoice',
|
||||
@@ -211,7 +235,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::MEDIUM,
|
||||
'duedate' => 1
|
||||
'duedate' => 1,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_3_DAY_TRANSFER_5 = [
|
||||
'name' => 'Order Placed in White Form',
|
||||
@@ -231,7 +257,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Operations',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::HIGH,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => true,
|
||||
'is_on_task_completion_update' => true
|
||||
];
|
||||
public const TASK_3_DAY_TRANSFER_6 = [
|
||||
'name' => 'Upload China Bank Slip',
|
||||
@@ -249,7 +277,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Operations',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::MEDIUM,
|
||||
'duedate' => 1
|
||||
'duedate' => 1,
|
||||
'is_allow_multiple' => true,
|
||||
'is_on_task_completion_update' => true
|
||||
];
|
||||
|
||||
|
||||
@@ -270,7 +300,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => PerfexCRMTaskStatus::IN_PROGRESS,
|
||||
'priority' => PerfexCRMTaskPriority::HIGH,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_1688_PAYMENT_2 = [
|
||||
'name' => 'Approve Payment',
|
||||
@@ -290,7 +322,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => PerfexCRMTaskStatus::IN_PROGRESS,
|
||||
'priority' => PerfexCRMTaskPriority::HIGH,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_1688_PAYMENT_3 = [
|
||||
'name' => 'Issue Exchange Autocount Invoice',
|
||||
@@ -308,7 +342,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::MEDIUM,
|
||||
'duedate' => 1
|
||||
'duedate' => 1,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_1688_PAYMENT_3_1 = [
|
||||
'name' => 'Issue Exchange Autocount OR',
|
||||
@@ -320,7 +356,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::DEFAULT,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_1688_PAYMENT_4 = [
|
||||
'name' => 'Knockoff Invoice',
|
||||
@@ -338,7 +376,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::MEDIUM,
|
||||
'duedate' => 1
|
||||
'duedate' => 1,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_1688_PAYMENT_5 = [
|
||||
'name' => 'Order Placed in White Form',
|
||||
@@ -357,7 +397,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Operations',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::HIGH,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_1688_PAYMENT_6 = [
|
||||
'name' => 'Send White Form to Operation Department',
|
||||
@@ -375,7 +417,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Operations',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::DEFAULT,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_1688_PAYMENT_7 = [
|
||||
'name' => 'Authorize Customer\'s 1688 Account',
|
||||
@@ -395,7 +439,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Operations',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::HIGH,
|
||||
'duedate' => 1
|
||||
'duedate' => 1,
|
||||
'is_allow_multiple' => true,
|
||||
'is_on_task_completion_update' => true
|
||||
];
|
||||
public const TASK_1688_PAYMENT_8 = [
|
||||
'name' => 'Make Payment for Customer 1688 Order',
|
||||
@@ -410,7 +456,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Operations',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::HIGH,
|
||||
'duedate' => 1
|
||||
'duedate' => 1,
|
||||
'is_allow_multiple' => true,
|
||||
'is_on_task_completion_update' => true
|
||||
];
|
||||
public const TASK_1688_PAYMENT_9 = [
|
||||
'name' => 'Upload China Bank Slip',
|
||||
@@ -422,7 +470,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Operations',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::MEDIUM,
|
||||
'duedate' => 1
|
||||
'duedate' => 1,
|
||||
'is_allow_multiple' => true,
|
||||
'is_on_task_completion_update' => true
|
||||
];
|
||||
public const TASK_1688_PAYMENT_10 = [
|
||||
'name' => 'Upload 1688 Purchase Order PDF',
|
||||
@@ -434,7 +484,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Operations',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::MEDIUM,
|
||||
'duedate' => 1
|
||||
'duedate' => 1,
|
||||
'is_allow_multiple' => true,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_1688_PAYMENT_11 = [
|
||||
'name' => 'Fill Up Purchase Order',
|
||||
@@ -446,7 +498,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Operations',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::LOW,
|
||||
'duedate' => 7
|
||||
'duedate' => 7,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_1688_PAYMENT_12 = [
|
||||
'name' => 'Approve Purchase Order',
|
||||
@@ -458,7 +512,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Operations',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::LOW,
|
||||
'duedate' => 1
|
||||
'duedate' => 1,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
public const TASK_1688_PAYMENT_13 = [
|
||||
'name' => 'Complete Order bookkeeping',
|
||||
@@ -476,7 +532,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Operations',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::DEFAULT,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
|
||||
|
||||
@@ -497,7 +555,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Operations',
|
||||
'status' => PerfexCRMTaskStatus::IN_PROGRESS,
|
||||
'priority' => PerfexCRMTaskPriority::LOW,
|
||||
'duedate' => 1
|
||||
'duedate' => 1,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
|
||||
public const TASK_PURCHASE_ORDER_2 = [
|
||||
@@ -510,7 +570,9 @@ class PerfexCRMTasks
|
||||
'department' => 'Accounts',
|
||||
'status' => '',
|
||||
'priority' => PerfexCRMTaskPriority::DEFAULT,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
|
||||
|
||||
@@ -530,6 +592,8 @@ class PerfexCRMTasks
|
||||
'department' => 'Operations',
|
||||
'status' => PerfexCRMTaskStatus::IN_PROGRESS,
|
||||
'priority' => PerfexCRMTaskPriority::DEFAULT,
|
||||
'duedate' => 0
|
||||
'duedate' => 0,
|
||||
'is_allow_multiple' => false,
|
||||
'is_on_task_completion_update' => false
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user