diff --git a/app/Classes/Jobs/CreatePerfexCRMSingleTask.php b/app/Classes/Jobs/CreatePerfexCRMSingleTask.php
new file mode 100644
index 00000000..586efe0f
--- /dev/null
+++ b/app/Classes/Jobs/CreatePerfexCRMSingleTask.php
@@ -0,0 +1,42 @@
+createTaskPerfexCRMObject = $createTaskPerfexCRMObject;
+ }
+
+ public function handle()
+ {
+ $lead = (App()->make(FetchesPerfexCRMLead::class))->execute($this->createTaskPerfexCRMObject->getEmail());
+ if(!is_null($lead))
+ {
+ $this->createTaskPerfexCRMObject->setLeadId($lead->id);
+ (App()->make(CreatePerfexCRMTaskProcessor::class))->execute($this->createTaskPerfexCRMObject);
+ }
+ }
+}
diff --git a/app/Classes/Modules/PerfexCRM/DataTransferObjects/CreateTaskPerfexCRMObject.php b/app/Classes/Modules/PerfexCRM/DataTransferObjects/CreateTaskPerfexCRMObject.php
new file mode 100644
index 00000000..70bae013
--- /dev/null
+++ b/app/Classes/Modules/PerfexCRM/DataTransferObjects/CreateTaskPerfexCRMObject.php
@@ -0,0 +1,127 @@
+email = $email;
+ $this->name = $name;
+ $this->description = $description;
+ $this->leadId = $leadId;
+ $this->projectId = $projectId;
+ $this->milestoneId = $milestoneId;
+ $this->reference = $reference;
+ $this->onTaskCompletion = $onTaskCompletion;
+ $this->status = $status;
+ }
+
+ /**
+ * @return string
+ */
+ public function getEmail(): string
+ {
+ return $this->email;
+ }
+
+ /**
+ * @return string
+ */
+ public function getName(): string
+ {
+ return $this->name;
+ }
+
+ /**
+ * @return string
+ */
+ public function getDescription(): string
+ {
+ return $this->description;
+ }
+
+ /**
+ * @return string
+ */
+ public function getLeadId(): string
+ {
+ return $this->leadId;
+ }
+
+ public function setLeadId(string $leadId)
+ {
+ $this->leadId = $leadId;
+ }
+
+ /**
+ * @return string
+ */
+ public function getProjectId(): string
+ {
+ return $this->projectId;
+ }
+
+ /**
+ * @return string
+ */
+ public function getMilestoneId(): string
+ {
+ return $this->milestoneId;
+ }
+
+ /**
+ * @return string
+ */
+ public function getReference(): string
+ {
+ return $this->reference;
+ }
+
+ /**
+ * @return string
+ */
+ public function getOnTaskCompletion(): string
+ {
+ return $this->onTaskCompletion;
+ }
+
+ /**
+ * @return string
+ */
+ public function getStatus(): string
+ {
+ return $this->status;
+ }
+
+}
diff --git a/app/Classes/Modules/PerfexCRM/Processors/CreatePerfexCRMTaskProcessor.php b/app/Classes/Modules/PerfexCRM/Processors/CreatePerfexCRMTaskProcessor.php
new file mode 100644
index 00000000..965f6f34
--- /dev/null
+++ b/app/Classes/Modules/PerfexCRM/Processors/CreatePerfexCRMTaskProcessor.php
@@ -0,0 +1,41 @@
+createsPerfexCRMTask = $createsPerfexCRMTask;
+ }
+
+ /**
+ * @param CreateTaskPerfexCRMObject $createTaskPerfexCRMObject
+ * @return true
+ * @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->getStatus(),
+ );
+ return true;
+ }
+
+}
diff --git a/app/Classes/Modules/PerfexCRM/Processors/InitializePerfexCRMProcessor.php b/app/Classes/Modules/PerfexCRM/Processors/InitializePerfexCRMProcessor.php
index 0aac3bf9..9fa2bee4 100644
--- a/app/Classes/Modules/PerfexCRM/Processors/InitializePerfexCRMProcessor.php
+++ b/app/Classes/Modules/PerfexCRM/Processors/InitializePerfexCRMProcessor.php
@@ -178,14 +178,14 @@ class InitializePerfexCRMProcessor
}
$taskStatus = PerfexCRMStatus::NOT_STARTED;
- if($tasks[$count]['name'] == PerfexCRMTasks::TASK_1['name']){
- $taskStatus = PerfexCRMStatus::COMPLETED;
+ if($tasks[$count]['status'] != ''){
+ $taskStatus = $tasks[$count]['status'];
}
// Get existing or create task
- $result = $this->createsPerfexCRMTask->execute($tasks[$count]['name'], $milestoneId, $projectId, $tasks[$count]['reference'], $taskStatus);
+ $result = $this->createsPerfexCRMTask->execute($tasks[$count]['name'], $tasks[$count]['description'], '', $milestoneId, $projectId, $tasks[$count]['reference'], $tasks[$count]['on_task_completion'], $taskStatus);
}
- }
+ }
return true;
}
diff --git a/app/Classes/Modules/PerfexCRM/Processors/NewLeadTaskToPerfexCRMProcessor.php b/app/Classes/Modules/PerfexCRM/Processors/NewLeadTaskToPerfexCRMProcessor.php
new file mode 100644
index 00000000..9602696d
--- /dev/null
+++ b/app/Classes/Modules/PerfexCRM/Processors/NewLeadTaskToPerfexCRMProcessor.php
@@ -0,0 +1,34 @@
+owner instanceof \App\Models\Wallet){
- // //For owner_type > App\Models\Wallet
- // $companyReference = $model->owner->owner->reference;
- // $companyName = $model->owner->company->name;
- // $company = $this->fetchesCompany->execute(['id' => $model->owner->owner->id]);
- // $employee = $company->employees()->first();
- // $contactEmail = $employee->email;
- // $contactName = $employee->name;
- // $proceed = true;
- // }
-
if($model->owner instanceof \App\Models\Booking && $status == ApprovalStatus::APPROVED){
$companyReference = $model->owner->company->reference;
$companyName = $model->owner->company->name;
@@ -70,7 +54,50 @@ class TransactionToPerfexCRMProcessor
$serviceTypeName = $model->owner->company->services()->where('id', $model->owner->service_id)->first()->name;
$projectName = 'Exchange | '.$serviceTypeName.' | '.$bookingMarking;
+ $tasks = [
+ PerfexCRMTasks::TASK_1
+ ];
+ if($model->owner->service_id == 1){
+ $tasks = [
+ PerfexCRMTasks::TASK_1,
+ PerfexCRMTasks::TASK_1_DAY_TRANSFER_1,
+ PerfexCRMTasks::TASK_1_DAY_TRANSFER_2,
+ PerfexCRMTasks::TASK_1_DAY_TRANSFER_3,
+ PerfexCRMTasks::TASK_1_DAY_TRANSFER_4,
+ PerfexCRMTasks::TASK_1_DAY_TRANSFER_5,
+ PerfexCRMTasks::TASK_1_DAY_TRANSFER_6,
+ ];
+ }
+ else if($model->owner->service_id == 2){
+ $tasks = [
+ PerfexCRMTasks::TASK_1,
+ PerfexCRMTasks::TASK_3_DAY_TRANSFER_1,
+ PerfexCRMTasks::TASK_3_DAY_TRANSFER_2,
+ PerfexCRMTasks::TASK_3_DAY_TRANSFER_3,
+ PerfexCRMTasks::TASK_3_DAY_TRANSFER_4,
+ PerfexCRMTasks::TASK_3_DAY_TRANSFER_5,
+ PerfexCRMTasks::TASK_3_DAY_TRANSFER_6,
+ ];
+ }
+ else if($model->owner->service_id == 4){
+ $tasks = [
+ PerfexCRMTasks::TASK_1,
+ PerfexCRMTasks::TASK_1688_PAYMENT_1,
+ PerfexCRMTasks::TASK_1688_PAYMENT_2,
+ PerfexCRMTasks::TASK_1688_PAYMENT_3,
+ PerfexCRMTasks::TASK_1688_PAYMENT_4,
+ PerfexCRMTasks::TASK_1688_PAYMENT_5,
+ PerfexCRMTasks::TASK_1688_PAYMENT_6,
+ PerfexCRMTasks::TASK_1688_PAYMENT_7,
+ PerfexCRMTasks::TASK_1688_PAYMENT_8,
+ PerfexCRMTasks::TASK_1688_PAYMENT_9,
+ PerfexCRMTasks::TASK_1688_PAYMENT_10,
+ PerfexCRMTasks::TASK_1688_PAYMENT_11,
+ PerfexCRMTasks::TASK_1688_PAYMENT_12,
+ PerfexCRMTasks::TASK_1688_PAYMENT_13,
+ ];
+ }
$initialPerfexCRMObject = new InitialPerfexCRMObject(
$companyName,
$companyReference,
@@ -79,64 +106,12 @@ class TransactionToPerfexCRMProcessor
$bookingMarking,
$projectName,
[],
- [
- PerfexCRMTasks::TASK_1,
- ]
+ $tasks
);
//$this->initializePerfexCRMProcessor->execute($initialPerfexCRMObject);
InitializePerfexCRM::dispatch($initialPerfexCRMObject);
-
- // $updatePerfexCRMObject = new UpdatePerfexCRMObject(
- // $companyName,
- // $companyReference,
- // $contactEmail,
- // $bookingMarking,
- // $companyReference.'-'.$bookingMarking,
- // PerfexCRMTasks::TASK_1['milestone'],
- // PerfexCRMTasks::TASK_1['name']
- // );
-
- // //Mark task in Perfex CRM as done (5 means completed task)
- // // $this->updatePerfexCRMProcessor->execute($updatePerfexCRMObject);
- // UpdatePerfexCRM::dispatch($updatePerfexCRMObject);
}
-
- /*
- else if($model->owner instanceof \App\Models\Booking && $status == ApprovalStatus::APPROVED){
-
- $updatePerfexCRMObject = new UpdatePerfexCRMObject(
- $companyName,
- $companyReference,
- $contactEmail,
- $bookingMarking,
- $companyReference.'-'.$bookingMarking,
- PerfexCRMTasks::TASK_3['milestone'],
- PerfexCRMTasks::TASK_3['name']
- );
-
- //Mark task in Perfex CRM as done (5 means completed task)
- // $this->updatePerfexCRMProcessor->execute($updatePerfexCRMObject);
- UpdatePerfexCRM::dispatch($updatePerfexCRMObject);
- }
- else if($model->owner instanceof \App\Models\Booking && $status == ApprovalStatus::PENDING_VERIFICATION){
-
- $updatePerfexCRMObject = new UpdatePerfexCRMObject(
- $companyName,
- $companyReference,
- $contactEmail,
- $bookingMarking,
- $companyReference.'-'.$bookingMarking,
- PerfexCRMTasks::TASK_2['milestone'],
- PerfexCRMTasks::TASK_2['name']
- );
-
- //Mark task in Perfex CRM as done (5 means completed task)
- //$this->updatePerfexCRMProcessor->execute($updatePerfexCRMObject);
- UpdatePerfexCRM::dispatch($updatePerfexCRMObject);
- }
- */
return true;
}
-
}
diff --git a/app/Classes/Modules/PerfexCRM/Services/CreatesPerfexCRMTask.php b/app/Classes/Modules/PerfexCRM/Services/CreatesPerfexCRMTask.php
index 7e340c26..1674c999 100644
--- a/app/Classes/Modules/PerfexCRM/Services/CreatesPerfexCRMTask.php
+++ b/app/Classes/Modules/PerfexCRM/Services/CreatesPerfexCRMTask.php
@@ -10,25 +10,46 @@ class CreatesPerfexCRMTask
{
/**
* @param string $taskName
+ * @param string $taskDescription
+ * @param string $leadId
* @param string $milestoneId
* @param string $projectId
+ * @param string $reference, default: ''
+ * @param string $on_task_completion, default: ''
* @param string $status, default: 1
* @return null|object
* @throws MalformedRequestException
*/
- public function execute(string $taskName, string $milestoneId, string $projectId, string $reference = '', string $status = "1") {
+ public function execute(string $taskName, string $taskDescription, string $leadId, string $milestoneId, string $projectId, string $reference = '', string $on_task_completion = '', string $status = "1") {
try{
$data = [
'name' => $taskName,
+ 'description' => $taskDescription,
'milestone' => $milestoneId,
'startdate' => date('Y-m-d'),
'rel_type' => 'project',
'rel_id' => $projectId,
'status' => $status,
'is_system_created' => 1,
- 'reference' => $reference
+ 'reference' => $reference,
+ 'on_task_completion' => $on_task_completion
];
+ 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
+ ];
+ }
+
$response = Http::asForm()->withHeaders([
'authtoken' => config('perfexcrm.api_key')])
->post(config('perfexcrm.base_url').'/api/tasks',$data);
diff --git a/app/Classes/Modules/PerfexCRM/Services/FetchesPerfexCRMLead.php b/app/Classes/Modules/PerfexCRM/Services/FetchesPerfexCRMLead.php
new file mode 100644
index 00000000..df9c754d
--- /dev/null
+++ b/app/Classes/Modules/PerfexCRM/Services/FetchesPerfexCRMLead.php
@@ -0,0 +1,34 @@
+ config('perfexcrm.api_key'),])
+ ->get(config('perfexcrm.base_url').'/api/leads/byemail/'.$email);
+
+ if($response->successful()){
+ $data = $response->json();
+
+ return (object) $data;
+ }else{
+ Log::error($response);
+ return null;
+ }
+ }catch(\Exception $exception){
+ throw new MalformedRequestException('Unable to get correct response from Perfex CRM server: ' . $exception->getMessage());
+ }
+ }
+}
diff --git a/app/Classes/Modules/Transactions/Services/UpdatesTransactionStatus.php b/app/Classes/Modules/Transactions/Services/UpdatesTransactionStatus.php
index db56631c..2843e0c2 100644
--- a/app/Classes/Modules/Transactions/Services/UpdatesTransactionStatus.php
+++ b/app/Classes/Modules/Transactions/Services/UpdatesTransactionStatus.php
@@ -5,19 +5,25 @@ namespace App\Classes\Modules\Transactions\Services;
use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Models\Transaction;
use App\Classes\Modules\PerfexCRM\Processors\TransactionToPerfexCRMProcessor;
+use App\Classes\Modules\PerfexCRM\Processors\NewLeadTaskToPerfexCRMProcessor;
class UpdatesTransactionStatus extends AbstractUpdateRecord
{
/** @var TransactionToPerfexCRMProcessor */
private $transactionToPerfexCRMProcessor;
+ /** @var NewLeadTaskToPerfexCRMProcessor */
+ private $newLeadTaskToPerfexCRMProcessor;
+
/**
* UpdatesTransactionStatus constructor.
* @param TransactionToPerfexCRMProcessor $transactionToPerfexCRMProcessor
+ * @param NewLeadTaskToPerfexCRMProcessor $newLeadTaskToPerfexCRMProcessor
*/
- public function __construct(TransactionToPerfexCRMProcessor $transactionToPerfexCRMProcessor)
+ public function __construct(TransactionToPerfexCRMProcessor $transactionToPerfexCRMProcessor, NewLeadTaskToPerfexCRMProcessor $newLeadTaskToPerfexCRMProcessor)
{
$this->transactionToPerfexCRMProcessor = $transactionToPerfexCRMProcessor;
+ $this->newLeadTaskToPerfexCRMProcessor = $newLeadTaskToPerfexCRMProcessor;
}
/**
@@ -30,6 +36,7 @@ class UpdatesTransactionStatus extends AbstractUpdateRecord
{
if(config('perfexcrm.is_enabled') == 'true'){
$this->transactionToPerfexCRMProcessor->execute($model, $status);
+ // $this->newLeadTaskToPerfexCRMProcessor->execute();
}
$model->status = $status;
return $this->handler($model);
diff --git a/app/Classes/ValueObjects/Constants/PerfexCRMTasks.php b/app/Classes/ValueObjects/Constants/PerfexCRMTasks.php
index b1abecec..b21e379f 100644
--- a/app/Classes/ValueObjects/Constants/PerfexCRMTasks.php
+++ b/app/Classes/ValueObjects/Constants/PerfexCRMTasks.php
@@ -6,52 +6,400 @@ class PerfexCRMTasks
{
public const TASK_1 = [
'name' => 'Customer Paid',
+ 'description' => '',
'milestone' => 'MILESTONE 1 - Customer Paid',
- 'reference' => ''
+ 'reference' => '',
+ 'on_task_completion' => '',
+ 'status' => PerfexCRMStatus::COMPLETED
];
- public const TASK_2 = [
- 'name' => 'TASK B',
- 'milestone' => 'MILESTONE 2 - Order Placed',
- 'reference' => ''
- ];
- public const TASK_3 = [
- 'name' => 'TASK C',
- 'milestone' => 'MILESTONE 3 - Purchase Order Approved',
- 'reference' => ''
- ];
- public const TASK_4 = [
- 'name' => 'TASK D',
- 'milestone' => 'MILESTONE 4',
- 'reference' => ''
- ];
- public const TASK_5 = [
- 'name' => 'TASK E',
- 'milestone' => 'MILESTONE 5',
- 'reference' => ''
- ];
- public const TASK_6 = [
- 'name' => 'TASK F',
+
+ public const TASK_1_DAY_TRANSFER_1 = [
+ 'name' => 'Map Bank Transaction Record',
+ 'description' => '○ Purpose: To map a transaction to bank transaction in the bank statement
+ ○ Initial Status: In Progress
+ ○ Deadline: If payment is created before 4:30 pm, it must be made on the same day. If payment is created after 4:30 pm, it must be made the next day
+ ○ Responsible department: Accounts
+ ○ Next step: Change the status of the Approve payment status to "In Progress" upon successful completion of the operation.
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: None
+ ○ Outcomes: Bank transaction is mapped successfully, allowing the next steps in the process to be initiated.
',
'milestone' => '',
- 'reference' => 'THIS_IS_TASK_NUMBER_6'
+ 'reference' => 'TASK_1_DAY_TRANSFER_1',
+ 'on_task_completion' => 'TASK_1_DAY_TRANSFER_2',
+ 'status' => PerfexCRMStatus::IN_PROGRESS
];
- public const TASK_7 = [
- 'name' => 'TASK G',
+ public const TASK_1_DAY_TRANSFER_2 = [
+ 'name' => 'Approve Payment',
+ 'description' => '○ Purpose: To verify and approve the customer\'s payment on exchange
+ ○ Initial Status: Not Started
+ ○ Deadline:If payment is created before 4:30 pm, it must be made on the same day. If payment is created after 4:30 pm, it must be made the next day
+ ○ Responsible department: Accounts
+ ○ Next step:
+ i. Change the status of the Issue Exchange Autocount Invoice operation to "In Progress"
+ ii. Change the status of the Order Placed in White Form operation to "In Progress" upon successful completion.
+ ○ Additional details: When the payment method is FPX or Wallet this task is performed automatically by the system.
+ ○ Dependencies: Map Transaction operation must be completed before this operation can begin.
+ ○ Outcomes: The payment will be approved in exchange, allowing the next steps in the process to be initiated.
',
'milestone' => '',
- 'reference' => 'THIS_IS_TASK_NUMBER_7'
+ 'reference' => 'TASK_1_DAY_TRANSFER_2',
+ 'on_task_completion' => 'TASK_1_DAY_TRANSFER_3',
+ 'status' => ''
];
- public const TASK_8 = [
- 'name' => 'TASK H',
+ public const TASK_1_DAY_TRANSFER_3 = [
+ 'name' => 'Issue Exchange Autocount Invoince',
+ 'description' => '○ Purpose: To issue an invoice for the customer\'s payment in accounting software.
+ ○ Initial Status: Not Started
+ ○ Deadline: Next day
+ ○ Responsible department: Accounts
+ ○ Next step: Change the status of the Knockoff Invoice operation to "In Progress" upon successful completion.
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Approve Payment operation must be completed before this operation can begin.
+ ○ Outcomes: An invoice will be issued in accounting software for the customer\'s payment.
',
'milestone' => '',
- 'reference' => 'THIS_IS_TASK_NUMBER_8'
+ 'reference' => 'TASK_1_DAY_TRANSFER_3',
+ 'on_task_completion' => 'TASK_1_DAY_TRANSFER_4',
+ 'status' => ''
];
- public const TASK_9 = [
- 'name' => 'TASK I',
+ public const TASK_1_DAY_TRANSFER_4 = [
+ 'name' => 'Knockoff Invoice',
+ 'description' => '○ Purpose: The purpose of this operation is to issue the official receipt and knockoff with invoice for the customer\'s payment.
+ ○ Initial Status: Not Started
+ ○ Deadline: Next day.
+ ○ Responsible Department: Accounts
+ ○ Next Step: None
+ ○ Additional Details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Issue Exchange Autocount Invoice operation must be completed before this operation can begin.
+ ○ Outcomes: The customer\'s payment is applied to the accounting software invoice and invoice is marked as paid.
',
'milestone' => '',
- 'reference' => 'THIS_IS_TASK_NUMBER_9'
+ 'reference' => 'TASK_1_DAY_TRANSFER_4',
+ 'on_task_completion' => 'TASK_1_DAY_TRANSFER_5',
+ 'status' => ''
];
- public const TASK_10 = [
- 'name' => 'TASK J',
+ public const TASK_1_DAY_TRANSFER_5 = [
+ 'name' => 'Order Placed in White Form',
+ 'description' => '○ Purpose: To confirm that the order has been placed with the supplier.
+ ○ Initial Status: Not Started
+ ○ Deadline: Same day
+ ○ Responsible department: Operations
+ ○ Next step: Change the status of Upload China Bank Slip operation to "In Progress" upon successful completion.
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Approve Payment operation must be completed before this operation can begin.
+ ○ Outcomes: The order is placed with a supplier and the customer\'s order is confirmed.
',
'milestone' => '',
- 'reference' => 'THIS_IS_TASK_NUMBER_10'
+ 'reference' => 'TASK_1_DAY_TRANSFER_5',
+ 'on_task_completion' => 'TASK_1_DAY_TRANSFER_6',
+ 'status' => ''
];
+ public const TASK_1_DAY_TRANSFER_6 = [
+ 'name' => 'Upload China Bank Slip',
+ 'description' => '○ Purpose: To confirm that the customer order has been transferred to the customer\'s supplier.
+ ○ Initial Status: Not Started
+ ○ Deadline: Next day
+ ○ Responsible department: Operations
+ ○ Next step: None
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Order Placed in White Form operation must be completed before this operation can begin.
+ ○ Outcomes: The customer can download the payment transfer proof to send to their supplier.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_1_DAY_TRANSFER_6',
+ 'on_task_completion' => '',
+ 'status' => ''
+ ];
+
+ public const TASK_3_DAY_TRANSFER_1 = [
+ 'name' => 'Map Bank Transaction Record',
+ 'description' => '○ Purpose: To map a transaction to bank transaction in the bank statement
+ ○ Initial Status: In Progress
+ ○ Deadline: If payment is created before 4:30 pm, it must be made on the same day. If payment is created after 4:30 pm, it must be made the next day
+ ○ Responsible department: Accounts
+ ○ Next step: Change the status of the Approve payment status to "In Progress" upon successful completion of the operation.
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: None
+ ○ Outcomes: Bank transaction is mapped successfully, allowing the next steps in the process to be initiated.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_3_DAY_TRANSFER_1',
+ 'on_task_completion' => 'TASK_3_DAY_TRANSFER_2',
+ 'status' => PerfexCRMStatus::IN_PROGRESS
+ ];
+ public const TASK_3_DAY_TRANSFER_2 = [
+ 'name' => 'Approve Payment',
+ 'description' => '○ Purpose: To verify and approve the customer\'s payment on exchange
+ ○ Initial Status: Not Started
+ ○ Deadline:If payment is created before 4:30 pm, it must be made on the same day. If payment is created after 4:30 pm, it must be made the next day
+ ○ Responsible department: Accounts
+ ○ Next step:
+ i. Change the status of the Issue Exchange Autocount Invoice operation to "In Progress"
+ ii. Change the status of the Order Placed in White Form operation to "In Progress" upon successful completion.
+ ○ Additional details: When the payment method is FPX or Wallet this task is performed automatically by the system.
+ ○ Dependencies: Map Transaction operation must be completed before this operation can begin.
+ ○ Outcomes: The payment will be approved in exchange, allowing the next steps in the process to be initiated.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_3_DAY_TRANSFER_2',
+ 'on_task_completion' => 'TASK_3_DAY_TRANSFER_3',
+ 'status' => ''
+ ];
+ public const TASK_3_DAY_TRANSFER_3 = [
+ 'name' => 'Issue Exchange Autocount Invoince',
+ 'description' => '○ Purpose: To issue an invoice for the customer\'s payment in accounting software.
+ ○ Initial Status: Not Started
+ ○ Deadline: Next day
+ ○ Responsible department: Accounts
+ ○ Next step: Change the status of the Knockoff Invoice operation to "In Progress" upon successful completion.
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Approve Payment operation must be completed before this operation can begin.
+ ○ Outcomes: An invoice will be issued in accounting software for the customer\'s payment.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_3_DAY_TRANSFER_3',
+ 'on_task_completion' => 'TASK_3_DAY_TRANSFER_4',
+ 'status' => ''
+ ];
+ public const TASK_3_DAY_TRANSFER_4 = [
+ 'name' => 'Knockoff Invoice',
+ 'description' => '○ Purpose: The purpose of this operation is to issue the official receipt and knockoff with invoice for the customer\'s payment.
+ ○ Initial Status: Not Started
+ ○ Deadline: Next day.
+ ○ Responsible Department: Accounts
+ ○ Next Step: None
+ ○ Additional Details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Issue Exchange Autocount Invoice operation must be completed before this operation can begin.
+ ○ Outcomes: The customer\'s payment is applied to the accounting software invoice and invoice is marked as paid.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_3_DAY_TRANSFER_4',
+ 'on_task_completion' => 'TASK_3_DAY_TRANSFER_5',
+ 'status' => ''
+ ];
+ public const TASK_3_DAY_TRANSFER_5 = [
+ 'name' => 'Order Placed in White Form',
+ 'description' => '○ Purpose: To confirm that the order has been placed with the supplier.
+ ○ Initial Status: Not Started
+ ○ Deadline: After 2 days
+ ○ Responsible department: Operations
+ ○ Next step: Change the status of Upload China Bank Slip operation to "In Progress" upon successful completion.
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Approve Payment operation must be completed before this operation can begin.
+ ○ Outcomes: The order is placed with a supplier and the customer\'s order is confirmed.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_3_DAY_TRANSFER_5',
+ 'on_task_completion' => 'TASK_3_DAY_TRANSFER_6',
+ 'status' => ''
+ ];
+ public const TASK_3_DAY_TRANSFER_6 = [
+ 'name' => 'Upload China Bank Slip',
+ 'description' => '○ Purpose: To confirm that the customer order has been transferred to the customer\'s supplier.
+ ○ Initial Status: Not Started
+ ○ Deadline: After 3 days
+ ○ Responsible department: Operations
+ ○ Next step: None
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Order Placed in White Form operation must be completed before this operation can begin.
+ ○ Outcomes: The customer can download the payment transfer proof to send to their supplier.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_3_DAY_TRANSFER_6',
+ 'on_task_completion' => '',
+ 'status' => ''
+ ];
+
+
+ public const TASK_1688_PAYMENT_1 = [
+ 'name' => 'Map Bank Transaction Record',
+ 'description' => '○ Purpose: To map a transaction to bank transaction in the bank statement
+ ○ Initial Status: In Progress
+ ○ Deadline: If payment is created before 4:30 pm, it must be made on the same day. If payment is created after 4:30 pm, it must be made the next day
+ ○ Responsible department: Accounts
+ ○ Next step: Change the status of the Approve payment status to "In Progress" upon successful completion of the operation.
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: None
+ ○ Outcomes: Bank transaction is mapped successfully, allowing the next
+ steps in the process to be initiated.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_1688_PAYMENT_1',
+ 'on_task_completion' => 'TASK_1688_PAYMENT_2',
+ 'status' => PerfexCRMStatus::IN_PROGRESS
+ ];
+ public const TASK_1688_PAYMENT_2 = [
+ 'name' => 'Approve Payment',
+ 'description' => '○ Purpose: To verify and approve the customer\'s payment on exchange
+ ○ Initial Status: Not Started
+ ○ Deadline:If payment is created before 4:30 pm, it must be made on the same day. If payment is created after 4:30 pm, it must be made the next day
+ ○ Responsible department: Accounts
+ ○ Next step:
+ i. Change the status of the Issue Exchange Autocount Invoice operation to "In Progress"
+ ii. Change the status of the Order Placed in White Form operation to "In Progress" upon successful completion.
+ ○ Additional details: When the payment method is FPX or Wallet this task is performed automatically by the system.
+ ○ Dependencies: Map Transaction operation must be completed before this operation can begin.
+ ○ Outcomes: The payment will be approved in exchange, allowing the next steps in the process to be initiated.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_1688_PAYMENT_2',
+ 'on_task_completion' => 'TASK_1688_PAYMENT_3',
+ 'status' => ''
+ ];
+ public const TASK_1688_PAYMENT_3 = [
+ 'name' => 'Issue Exchange Autocount Invoice',
+ 'description' => '○ Purpose: To issue an invoice for the customer\'s payment in accounting software.
+ ○ Initial Status: Not Started
+ ○ Deadline: Next day
+ ○ Responsible department: Accounts
+ ○ Next step: Change the status of the Knockoff Invoice operation to "In Progress" upon successful completion.
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Approve Payment operation must be completed before this operation can begin.
+ ○ Outcomes: An invoice will be issued in accounting software for the customer\'s payment.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_1688_PAYMENT_3',
+ 'on_task_completion' => 'TASK_1688_PAYMENT_4',
+ 'status' => ''
+ ];
+ public const TASK_1688_PAYMENT_4 = [
+ 'name' => 'Knockoff Invoice',
+ 'description' => '○ Purpose: The purpose of this operation is to issue the official receipt and knockoff with invoice for the customer\'s payment.
+ ○ Initial Status: Not Started
+ ○ Deadline: Next day.
+ ○ Responsible Department: Accounts
+ ○ Next Step: None
+ ○ Additional Details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Issue Exchange Autocount Invoice operation must be completed before this operation can begin.
+ ○ Outcomes: The customer\'s payment is applied to the accounting software invoice and invoice is marked as paid.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_1688_PAYMENT_4',
+ 'on_task_completion' => 'TASK_1688_PAYMENT_5',
+ 'status' => ''
+ ];
+ public const TASK_1688_PAYMENT_5 = [
+ 'name' => 'Order Placed in White Form',
+ 'description' => '○ Purpose: To confirm that the order has been placed with the supplier.
+ ○ Initial Status: Not Started
+ ○ Deadline: Same Day
+ ○ Responsible department: Operations
+ ○ Next step: Change the status of Send White Form to Operation
+ Department operation to "In Progress" upon successful completion.
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Approve Payment operation must be completed before this operation can begin.
+ ○ Outcomes: The order is placed with a supplier and the customer\'s order is confirmed.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_1688_PAYMENT_5',
+ 'on_task_completion' => 'TASK_1688_PAYMENT_6',
+ 'status' => ''
+ ];
+ public const TASK_1688_PAYMENT_6 = [
+ 'name' => 'Send White Form to Operation Department',
+ 'description' => '○ Purpose: To give confirmation to the operation department to process the order.
+ ○ Initial Status: Not Started
+ ○ Deadline: Same day
+ ○ Responsible department: Operations
+ ○ Next step: Change the status of Upload China Bank Slip operation to "In Progress" upon successful completion.
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Order Placed in White Form operation must be completed before this operation can begin.
+ ○ Outcomes: The customer\'s order is confirmed and placed in a white form.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_1688_PAYMENT_6',
+ 'on_task_completion' => 'TASK_1688_PAYMENT_7',
+ 'status' => ''
+ ];
+ public const TASK_1688_PAYMENT_7 = [
+ 'name' => 'Authorize Customer\'s 1688 Account',
+ 'description' => '○ Purpose: To authorize the alipay account to make payment to the customer\'s 1688 account.
+ ○ Initial Status: Not Started
+ ○ Deadline: Same day
+ ○ Responsible department: Operations
+ ○ Next step: Change the status of Make Payment for Customer 1688
+ Order operation to "In Progress" upon successful completion.
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Send White Form to Operation Department operation
+ must be completed before this operation can begin.
+ ○ Outcomes: The customer\'s 1688 account is authorized to use the alipay account for making payments.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_1688_PAYMENT_7',
+ 'on_task_completion' => 'TASK_1688_PAYMENT_8',
+ 'status' => ''
+ ];
+ public const TASK_1688_PAYMENT_8 = [
+ 'name' => 'Make Payment for Customer 1688 Order',
+ 'description' => '○ Purpose: To confirm that the order has been placed with the supplier.
+ ○ Initial Status: Not Started
+ ○ Deadline: Same day
+ ○ Responsible department: Operations
+ ○ Next step: Change the status of Upload China Bank Slip operation to "In Progress" upon successful completion.
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Authorize Customer’s 1688 Account operation must be completed before this operation can begin.
+ ○ Outcomes: The customer’s 1688 order is paid.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_1688_PAYMENT_8',
+ 'on_task_completion' => 'TASK_1688_PAYMENT_9',
+ 'status' => ''
+ ];
+ public const TASK_1688_PAYMENT_9 = [
+ 'name' => 'Upload China Bank Slip',
+ 'description' => '○ Purpose: To confirm that the customer order has been transferred to the customer\'s supplier.
+ ○ Initial Status: Not Started
+ ○ Deadline: After 3 days
+ ○ Responsible department: Operations
+ ○ Next step: None
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Make Payment for Customer 1688 Order operation must be completed before this operation can begin.
+ ○ Outcomes: The customer can download the payment transfer proof to send to their supplier.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_1688_PAYMENT_9',
+ 'on_task_completion' => 'TASK_1688_PAYMENT_10',
+ 'status' => ''
+ ];
+ public const TASK_1688_PAYMENT_10 = [
+ 'name' => 'Upload 1688 Purchase Order PDF',
+ 'description' => '○ Purpose: To store a copy of the original purchase order document for bookkeeping.
+ ○ Initial Status: Not Started
+ ○ Deadline: Same day
+ ○ Responsible department: Operations
+ ○ Next step: Change the status of Upload China Bank Slip operation to "In Progress" upon successful completion.
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Make Payment for Customer 1688 Order operation must be completed before this operation can begin.
+ ○ Outcomes: The 1688 purchase order’s pdf is attached to the booking.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_1688_PAYMENT_10',
+ 'on_task_completion' => 'TASK_1688_PAYMENT_11',
+ 'status' => ''
+ ];
+ public const TASK_1688_PAYMENT_11 = [
+ 'name' => 'Fill Up Purchase Order',
+ 'description' => '○ Purpose: To store the purchase order details to generate the invoice.
+ ○ Initial Status: Not Started
+ ○ Deadline: Same day
+ ○ Responsible department: Operations
+ ○ Next step: Change the status of Approve Purchase Order operation to "In Progress" upon successful completion.
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Upload 1688 Purchase Order PDF operation must be completed before this operation can begin.
+ ○ Outcomes: The purchase order’s details are added to the booking.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_1688_PAYMENT_11',
+ 'on_task_completion' => 'TASK_1688_PAYMENT_12',
+ 'status' => ''
+ ];
+ public const TASK_1688_PAYMENT_12 = [
+ 'name' => 'Approve Purchase Order',
+ 'description' => '○ Purpose: To check that the customer submitted a purchase order that complies with our company’s guidelines.
+ ○ Initial Status: Not Started
+ ○ Deadline: Same day
+ ○ Responsible department: Operations
+ ○ Next step: Change the status of Complete Order bookkeeping operation to "In Progress" upon successful completion.
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Fill Up Purchase Order operation must be completed before this operation can begin.
+ ○ Outcomes: The purchase order submitted is approved.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_1688_PAYMENT_12',
+ 'on_task_completion' => 'TASK_1688_PAYMENT_13',
+ 'status' => ''
+ ];
+ public const TASK_1688_PAYMENT_13 = [
+ 'name' => 'Complete Order bookeeping',
+ 'description' => '○ Purpose: To complete the bookkeeping for the booking.
+ ○ Initial Status: Not Started
+ ○ Deadline: Same day
+ ○ Responsible department: Operations
+ ○ Next step: None
+ ○ Additional details: ** Any specific requirements or notes for the operation.**
+ ○ Dependencies: Approve Purchase Order and Upload China Bank Slip operation must be completed before this operation can begin.
+ ○ Outcomes: The order is placed with a supplier and the customer’s order is confirmed.
',
+ 'milestone' => '',
+ 'reference' => 'TASK_1688_PAYMENT_13',
+ 'on_task_completion' => '',
+ 'status' => ''
+ ];
+
}