diff --git a/app/Classes/Jobs/Commands/V2/ProcessCreditNoteReportV2CommandJob.php b/app/Classes/Jobs/Commands/V2/ProcessCreditNoteReportV2CommandJob.php
index 575ba9a2..133e1441 100644
--- a/app/Classes/Jobs/Commands/V2/ProcessCreditNoteReportV2CommandJob.php
+++ b/app/Classes/Jobs/Commands/V2/ProcessCreditNoteReportV2CommandJob.php
@@ -2,9 +2,9 @@
namespace App\Classes\Jobs\Commands\V2;
-use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
-use App\Classes\Modules\Settings\Services\CreatesKeyValuePair;
-use App\Classes\Modules\Settings\Services\UpdatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject;
+use App\Classes\Modules\KeyValuePairs\Services\CreatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\UpdatesKeyValuePair;
use App\Classes\Modules\Bookings\Processors\RegenerateInvoiceBookingProcessor;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\KVPKey;
diff --git a/app/Classes/Jobs/Commands/V2/ProcessPaymentReportV2CommandJob.php b/app/Classes/Jobs/Commands/V2/ProcessPaymentReportV2CommandJob.php
index 05970692..af029c85 100644
--- a/app/Classes/Jobs/Commands/V2/ProcessPaymentReportV2CommandJob.php
+++ b/app/Classes/Jobs/Commands/V2/ProcessPaymentReportV2CommandJob.php
@@ -2,9 +2,9 @@
namespace App\Classes\Jobs\Commands\V2;
-use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
-use App\Classes\Modules\Settings\Services\CreatesKeyValuePair;
-use App\Classes\Modules\Settings\Services\UpdatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject;
+use App\Classes\Modules\KeyValuePairs\Services\CreatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\UpdatesKeyValuePair;
use App\Classes\ValueObjects\Constants\KVPKey;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
diff --git a/app/Classes/Jobs/Commands/V2/ProcessSalesDepositByWalletPaymentEntryV2CommandJob.php b/app/Classes/Jobs/Commands/V2/ProcessSalesDepositByWalletPaymentEntryV2CommandJob.php
index cf473be0..0c4d0b78 100644
--- a/app/Classes/Jobs/Commands/V2/ProcessSalesDepositByWalletPaymentEntryV2CommandJob.php
+++ b/app/Classes/Jobs/Commands/V2/ProcessSalesDepositByWalletPaymentEntryV2CommandJob.php
@@ -2,9 +2,9 @@
namespace App\Classes\Jobs\Commands\V2;
-use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
-use App\Classes\Modules\Accounts\Services\CreatesKeyValuePair;
-use App\Classes\Modules\Accounts\Services\UpdatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject;
+use App\Classes\Modules\KeyValuePairs\Services\CreatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\UpdatesKeyValuePair;
use App\Classes\ValueObjects\Constants\KVPKey;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
diff --git a/app/Classes/Jobs/Commands/V2/ProcessSalesDepositByWalletRefundEntryV2CommandJob.php b/app/Classes/Jobs/Commands/V2/ProcessSalesDepositByWalletRefundEntryV2CommandJob.php
index b984fab2..f5ca3ab0 100644
--- a/app/Classes/Jobs/Commands/V2/ProcessSalesDepositByWalletRefundEntryV2CommandJob.php
+++ b/app/Classes/Jobs/Commands/V2/ProcessSalesDepositByWalletRefundEntryV2CommandJob.php
@@ -2,9 +2,9 @@
namespace App\Classes\Jobs\Commands\V2;
-use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
-use App\Classes\Modules\Accounts\Services\CreatesKeyValuePair;
-use App\Classes\Modules\Accounts\Services\UpdatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject;
+use App\Classes\Modules\KeyValuePairs\Services\CreatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\UpdatesKeyValuePair;
use App\Classes\ValueObjects\Constants\KVPKey;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
diff --git a/app/Classes/Jobs/Commands/V2/ProcessSalesInvoiceReportV2CommandJob.php b/app/Classes/Jobs/Commands/V2/ProcessSalesInvoiceReportV2CommandJob.php
index a7bf14c9..281ae38f 100644
--- a/app/Classes/Jobs/Commands/V2/ProcessSalesInvoiceReportV2CommandJob.php
+++ b/app/Classes/Jobs/Commands/V2/ProcessSalesInvoiceReportV2CommandJob.php
@@ -2,9 +2,9 @@
namespace App\Classes\Jobs\Commands\V2;
-use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
-use App\Classes\Modules\Settings\Services\CreatesKeyValuePair;
-use App\Classes\Modules\Settings\Services\UpdatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject;
+use App\Classes\Modules\KeyValuePairs\Services\CreatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\UpdatesKeyValuePair;
use App\Classes\ValueObjects\Constants\KVPKey;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
diff --git a/app/Classes/Jobs/SendWelcomeVoucherEmail.php b/app/Classes/Jobs/SendWelcomeVoucherEmail.php
index a6e9eede..2fcc8dac 100644
--- a/app/Classes/Jobs/SendWelcomeVoucherEmail.php
+++ b/app/Classes/Jobs/SendWelcomeVoucherEmail.php
@@ -2,8 +2,8 @@
namespace App\Classes\Jobs;
-use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
-use App\Classes\Modules\Settings\Services\CreatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject;
+use App\Classes\Modules\KeyValuePairs\Services\CreatesKeyValuePair;
use App\Classes\Notifications\WelcomeVoucherEmail;
use App\Models\User;
use App\Models\Voucher;
diff --git a/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php b/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php
index d681d182..212977be 100644
--- a/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php
+++ b/app/Classes/Modules/Accounts/ControllersLogic/CreateCustomerLogic.php
@@ -183,8 +183,10 @@ class CreateCustomerLogic extends AbstractControllerLogic
}
}
- // Track affiliate registration if user came from affiliate link
- $this->tracksAffiliateRegistration->execute($user, $request->get('tracking'));
+ // Track affiliate registration if user came from affiliate link.
+ // Prefer ?tracking= from request; fallback to cookie set by TrackAffiliateClick on /signup visit.
+ $code = $request->get('tracking') ?? $request->cookie(\App\Classes\Modules\Affiliate\Services\TracksAffiliateClick::COOKIE_NAME);
+ $this->tracksAffiliateRegistration->execute($user, $code);
return $this->response($this->authenticationProcessor->execute($request, false));
diff --git a/app/Classes/Modules/Accounts/ControllersLogic/CreateSystemUserLogic.php b/app/Classes/Modules/Accounts/ControllersLogic/CreateSystemUserLogic.php
index f40ae7dd..6e1d08d3 100644
--- a/app/Classes/Modules/Accounts/ControllersLogic/CreateSystemUserLogic.php
+++ b/app/Classes/Modules/Accounts/ControllersLogic/CreateSystemUserLogic.php
@@ -61,8 +61,8 @@ class CreateSystemUserLogic extends AbstractControllerLogic
$this->canCreateUser->passes($user_object);
$user = $this->createsUser->execute($user_object);
- $token = $user->createToken('my-app-token', ['*'])->plainTextToken;
- return $this->response(['token' => $token]);
+ // $token = $user->createToken('my-app-token', ['*'])->plainTextToken;
+ // return $this->response(['token' => $token]);
}
return $this->response([]);
}
diff --git a/app/Classes/Modules/Affiliate/ControllersLogic/CreateAffiliateLogic.php b/app/Classes/Modules/Affiliate/ControllersLogic/CreateAffiliateLogic.php
index ac462a6f..5a8bcfb8 100644
--- a/app/Classes/Modules/Affiliate/ControllersLogic/CreateAffiliateLogic.php
+++ b/app/Classes/Modules/Affiliate/ControllersLogic/CreateAffiliateLogic.php
@@ -2,33 +2,58 @@
namespace App\Classes\Modules\Affiliate\ControllersLogic;
+use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Affiliate\Services\CreatesAffiliate;
use App\Classes\Modules\Affiliate\DataTransferObjects\AffiliateObject;
+use App\Classes\Modules\Affiliate\Standards\Rules\CanCreateAffiliate;
+use App\Http\Resources\AffiliateResource;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
-class CreateAffiliateLogic
+class CreateAffiliateLogic extends AbstractControllerLogic
{
+ /**
+ * @return array
+ */
+ protected function notification(): array
+ {
+ return [
+ 'title' => 'Created Affiliate',
+ 'message' => 'You have successfully created a new Affiliate Code'
+ ];
+ }
+
+ /** @var CanCreateAffiliate */
+ private $canCreateAffiliate;
+
/** @var CreatesAffiliate */
private $createsAffiliate;
/**
+ * CreateAffiliateLogic constructor.
+ * @param CanCreateAffiliate $canCreateAffiliate
* @param CreatesAffiliate $createsAffiliate
*/
- public function __construct(CreatesAffiliate $createsAffiliate)
+ public function __construct(
+ CanCreateAffiliate $canCreateAffiliate,
+ CreatesAffiliate $createsAffiliate
+ )
{
+ $this->canCreateAffiliate = $canCreateAffiliate;
$this->createsAffiliate = $createsAffiliate;
}
/**
* @param Request $request
* @return JsonResponse
+ * @throws \App\Classes\Exceptions\AccessForbiddenException
+ * @throws \App\Classes\Exceptions\RequestValidationException
*/
- public function execute(Request $request): JsonResponse
+ public function logic(Request $request): JsonResponse
{
$code = $request->input('code');
$code = $code !== null ? (string) $code : '';
-
+
$isActive = $request->input('is_active', true);
// Convert string 'true'/'false' to boolean if needed
if (is_string($isActive)) {
@@ -43,12 +68,13 @@ class CreateAffiliateLogic
$isActive
);
+ // Validate the affiliate object
+ $this->canCreateAffiliate->passes($object);
+
+ // Create the affiliate
$affiliate = $this->createsAffiliate->execute($object);
- return response()->json([
- 'message' => 'Affiliate code created successfully',
- 'data' => $affiliate
- ]);
+ return $this->resourceResponse(new AffiliateResource($affiliate));
}
}
diff --git a/app/Classes/Modules/Affiliate/Services/CreatesAffiliate.php b/app/Classes/Modules/Affiliate/Services/CreatesAffiliate.php
index 327e25f4..5cfd4b9b 100644
--- a/app/Classes/Modules/Affiliate/Services/CreatesAffiliate.php
+++ b/app/Classes/Modules/Affiliate/Services/CreatesAffiliate.php
@@ -18,23 +18,17 @@ class CreatesAffiliate extends AbstractUpdateRecord
public function execute(AffiliateObject $object)
{
$code = $object->getCode();
-
+
// Auto-generate code if not provided
if (empty($code)) {
$code = $this->generateUniqueCode();
} else {
- // Validate uniqueness of user-provided code (including soft-deleted records)
- $existingAffiliate = Affiliate::where('code', $code)
- ->whereNull('deleted_at')
- ->first();
-
- if ($existingAffiliate) {
- throw new \App\Classes\Exceptions\MalformedRequestException('Affiliate code already exists. Please choose a different code.');
- }
+ // Uppercase the code for consistency
+ $code = strtoupper($code);
}
$model = new Affiliate();
- $model->code = $code;
+ $model->code = strtoupper($code);
$model->campaign_name = $object->getCampaignName();
$model->campaign_description = $object->getCampaignDescription();
$model->is_active = $object->getIsActive();
@@ -48,19 +42,19 @@ class CreatesAffiliate extends AbstractUpdateRecord
/**
* Generate a unique affiliate code
- *
+ *
* @return string
*/
private function generateUniqueCode(): string
{
$maxAttempts = 10;
$attempts = 0;
-
+
do {
// Increased from 12 to 16 characters for better uniqueness
$code = Str::random(16);
$attempts++;
-
+
if ($attempts >= $maxAttempts) {
// Fallback to UUID if we can't generate unique code
$code = strtoupper(Str::substr(str_replace('-', '', Str::uuid()), 0, 16));
diff --git a/app/Classes/Modules/Affiliate/Services/TracksAffiliateOrder.php b/app/Classes/Modules/Affiliate/Services/TracksAffiliateOrder.php
index b6f81dc7..8dd85405 100644
--- a/app/Classes/Modules/Affiliate/Services/TracksAffiliateOrder.php
+++ b/app/Classes/Modules/Affiliate/Services/TracksAffiliateOrder.php
@@ -12,7 +12,7 @@ class TracksAffiliateOrder
{
/**
* Track when a user with an affiliate code creates an order
- *
+ *
* @param Booking $booking
* @return Affiliate|null
*/
@@ -48,22 +48,22 @@ class TracksAffiliateOrder
// Check if this booking has already been counted
// We'll use a KeyValuePair to track which bookings have been counted
$kvpKey = 'affiliate_order_tracked_' . $affiliate->id;
-
+
$existingKvp = $booking->attributesKVP()
->where('key', $kvpKey)
->exists();
-
+
if ($existingKvp) {
return $affiliate; // Already counted
}
// Mark this booking as tracked
- $keyValuePairObject = new \App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject(
+ $keyValuePairObject = new \App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject(
$kvpKey,
'1'
);
-
- $createsKeyValuePair = app()->make(\App\Classes\Modules\Accounts\Services\CreatesKeyValuePair::class);
+
+ $createsKeyValuePair = app()->make(\App\Classes\Modules\KeyValuePairs\Services\CreatesKeyValuePair::class);
$createsKeyValuePair->execute($booking, $keyValuePairObject);
// Increment orders count atomically
diff --git a/app/Classes/Modules/Affiliate/Services/TracksAffiliateRegistration.php b/app/Classes/Modules/Affiliate/Services/TracksAffiliateRegistration.php
index 7768f575..b0bf702d 100644
--- a/app/Classes/Modules/Affiliate/Services/TracksAffiliateRegistration.php
+++ b/app/Classes/Modules/Affiliate/Services/TracksAffiliateRegistration.php
@@ -13,12 +13,14 @@ class TracksAffiliateRegistration
{
/**
* Track when a user registers with an affiliate code
- *
+ *
* @param User $user
* @return Affiliate|null
*/
- public function execute(User $user, string $code): ?Affiliate
+ public function execute(User $user, ?string $code = null): ?Affiliate
{
+ // Log::info('TracksAffiliateRegistration::execute', ['user' => $user, 'code' => $code]);
+
if (!$code || !$this->isValidCode($code)) {
Log::info('Code is not valid', ['code' => $code]);
return null;
@@ -65,7 +67,7 @@ class TracksAffiliateRegistration
/**
* Validate affiliate code format
- *
+ *
* @param string $code
* @return bool
*/
diff --git a/app/Classes/Modules/Affiliate/Standards/Rules/CanCreateAffiliate.php b/app/Classes/Modules/Affiliate/Standards/Rules/CanCreateAffiliate.php
new file mode 100644
index 00000000..03e7cee1
--- /dev/null
+++ b/app/Classes/Modules/Affiliate/Standards/Rules/CanCreateAffiliate.php
@@ -0,0 +1,52 @@
+affiliateCreateValidation = $affiliateCreateValidation;
+ }
+
+ /**
+ * @param AffiliateObject $object
+ * @return bool
+ */
+ protected function authorized($object): bool
+ {
+ // Authorization is handled by policy in controller
+ return true;
+ }
+
+ /**
+ * @param AffiliateObject $object
+ * @return bool
+ * @throws \App\Classes\Exceptions\RequestValidationException
+ */
+ protected function validators($object): bool
+ {
+ return $this->affiliateCreateValidation->validate($object);
+ }
+
+ /**
+ * @param AffiliateObject $object
+ * @return bool
+ */
+ protected function criteria($object): bool
+ {
+ // No additional criteria needed for affiliate creation
+ return true;
+ }
+}
diff --git a/app/Classes/Modules/Affiliate/Standards/Validators/AffiliateCreateValidation.php b/app/Classes/Modules/Affiliate/Standards/Validators/AffiliateCreateValidation.php
new file mode 100644
index 00000000..85fa5079
--- /dev/null
+++ b/app/Classes/Modules/Affiliate/Standards/Validators/AffiliateCreateValidation.php
@@ -0,0 +1,69 @@
+ $object->getCode(),
+ 'campaign_name' => $object->getCampaignName(),
+ 'campaign_description' => $object->getCampaignDescription(),
+ 'is_active' => $object->getIsActive(),
+ ];
+ }
+
+ /**
+ * @return array
+ */
+ protected function rules(): array
+ {
+ return [
+ 'code' => [
+ 'nullable',
+ 'string',
+ 'min:3',
+ 'max:255',
+ 'regex:/^[a-zA-Z0-9_-]+$/',
+ function ($attribute, $value, $fail) {
+ if (!empty($value)) {
+ $uppercaseCode = strtoupper($value);
+ $exists = Affiliate::whereRaw('UPPER(code) = ?', [$uppercaseCode])
+ ->whereNull('deleted_at')
+ ->exists();
+
+ if ($exists) {
+ $fail('Affiliate code already exists. Please choose a different code.');
+ }
+ }
+ },
+ ],
+ 'campaign_name' => 'required|string|max:255',
+ 'campaign_description' => 'nullable|string|max:65535',
+ 'is_active' => 'required|boolean',
+ ];
+ }
+
+ /**
+ * @return array
+ */
+ protected function messages(): array
+ {
+ return [
+ 'code.regex' => 'The affiliate code may only contain letters, numbers, hyphens, and underscores.',
+ 'code.min' => 'The affiliate code must be at least 3 characters.',
+ 'campaign_name.required' => 'A campaign name is required.',
+ 'campaign_name.max' => 'The campaign name cannot exceed 255 characters.',
+ ];
+ }
+}
diff --git a/app/Classes/Modules/Banks/Processors/UpdateBankProcessor.php b/app/Classes/Modules/Banks/Processors/UpdateBankProcessor.php
index bd6564d9..d1057393 100644
--- a/app/Classes/Modules/Banks/Processors/UpdateBankProcessor.php
+++ b/app/Classes/Modules/Banks/Processors/UpdateBankProcessor.php
@@ -7,8 +7,8 @@ use App\Classes\Modules\Transactions\Services\FetchesTransaction;
use App\Classes\Modules\Banks\Services\UpdatesBank;
use App\Classes\Modules\Banks\Services\CreatesOrUpdateBank;
use App\Classes\Modules\Banks\DataTransferObjects\BankObject;
-use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
-use App\Classes\Modules\Settings\Services\CreatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject;
+use App\Classes\Modules\KeyValuePairs\Services\CreatesKeyValuePair;
use Illuminate\Database\Eloquent\Model;
use App\Models\Bank;
diff --git a/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingLockLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingLockLogic.php
index 8a3a4912..182bdca7 100644
--- a/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingLockLogic.php
+++ b/app/Classes/Modules/Bookings/ControllersLogic/CreateBookingLockLogic.php
@@ -6,7 +6,7 @@ use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use App\Classes\Modules\Bookings\Standards\Rules\CanCreateBooking;
use App\Classes\Modules\Bookings\Services\FetchesBooking;
-use App\Classes\Modules\Settings\Services\CreatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\CreatesKeyValuePair;
use App\Classes\ValueObjects\Constants\KVPKey;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
@@ -62,6 +62,8 @@ class CreateBookingLockLogic extends AbstractControllerLogic
*/
public function logic(Request $request) : JsonResponse
{
+ // cief todo: 110 - CanCreateBookingLock
+
// $password = $request->input('password');
// if($password !== 'prototype'){
// throw new AccessForbiddenException('Incorrect Password');
diff --git a/app/Classes/Modules/Bookings/ControllersLogic/DeleteBookingLockLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/DeleteBookingLockLogic.php
index 90844ade..5b536038 100644
--- a/app/Classes/Modules/Bookings/ControllersLogic/DeleteBookingLockLogic.php
+++ b/app/Classes/Modules/Bookings/ControllersLogic/DeleteBookingLockLogic.php
@@ -53,6 +53,8 @@ class DeleteBookingLockLogic extends AbstractControllerLogic
*/
public function logic(Request $request) : JsonResponse
{
+ // cief todo: 110 - CanDeleteBookingLock
+
$password = $request->input('password');
if($password !== 'prototype'){
throw new AccessForbiddenException('Incorrect Password');
diff --git a/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountLogic.php
index 73625a26..9b58b4be 100644
--- a/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountLogic.php
+++ b/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountLogic.php
@@ -13,14 +13,14 @@ use App\Classes\Modules\Bookings\Services\FetchesBooking;
use App\Classes\Modules\Bookings\Services\UpdatesBookingInvoiceStatus;
use App\Classes\Modules\Bookings\Services\UpdatesBookingFixedAmount;
use App\Classes\Modules\Bookings\Standards\Rules\CanUpdateBooking;
+use App\Classes\Modules\Rules\Services\RuleEvaluator;
+use App\Classes\Modules\Rules\Standards\Rules\CanPassTransferPeriodLockRule;
+use App\Classes\Modules\Rules\DataTransferObjects\CheckTransferPeriodLockRuleVariant2DTO;
use App\Classes\Modules\Transactions\Processors\CreateInvoiceTransactionV2Processor;
use App\Classes\Modules\Transactions\Services\UpdatesTransactionStatus;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Http\Resources\BookingResource;
-use App\Classes\Modules\Rules\DataTransferObjects\CheckTransferPeriodLockRuleVariant2DTO;
-use App\Classes\Modules\Rules\Services\RuleEvaluator;
-use App\Classes\Modules\Rules\Standards\Rules\CanPassTransferPeriodLockRule;
use ErrorException;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
@@ -79,8 +79,10 @@ class UpdateBookingAmountLogic extends AbstractControllerLogic
* @param CanPassTransferPeriodLockRule $canPassTransferPeriodLockRule
* @param UpdatesBookingInvoiceStatus $updatesBookingInvoiceStatus
* @param CreateInvoiceTransactionV2Processor $createInvoiceTransactionProcessor
+ * @param RuleEvaluator $ruleEvaluator
+ * @param CanPassTransferPeriodLockRule $canPassTransferPeriodLockRule
*/
- public function __construct(CanUpdateBooking $canUpdateBooking, UpdatesBookingFixedAmount $updatesBookingFixedAmount, FetchesBooking $fetchesBooking, CalculatesBookingOutstanding $calculatesBookingOutstanding, UpdatesTransactionStatus $updatesTransactionStatus, RuleEvaluator $ruleEvaluator, CanPassTransferPeriodLockRule $canPassTransferPeriodLockRule, UpdatesBookingInvoiceStatus $updatesBookingInvoiceStatus, CreateInvoiceTransactionV2Processor $createInvoiceTransactionProcessor)
+ public function __construct(CanUpdateBooking $canUpdateBooking, UpdatesBookingFixedAmount $updatesBookingFixedAmount, FetchesBooking $fetchesBooking, CalculatesBookingOutstanding $calculatesBookingOutstanding, UpdatesTransactionStatus $updatesTransactionStatus, UpdatesBookingInvoiceStatus $updatesBookingInvoiceStatus, CreateInvoiceTransactionV2Processor $createInvoiceTransactionProcessor, RuleEvaluator $ruleEvaluator, CanPassTransferPeriodLockRule $canPassTransferPeriodLockRule)
{
$this->canUpdateBooking = $canUpdateBooking;
$this->updatesBookingFixedAmount = $updatesBookingFixedAmount;
@@ -91,6 +93,8 @@ class UpdateBookingAmountLogic extends AbstractControllerLogic
$this->canPassTransferPeriodLockRule = $canPassTransferPeriodLockRule;
$this->updatesBookingInvoiceStatus = $updatesBookingInvoiceStatus;
$this->createInvoiceTransactionProcessor = $createInvoiceTransactionProcessor;
+ $this->ruleEvaluator = $ruleEvaluator;
+ $this->canPassTransferPeriodLockRule = $canPassTransferPeriodLockRule;
}
/**
@@ -101,18 +105,18 @@ class UpdateBookingAmountLogic extends AbstractControllerLogic
*/
public function logic(Request $request) : JsonResponse
{
- //cief todo: Prototype Period Lock - Starts
- $reqData['id'] = $request->route('id');
- $dto = new CheckTransferPeriodLockRuleVariant2DTO($reqData);
+ //cief todo: 110 - Prototype Period Lock - Starts
+ // $reqData['id'] = $request->route('id');
+ // $dto = new CheckTransferPeriodLockRuleVariant2DTO($reqData);
- $result = $this->ruleEvaluator->evaluate([
- $this->canPassTransferPeriodLockRule,
- ], $dto);
+ // $result = $this->ruleEvaluator->evaluate([
+ // $this->canPassTransferPeriodLockRule,
+ // ], $dto);
- if ($result->failed()) {
- throw new CriteriaNotFulfilledException("- " . implode("
- ", $result->messages()));
- }
- //cief todo: Prototype Period Lock - Ends
+ // if ($result->failed()) {
+ // throw new CriteriaNotFulfilledException("- " . implode("
- ", $result->messages()));
+ // }
+ //cief todo: 110 - Prototype Period Lock - Ends
$booking = $this->fetchesBooking->execute(['id' => $request->route('id')]);
diff --git a/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountOnHoldLogic.php b/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountOnHoldLogic.php
index f185a1d0..02b64e36 100644
--- a/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountOnHoldLogic.php
+++ b/app/Classes/Modules/Bookings/ControllersLogic/UpdateBookingAmountOnHoldLogic.php
@@ -6,14 +6,14 @@ use App\Classes\Modules\Bookings\Services\UpdatesBookingFixedAmount;
use App\Classes\Modules\Transactions\Services\UpdatesTransactionStatus;
use App\Classes\Modules\Bookings\Services\FetchesBooking;
use App\Classes\Modules\Bookings\Standards\Rules\CanUpdateBooking;
-use App\Classes\Modules\Settings\Services\CreatesKeyValuePair;
-use App\Classes\Modules\Settings\Services\UpdatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\CreatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\UpdatesKeyValuePair;
use App\Classes\Modules\Bookings\Services\CalculatesBookingOutstanding;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Classes\Exceptions\MalformedRequestException;
use App\Classes\General\Abstracts\AbstractControllerLogic;
-use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
+use App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject;
use App\Classes\ValueObjects\Constants\KVPKey;
use App\Http\Resources\BookingResource;
use Illuminate\Http\JsonResponse;
diff --git a/app/Classes/Modules/Imports/ControllersLogic/ImportExcelLogic.php b/app/Classes/Modules/Imports/ControllersLogic/ImportExcelLogic.php
index 347716eb..63f6d45d 100644
--- a/app/Classes/Modules/Imports/ControllersLogic/ImportExcelLogic.php
+++ b/app/Classes/Modules/Imports/ControllersLogic/ImportExcelLogic.php
@@ -7,10 +7,10 @@ use App\Classes\Exceptions\MalformedRequestException;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Jobs\Commands\V2\ProcessPaymentReportV2CommandJob;
use App\Classes\Jobs\Commands\V2\ProcessSalesInvoiceReportV2CommandJob;
-use App\Classes\Modules\Settings\Services\CreatesKeyValuePair;
-use App\Classes\Modules\Settings\Services\UpdatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\CreatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\UpdatesKeyValuePair;
use App\Classes\Modules\Documents\DataTransferObjects\DocumentObject;
-use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
+use App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject;
use App\Classes\Modules\Imports\Services\AutoCountDataImport;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\KVPKey;
diff --git a/app/Classes/Modules/KeyValuePairs/ControllersLogic/CreateChatGPTPromptKVPLogic.php b/app/Classes/Modules/KeyValuePairs/ControllersLogic/CreateChatGPTPromptKVPLogic.php
index 103f002e..39beec6b 100644
--- a/app/Classes/Modules/KeyValuePairs/ControllersLogic/CreateChatGPTPromptKVPLogic.php
+++ b/app/Classes/Modules/KeyValuePairs/ControllersLogic/CreateChatGPTPromptKVPLogic.php
@@ -4,8 +4,8 @@ namespace App\Classes\Modules\KeyValuePairs\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
-use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
-use App\Classes\Modules\Accounts\Services\CreatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject;
+use App\Classes\Modules\KeyValuePairs\Services\CreatesKeyValuePair;
use App\Classes\Modules\KeyValuePairs\DataTransferObjects\CreateChatGPTPromptDTO;
use App\Classes\Modules\KeyValuePairs\Standards\Rules\CanCreateChatGPTPrompt;
use App\Classes\ValueObjects\Constants\KVPKey;
diff --git a/app/Classes/Modules/KeyValuePairs/ControllersLogic/CreateClaudePromptKVPLogic.php b/app/Classes/Modules/KeyValuePairs/ControllersLogic/CreateClaudePromptKVPLogic.php
index 940b9f8e..91312077 100644
--- a/app/Classes/Modules/KeyValuePairs/ControllersLogic/CreateClaudePromptKVPLogic.php
+++ b/app/Classes/Modules/KeyValuePairs/ControllersLogic/CreateClaudePromptKVPLogic.php
@@ -4,8 +4,8 @@ namespace App\Classes\Modules\KeyValuePairs\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
-use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
-use App\Classes\Modules\Accounts\Services\CreatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject;
+use App\Classes\Modules\KeyValuePairs\Services\CreatesKeyValuePair;
use App\Classes\Modules\KeyValuePairs\DataTransferObjects\CreateClaudePromptDTO;
use App\Classes\Modules\KeyValuePairs\Standards\Rules\CanCreateClaudePrompt;
use App\Classes\ValueObjects\Constants\KVPKey;
diff --git a/app/Classes/Modules/Settings/ControllersLogic/CreateLockLogic.php b/app/Classes/Modules/KeyValuePairs/ControllersLogic/CreateLockLogic.php
similarity index 87%
rename from app/Classes/Modules/Settings/ControllersLogic/CreateLockLogic.php
rename to app/Classes/Modules/KeyValuePairs/ControllersLogic/CreateLockLogic.php
index 0dd83853..76c8d559 100644
--- a/app/Classes/Modules/Settings/ControllersLogic/CreateLockLogic.php
+++ b/app/Classes/Modules/KeyValuePairs/ControllersLogic/CreateLockLogic.php
@@ -1,11 +1,11 @@
input('password');
// if($password !== 'prototype'){
// throw new AccessForbiddenException('Incorrect Password');
diff --git a/app/Classes/Modules/KeyValuePairs/ControllersLogic/DeleteChatGPTPromptKVPLogic.php b/app/Classes/Modules/KeyValuePairs/ControllersLogic/DeleteChatGPTPromptKVPLogic.php
index 87cc9450..6c611a44 100644
--- a/app/Classes/Modules/KeyValuePairs/ControllersLogic/DeleteChatGPTPromptKVPLogic.php
+++ b/app/Classes/Modules/KeyValuePairs/ControllersLogic/DeleteChatGPTPromptKVPLogic.php
@@ -4,8 +4,8 @@ namespace App\Classes\Modules\KeyValuePairs\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
-use App\Classes\Modules\Accounts\Services\DeletesKeyValuePair;
-use App\Classes\Modules\Accounts\Services\FetchesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\DeletesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\FetchesKeyValuePair;
use App\Classes\Modules\KeyValuePairs\Standards\Rules\CanDeleteChatGPTPrompt;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
diff --git a/app/Classes/Modules/KeyValuePairs/ControllersLogic/DeleteClaudePromptKVPLogic.php b/app/Classes/Modules/KeyValuePairs/ControllersLogic/DeleteClaudePromptKVPLogic.php
index b61b11b9..c0666389 100644
--- a/app/Classes/Modules/KeyValuePairs/ControllersLogic/DeleteClaudePromptKVPLogic.php
+++ b/app/Classes/Modules/KeyValuePairs/ControllersLogic/DeleteClaudePromptKVPLogic.php
@@ -4,8 +4,8 @@ namespace App\Classes\Modules\KeyValuePairs\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
-use App\Classes\Modules\Accounts\Services\DeletesKeyValuePair;
-use App\Classes\Modules\Accounts\Services\FetchesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\DeletesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\FetchesKeyValuePair;
use App\Classes\Modules\KeyValuePairs\Standards\Rules\CanDeleteClaudePrompt;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
diff --git a/app/Classes/Modules/Settings/ControllersLogic/FetchLockLogic.php b/app/Classes/Modules/KeyValuePairs/ControllersLogic/FetchLockLogic.php
similarity index 94%
rename from app/Classes/Modules/Settings/ControllersLogic/FetchLockLogic.php
rename to app/Classes/Modules/KeyValuePairs/ControllersLogic/FetchLockLogic.php
index a9961331..2165b2d0 100644
--- a/app/Classes/Modules/Settings/ControllersLogic/FetchLockLogic.php
+++ b/app/Classes/Modules/KeyValuePairs/ControllersLogic/FetchLockLogic.php
@@ -1,6 +1,6 @@
canFetchBooking->passes();
// $query = $this->fetchesKeyValuePair->execute(['marking' => $request->route('marking'), 'with_transactions' => true]);
diff --git a/app/Classes/Modules/Settings/ControllersLogic/ListLocksLogic.php b/app/Classes/Modules/KeyValuePairs/ControllersLogic/ListLocksLogic.php
similarity index 90%
rename from app/Classes/Modules/Settings/ControllersLogic/ListLocksLogic.php
rename to app/Classes/Modules/KeyValuePairs/ControllersLogic/ListLocksLogic.php
index dc5de052..46e47f2c 100644
--- a/app/Classes/Modules/Settings/ControllersLogic/ListLocksLogic.php
+++ b/app/Classes/Modules/KeyValuePairs/ControllersLogic/ListLocksLogic.php
@@ -1,10 +1,10 @@
canListServiceTypes->passes();
$query = $this->listsKeyValuePairs->execute($this->listsKeyValuePairs->deserializeFilters($request->input('filters')));
diff --git a/app/Classes/Modules/KeyValuePairs/ControllersLogic/UpdateChatGPTPromptKVPLogic.php b/app/Classes/Modules/KeyValuePairs/ControllersLogic/UpdateChatGPTPromptKVPLogic.php
index 0f8022bf..ddc1365a 100644
--- a/app/Classes/Modules/KeyValuePairs/ControllersLogic/UpdateChatGPTPromptKVPLogic.php
+++ b/app/Classes/Modules/KeyValuePairs/ControllersLogic/UpdateChatGPTPromptKVPLogic.php
@@ -4,11 +4,11 @@ namespace App\Classes\Modules\KeyValuePairs\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
-use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
+use App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject;
use App\Classes\Modules\KeyValuePairs\DataTransferObjects\UpdateChatGPTPromptDTO;
use App\Classes\Modules\KeyValuePairs\Standards\Rules\CanUpdateChatGPTPrompt;
-use App\Classes\Modules\Accounts\Services\FetchesKeyValuePair;
-use App\Classes\Modules\Settings\Services\UpdatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\FetchesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\UpdatesKeyValuePair;
use App\Http\Resources\ChatGPTPromptResource;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
diff --git a/app/Classes/Modules/KeyValuePairs/ControllersLogic/UpdateClaudePromptKVPLogic.php b/app/Classes/Modules/KeyValuePairs/ControllersLogic/UpdateClaudePromptKVPLogic.php
index 50ded457..88f8e537 100644
--- a/app/Classes/Modules/KeyValuePairs/ControllersLogic/UpdateClaudePromptKVPLogic.php
+++ b/app/Classes/Modules/KeyValuePairs/ControllersLogic/UpdateClaudePromptKVPLogic.php
@@ -4,11 +4,11 @@ namespace App\Classes\Modules\KeyValuePairs\ControllersLogic;
use App\Classes\General\Abstracts\AbstractControllerLogic;
-use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
+use App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject;
use App\Classes\Modules\KeyValuePairs\DataTransferObjects\UpdateClaudePromptDTO;
use App\Classes\Modules\KeyValuePairs\Standards\Rules\CanUpdateClaudePrompt;
-use App\Classes\Modules\Accounts\Services\FetchesKeyValuePair;
-use App\Classes\Modules\Settings\Services\UpdatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\FetchesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\UpdatesKeyValuePair;
use App\Http\Resources\ClaudePromptResource;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
diff --git a/app/Classes/Modules/Settings/ControllersLogic/UpdateLockLogic.php b/app/Classes/Modules/KeyValuePairs/ControllersLogic/UpdateLockLogic.php
similarity index 88%
rename from app/Classes/Modules/Settings/ControllersLogic/UpdateLockLogic.php
rename to app/Classes/Modules/KeyValuePairs/ControllersLogic/UpdateLockLogic.php
index c131ea62..85c98e8a 100644
--- a/app/Classes/Modules/Settings/ControllersLogic/UpdateLockLogic.php
+++ b/app/Classes/Modules/KeyValuePairs/ControllersLogic/UpdateLockLogic.php
@@ -1,13 +1,13 @@
input('key');
$kvp = KeyValuePair::whereNull('owner_type')
->whereNull('owner_id')
diff --git a/app/Classes/Modules/Accounts/DataTransferObjects/KeyValuePairObject.php b/app/Classes/Modules/KeyValuePairs/DataTransferObjects/KeyValuePairObject.php
similarity index 91%
rename from app/Classes/Modules/Accounts/DataTransferObjects/KeyValuePairObject.php
rename to app/Classes/Modules/KeyValuePairs/DataTransferObjects/KeyValuePairObject.php
index fd1eff49..29993692 100644
--- a/app/Classes/Modules/Accounts/DataTransferObjects/KeyValuePairObject.php
+++ b/app/Classes/Modules/KeyValuePairs/DataTransferObjects/KeyValuePairObject.php
@@ -1,6 +1,6 @@
key = $object->getKey();
- $model->value = $object->getValue();
-
- // Owner-less
- if (is_null($kv)) {
- $model->owner_type = null;
- $model->owner_id = null;
- $model->save();
- return $model;
- }
-
- return $this->handler($kv->attributesKVP(), $model);
- }
-}
diff --git a/app/Classes/Modules/Settings/Services/FetchesKeyValuePair.php b/app/Classes/Modules/Settings/Services/FetchesKeyValuePair.php
deleted file mode 100644
index 0ba19b84..00000000
--- a/app/Classes/Modules/Settings/Services/FetchesKeyValuePair.php
+++ /dev/null
@@ -1,34 +0,0 @@
-repository = $repository;
- }
-
-
- /**
- * @return Builder
- */
- public function getRepository(): Builder
- {
- return $this->repository->newQuery();
- }
-}
diff --git a/app/Classes/Modules/Settings/Services/ListsKeyValuePairs.php b/app/Classes/Modules/Settings/Services/ListsKeyValuePairs.php
deleted file mode 100644
index 4abd5086..00000000
--- a/app/Classes/Modules/Settings/Services/ListsKeyValuePairs.php
+++ /dev/null
@@ -1,34 +0,0 @@
-repository = $repository;
- }
-
-
- /**
- * @return Builder
- */
- function getRepository(): Builder
- {
- return $this->repository->newQuery();
- }
-}
diff --git a/app/Classes/Modules/Transactions/ControllersLogic/CreatePaymentProofDocumentLogic.php b/app/Classes/Modules/Transactions/ControllersLogic/CreatePaymentProofDocumentLogic.php
index 412d88ab..99287195 100644
--- a/app/Classes/Modules/Transactions/ControllersLogic/CreatePaymentProofDocumentLogic.php
+++ b/app/Classes/Modules/Transactions/ControllersLogic/CreatePaymentProofDocumentLogic.php
@@ -99,9 +99,9 @@ class CreatePaymentProofDocumentLogic extends AbstractControllerLogic
]
);
- //cief todo: Prototype Period Lock - Starts
- $this->updateOrCreateKeyValuePair($transaction->owner->booking, KVPKey::BOOKING_IS_LOCKED, 1);
- //cief todo: Prototype Period Lock - Ends
+ //cief todo: 110 - Prototype Period Lock - Starts
+ // $this->updateOrCreateKeyValuePair($transaction->owner->booking, KVPKey::BOOKING_IS_LOCKED, 1);
+ //cief todo: 110 - Prototype Period Lock - Ends
// send email to customer
// todo: a function to send a proof to the receipiant, they have to give us a email of the receipiant and also need to submiited purchase order
diff --git a/app/Classes/Modules/Transactions/ControllersLogic/UpdateRefundTransactionStatusLogic.php b/app/Classes/Modules/Transactions/ControllersLogic/UpdateRefundTransactionStatusLogic.php
index ff0ddc02..e4e4577c 100644
--- a/app/Classes/Modules/Transactions/ControllersLogic/UpdateRefundTransactionStatusLogic.php
+++ b/app/Classes/Modules/Transactions/ControllersLogic/UpdateRefundTransactionStatusLogic.php
@@ -24,9 +24,6 @@ class UpdateRefundTransactionStatusLogic extends AbstractControllerLogic
/** @var UpdateRefundTransactionStatusProcessor */
private $updateRefundTransactionStatusProcessor;
- /** @var CreateInvoiceTransactionV2Processor */
- private $createInvoiceTransactionV2Processor;
-
/**
* UpdateRefundTransactionStatusLogic constructor.
* @param UpdateRefundTransactionStatusProcessor $updateRefundTransactionStatusProcessor
diff --git a/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionV2Processor.php b/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionV2Processor.php
index f5425900..cad14d4a 100644
--- a/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionV2Processor.php
+++ b/app/Classes/Modules/Transactions/Processors/CreateInvoiceTransactionV2Processor.php
@@ -138,8 +138,8 @@ class CreateInvoiceTransactionV2Processor
->where('type', TransactionType::PURCHASE_ORDER)
->complete()
->first();
-
- if(!$purchaseOrder && $generateEInvoiceRefund){
+
+ if(!$purchaseOrder){
//was use for $generateEInvoiceRefund true
$purchaseOrder = $booking->transactions()
->where('type', TransactionType::PURCHASE_ORDER)
diff --git a/app/Classes/Modules/Vouchers/ControllersLogic/CreateVoucherLogic.php b/app/Classes/Modules/Vouchers/ControllersLogic/CreateVoucherLogic.php
index c6b702e3..698b99ac 100644
--- a/app/Classes/Modules/Vouchers/ControllersLogic/CreateVoucherLogic.php
+++ b/app/Classes/Modules/Vouchers/ControllersLogic/CreateVoucherLogic.php
@@ -16,12 +16,12 @@ use App\Classes\Modules\Vouchers\Services\CreatesVoucher;
use App\Classes\Modules\Vouchers\Services\FetchesVoucher;
use App\Classes\Modules\Vouchers\Services\UpdatesVoucherCampaign;
use App\Classes\Modules\Rewards\Services\CreatesUserReward;
-use App\Classes\Modules\Settings\Services\CreatesKeyValuePair;
-use App\Classes\Modules\Settings\Services\UpdatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\CreatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\UpdatesKeyValuePair;
use App\Classes\Modules\Vouchers\Standards\Rules\CanCreateVoucher;
use App\Classes\Modules\Vouchers\DataTransferObjects\ValidateVoucherifyVoucherObject;
use App\Classes\Modules\Vouchers\DataTransferObjects\CreateVoucherObject;
-use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
+use App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject;
use App\Classes\Modules\Vouchers\DataTransferObjects\VoucherCampaignObject;
use App\Classes\ValueObjects\Constants\RoleTypes;
use App\Classes\ValueObjects\Constants\Vouchers;
diff --git a/app/Classes/Modules/Wallets/Processors/CreditWalletProcessor.php b/app/Classes/Modules/Wallets/Processors/CreditWalletProcessor.php
index ef19d638..d2e376e1 100644
--- a/app/Classes/Modules/Wallets/Processors/CreditWalletProcessor.php
+++ b/app/Classes/Modules/Wallets/Processors/CreditWalletProcessor.php
@@ -2,7 +2,7 @@
namespace App\Classes\Modules\Wallets\Processors;
-use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
+use App\Classes\Modules\KeyValuePairs\DataTransferObjects\KeyValuePairObject;
use App\Models\Wallet;
use App\Models\Company;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
@@ -15,10 +15,11 @@ use App\Classes\Modules\Transactions\Services\CreatesTransaction;
use App\Classes\Modules\Wallets\DataTransferObjects\WalletObject;
use App\Classes\Modules\Transactions\DataTransferObjects\TransactionObject;
use App\Classes\Modules\Transactions\Services\GeneratesTransactionBillNumber;
-use App\Classes\Modules\Settings\Services\CreatesKeyValuePair;
-use App\Classes\Modules\Settings\Services\UpdatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\CreatesKeyValuePair;
+use App\Classes\Modules\KeyValuePairs\Services\UpdatesKeyValuePair;
use App\Classes\ValueObjects\Constants\KVPKey;
use App\Models\Transaction;
+use Illuminate\Support\Facades\Log;
class CreditWalletProcessor
{
diff --git a/app/Classes/ValueObjects/Constants/KVPKey.php b/app/Classes/ValueObjects/Constants/KVPKey.php
index 7d4a4463..66378049 100644
--- a/app/Classes/ValueObjects/Constants/KVPKey.php
+++ b/app/Classes/ValueObjects/Constants/KVPKey.php
@@ -24,6 +24,16 @@ class KVPKey
public const BOOKING_EINVOICE_ELIGIBLE = 'BOOKING_EINVOICE_ELIGIBLE';
+ public const AUTOCOUNT_DOCNO_SALES_DEPOSIT_BY_WALLET_OFFICIAL_RECEIPT = 'AUTOCOUNT_DOCNO_SALES_DEPOSIT_BY_WALLET_OR';
+
+ public const AUTOCOUNT_DOCNO_SALES_DEPOSIT_BY_WALLET_REFUND = 'AUTOCOUNT_DOCNO_SALES_DEPOSIT_BY_WALLET_RF';
+
+ public const CHATGPT_PROMPT_PREFIX = 'CHATGPT_PROMPT_';
+ public const CLAUDE_PROMPT_PREFIX = 'CLAUDE_PROMPT_';
+
+ public const BOOKING_AMOUNT_UPDATE = 'BOOKING_AMOUNT_UPDATE';
+
+
public const BOOKING_IS_LOCKED = 'BOOKING_IS_LOCKED';
public const UI_SUPPLIER_PAID_CURRENCY_ORDER_TAB_IS_LOCKED = 'UI_SUPPLIER_PAID_CURRENCY_ORDER_TAB_IS_LOCKED';
@@ -32,12 +42,4 @@ class KVPKey
public const UI_PAYMENTS_OPEN_CURRENCY_ORDERS_IS_LOCKED = 'UI_PAYMENTS_OPEN_CURRENCY_ORDERS_IS_LOCKED';
- public const AUTOCOUNT_DOCNO_SALES_DEPOSIT_BY_WALLET_OFFICIAL_RECEIPT = 'AUTOCOUNT_DOCNO_SALES_DEPOSIT_BY_WALLET_OR';
-
- public const AUTOCOUNT_DOCNO_SALES_DEPOSIT_BY_WALLET_REFUND = 'AUTOCOUNT_DOCNO_SALES_DEPOSIT_BY_WALLET_RF';
-
- public const BOOKING_AMOUNT_UPDATE = 'BOOKING_AMOUNT_UPDATE';
-
- public const CHATGPT_PROMPT_PREFIX = 'CHATGPT_PROMPT_';
- public const CLAUDE_PROMPT_PREFIX = 'CLAUDE_PROMPT_';
}
diff --git a/app/Http/Controllers/Accounts/CreateSystemUserController.php b/app/Http/Controllers/Accounts/CreateSystemUserController.php
index d2967be1..a0e5c810 100644
--- a/app/Http/Controllers/Accounts/CreateSystemUserController.php
+++ b/app/Http/Controllers/Accounts/CreateSystemUserController.php
@@ -9,7 +9,6 @@ use Illuminate\Http\Request;
class CreateSystemUserController
{
-
/**
* @param Request $request
* @param CreateSystemUserLogic $logic
diff --git a/app/Http/Controllers/Affiliate/CreateAffiliateController.php b/app/Http/Controllers/Affiliate/CreateAffiliateController.php
index 609bf463..9a0679c7 100644
--- a/app/Http/Controllers/Affiliate/CreateAffiliateController.php
+++ b/app/Http/Controllers/Affiliate/CreateAffiliateController.php
@@ -3,35 +3,21 @@
namespace App\Http\Controllers\Affiliate;
use App\Classes\Modules\Affiliate\ControllersLogic\CreateAffiliateLogic;
-use App\Http\Requests\CreateAffiliateRequest;
use App\Models\Affiliate;
use Illuminate\Http\JsonResponse;
+use Illuminate\Http\Request;
class CreateAffiliateController
{
/**
- * @param CreateAffiliateRequest $request
+ * @param Request $request
* @param CreateAffiliateLogic $logic
* @return JsonResponse
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
- public function create(CreateAffiliateRequest $request, CreateAffiliateLogic $logic): JsonResponse {
- $this->authorize('create', Affiliate::class);
- return $logic->execute($request);
- }
-
- /**
- * Authorize a given action for the current user.
- *
- * @param mixed $ability
- * @param mixed|array $arguments
- * @return \Illuminate\Auth\Access\Response
- *
- * @throws \Illuminate\Auth\Access\AuthorizationException
- */
- public function authorize($ability, $arguments = [])
+ public function create(Request $request, CreateAffiliateLogic $logic): JsonResponse
{
- return app(\Illuminate\Contracts\Auth\Access\Gate::class)->authorize($ability, $arguments);
+ return $logic->execute($request);
}
}
diff --git a/app/Http/Controllers/Settings/CreateLockController.php b/app/Http/Controllers/KeyValuePairs/CreateLockController.php
similarity index 74%
rename from app/Http/Controllers/Settings/CreateLockController.php
rename to app/Http/Controllers/KeyValuePairs/CreateLockController.php
index 89f13f31..5d9c2635 100644
--- a/app/Http/Controllers/Settings/CreateLockController.php
+++ b/app/Http/Controllers/KeyValuePairs/CreateLockController.php
@@ -1,8 +1,8 @@
execute($request);
}
+
+ /**
+ * @param Request $request
+ * @param CheckTransferPeriodLockRuleLogic $logic
+ * @return JsonResponse
+ */
+ public function checkTransferPeriodLockRule(Request $request, CheckTransferPeriodLockRuleLogic $logic): JsonResponse {
+ return $logic->execute($request);
+ }
}
diff --git a/app/Http/Requests/CreateAffiliateRequest.php b/app/Http/Requests/CreateAffiliateRequest.php
index f655794f..babdadf6 100644
--- a/app/Http/Requests/CreateAffiliateRequest.php
+++ b/app/Http/Requests/CreateAffiliateRequest.php
@@ -31,7 +31,6 @@ class CreateAffiliateRequest extends FormRequest
'min:3',
'max:255',
'regex:/^[a-zA-Z0-9_-]+$/',
- 'unique:affiliates,code,NULL,id,deleted_at,NULL'
],
'campaign_name' => 'required|string|max:255',
'campaign_description' => 'nullable|string|max:65535',
diff --git a/resources/assets/images/cief_e_invoice.webp b/resources/assets/images/cief_e_invoice.webp
new file mode 100644
index 00000000..4ae3024a
Binary files /dev/null and b/resources/assets/images/cief_e_invoice.webp differ
diff --git a/resources/assets/images/normal_invoice.webp b/resources/assets/images/normal_invoice.webp
new file mode 100644
index 00000000..100e95e3
Binary files /dev/null and b/resources/assets/images/normal_invoice.webp differ
diff --git a/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue b/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue
index 63771a9f..f971b56e 100644
--- a/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue
+++ b/resources/assets/vue/components/accounts/forms/RegistrationFormComponent.vue
@@ -205,7 +205,9 @@
},
submitForm(){
- this.step === 2 ? this.submit(this.route('api.account.registration.register'), 'post', 'registrationSection', false, false) : this.changeStep('next');
+ const urlParams = new URLSearchParams(window.location.search);
+ const tracking = urlParams.get('tracking');
+ this.step === 2 ? this.submit(this.route('api.account.registration.register') + (tracking ? '?tracking=' + tracking : ''), 'post', 'registrationSection', false, false) : this.changeStep('next');
},
successHandler(response){
// fire to gtag manager for fb pixel tracking: CompleteRegistration
diff --git a/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue b/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue
index 35281a85..5bce1293 100644
--- a/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue
+++ b/resources/assets/vue/components/bookings/forms/PurchaseOrderFormComponent.vue
@@ -195,7 +195,7 @@
比WorldFirst更简单 • 无需Alipay • 完整E-invoice • 24小时开通
+
+ 💡 特别提醒:
+ 如果您已经在用WorldFirst等汇款平台,但缺少货物明细发票,
+ 欢迎切换到CIEF子账号模式,获得完整的E-invoice!
+
+ 🕐 客服时间:周一至周五 9:00 AM - 6:00 PM(马来西亚时间)
+ 📍 马来西亚第一家线上系统全自动操作 | 10年中马货代经验
+
No Alipay Required • Official Certified • Complete Itemized E-invoice • Compliant with 2026 E-invoice Requirements
+ +
+ CIEF Sub-Account's Unique Advantages:
+
+ • We provide exclusive sub-accounts, no need to register 1688 yourself
+ • No Alipay account or identity verification required
+ • Provides complete itemized goods E-invoice
+ • Direct stock-in for accounting, meets audit requirements
+
+
+ Exclusive Sub-Account Model: Complete E-invoice + Zero Alipay Risk +
+ +
+ One-Stop Solution
+ • Provides exclusive 1688 sub-account, no self-registration required
+ • No Alipay account or identity verification needed
+ • Provides complete itemized goods invoice (stock-in capable)
+ • Complies with 2026 E-invoice audit requirements
+ • Includes payment + logistics + customs clearance full service
+ • Local team with Chinese/English/Malay support
+
+ If your business requires:
+ ✅ Complete itemized goods E-invoice (compliant with 2026 E-invoice mandate)
+ ✅ Proper purchase invoice that can be stock-in for accounting
+ ✅ Documents approved by auditors
+ ✅ Convenient solution without opening Alipay
+ ✅ One-stop service (payment + logistics + customs)
+ Then CIEF's Sub-Account Payment + Trade Model is the ideal choice.
+
+ Since 2021, paying on 1688 has become increasingly difficult... +
+ ++ "My Alipay has payment limits. When the amount is slightly larger, it gets restricted, and I can't complete the payment..." ++
Issue: Alipay has limits on single transactions and daily payments, frequently restricting large purchases and affecting business operations.
++ "We used to be able to use bank transfers, but 1688 cancelled this option at the end of 2021, now it's completely unavailable..." ++
Issue: 1688 platform no longer accepts international bank transfers, old methods completely ineffective.
++ "I used a payment service to help with payments, but heard many people's Alipay accounts got frozen, money can't be retrieved..." ++
Issue: Surge in payment service demand led to mass account freezing, fund security becomes problematic.
++ "I paid the money, but only received a payment receipt without goods details. My accountant says it can't be entered in the books..." ++
Issue: Payment receipts only prove payment was made, not purchase invoices, cannot be stock-in or accounted for.
++ "My auditor reminded me that E-invoice will be mandatory in 2026, current receipt format may not be accepted..." ++
Issue: LHDN requires E-invoices to contain complete transaction details, simple receipts don't meet new regulations.
++ "My business is growing, but there are limits on each payment, need to split into multiple transfers, very troublesome..." ++
Issue: Many payment methods have transaction count and amount limits, affecting business expansion.
+
+ Traditional payment methods either cannot be used (bank transfer)
+ or have high risk (payment service freezing)
+ or have incomplete documentation (no proper invoice)
+
+ ↓ You Need a Brand New Solution ↓ +
++ What's the difference between a proper invoice vs a payment receipt? +
+ +
+
+ + Accountants need to know what goods you purchased to properly categorize entries. Receipts with only amounts cannot meet accounting standards. +
++ Stock-in systems require goods details to enter inventory. Without item names, quantities, and unit prices, cannot operate in the system. +
++ Auditors need to see the correspondence between goods and payments. Payment receipts only prove "payment made", cannot prove "what was purchased". +
++ LHDN explicitly requires E-invoices to contain complete transaction information. Simple payment receipts don't meet government's 2026 new regulations. +
++ Detailed goods information allows tracing of each transaction. When problems arise, there's documentation, reducing business risk. +
++ Complete purchase records help you analyze which products sell well, which suppliers are reliable, making better business decisions. +
+
+ "Our company used payment receipts for accounting for over a year. During last year's audit, we were asked to supplement complete purchase invoices.
+ Because we couldn't produce goods details, not only did we have to reorganize all documents, we were also fined.
+ Since then, we only use invoices with complete goods details."
+ — Lesson learned from an e-commerce company owner
+
+ Trade Model = Real Trading = Complete E-invoice +
+ +You only need a CIEF Exchange account, our system will help you complete payments on 1688 platform. No need for Chinese bank account, no identity verification required.
+We use trade model, not payment service. All transactions are legal and compliant, absolutely no account freezing issues.
+Because it's real trade (we purchase then sell to you), the invoice contains complete goods information: item names, quantities, unit prices, totals, all itemized.
+Our E-invoices have been verified by Malaysian accounting firms, meet LHDN requirements, can be directly stock-in and accounted for, passes audit.
+No limit on order quantity, no transfer amount limit, no payment frequency limit. As your business grows, our service keeps up.
+Malaysia's first fully automated online system, all transaction records automatically saved, can download invoices and purchase orders anytime.
++ Exclusive Sub-Account Model, Simple and Convenient +
+ +Register on CIEF Exchange
Activate account
Submit identity verification
Contact customer service
Receive exclusive
1688 sub-account within 24 hours
Use our sub-account
Browse and order on 1688
Choose "Payment"
Pay MYR to CIEF
Calculate by real-time rate
Transparent and open
CIEF main account
Pays for you uniformly
Completed within 1 working day
Auto-generate E-invoice
Complete goods details
Direct stock-in capability
Based on real buying and selling transactions, not just payment receipts
+Item names, specifications, quantities, unit prices, all itemized
+Meets accounting standards, can directly stock-in for accounting
+Complete transaction records, auditor approved
+Meets LHDN E-invoice new regulation requirements
+Trade model + preferential rates, high cost-effectiveness
+Payment + procurement + logistics + invoice, all-inclusive
+Malaysia's first fully automated online system operation
+
+ A: We provide 1688 exclusive sub-account for your use. You use this sub-account to place orders on 1688, then our main account pays for you uniformly.
+ Core Advantages:
+ • You don't need to register 1688 account yourself
+ • No need for Alipay account or identity verification
+ • Our main account is official corporate account, safe and reliable
+ • Provides complete itemized goods E-invoice
+ Simply put: We provide the account, you just place orders, we pay for you and provide official invoice.
+
+ A: CIEF sub-account payment is especially suitable for businesses requiring complete financial documents:
+ ✅ Complete itemized goods E-invoice (compliant with 2026 E-invoice mandate)
+ ✅ Proper purchase invoice that can be stock-in (accountant approved)
+ ✅ Documents that pass audit (complete transaction records)
+ ✅ Zero Alipay risk (no account opening or identity verification)
+ ✅ One-stop service (payment + logistics + customs)
+ ✅ Local team support (Chinese/English/Malay)
+ We use trade model, purchasing from Chinese suppliers then selling to you, thus able to provide complete itemized goods invoice, which remittance services cannot do.
+
+ A: This is the essence of business model:
+ Remittance Platform Model:
+ • Only responsible for fund transfer
+ • Customers purchase directly from Chinese suppliers
+ • Can only provide payment receipt
+ If your import volume is large, full container purchase, and your company meets import qualifications, then using yourself as consignee/importer, choosing remittance platform is a very suitable option.
+ CIEF Trade Model:
+ • We are trading company, purchasing from China then selling to you
+ • This is real buying and selling transaction
+ • We issue sales invoice, naturally including goods details
+ Analogy: Remittance platform is like a bank (helps you transfer money), CIEF is like purchasing agent (buys goods to sell to you).
+
+ A: Very important! Especially from 2026 onwards, Malaysia will fully implement E-invoice.
+ Accounting Needs:
+ • Must have goods details when stock-in to inventory
+ • Receipts with only amounts cannot be operated in system
+ Audit Requirements:
+ • Auditors need to see correspondence between goods and payments
+ • Payment receipts only prove "payment made", cannot prove "what was purchased"
+ 2026 LHDN New Rules:
+ • E-invoices must contain complete transaction information
+ • Simple payment receipts don't meet new regulations
+ Many clients had to supplement documents during audit due to lack of proper invoices, some were even fined.
+
+ A: Completed within 24 hours!
+ Process:
+ 1. Register account at https://exchange.cief-malaysia.com/
+ 2. Contact customer service via WhatsApp "I want to apply for 1688 sub-account"
+ 3. Provide registered email on Exchange, company name, imported goods, estimated monthly purchase volume (RMB)
+ 4. Customer service opens exclusive sub-account within 24 hours
+ 5. Start using after receiving login credentials
+ Very fast and simple!
+
+ A: No limits!
+ • Minimum transaction: CNY 1
+ • Maximum amount: Unlimited
+ • Order quantity: Unlimited
+ • Payment frequency: Unlimited
+ As your business grows, our service keeps up completely.
+
+ A: CIEF is one-stop China-Malaysia trade service:
+ Payment Services:
+ • 1688 sub-account payment
+ • RMB transfer (personal/corporate account)
+ • USD transfer
+ • Alipay transfer
+ Logistics Services:
+ • Sea freight LCL (direct/consolidation/tax refund)
+ • Air freight
+ • Full Container Load (FCL)
+ • Customs declaration and clearance
+ From payment to receiving goods, we handle everything!
+
+ A: Suppliers only see orders and payments, won't affect your purchasing.
+ • Sub-account looks like normal 1688 account
+ • Suppliers receive normal orders and payments
+ • Won't affect prices or service
+ • Goods ship normally to warehouse address
+ The entire process is exactly the same as regular orders for suppliers.
+
+ CIEF is most suitable for the following businesses:
+ ✅ Businesses requiring complete itemized goods E-invoice
+ ✅ Need to comply with 2026 E-invoice mandate
+ ✅ Don't want to open Alipay account (or cannot)
+ ✅ Need one-stop service (payment + logistics + customs)
+ ✅ Value local team support and Chinese service
+ ✅ Want zero account freezing risk safe solution
+ ✅ Need purchase invoice that can directly stock-in
+ If any of the above points match your needs, CIEF is the ideal choice!
+
No Alipay Required • Complete E-invoice • One-Stop Service • 24-Hour Opening
+
+ 💡 Special Reminder:
+ If you currently use other payment methods but lack itemized goods invoice,
+ welcome to switch to CIEF sub-account model, get complete E-invoice!
+
+ 🕐 Customer Service Hours: Monday to Friday 9:00 AM - 6:00 PM (Malaysia Time)
+ 📍 Malaysia's First Fully Automated Online System Operation | 10 Years China-Malaysia Freight Experience
+
No Alipay Required • Official Certified • Complete Itemized E-invoice • Compliant with 2026 E-invoice Requirements
+ +
+ CIEF Sub-Account's Unique Advantages:
+
+ • We provide exclusive sub-accounts, no need to register 1688 yourself
+ • No Alipay account or identity verification required
+ • Provides complete itemized goods E-invoice
+ • Direct stock-in for accounting, meets audit requirements
+
+
+ Exclusive Sub-Account Model: Complete E-invoice + Zero Alipay Risk +
+ +
+ One-Stop Solution
+ • Provides exclusive 1688 sub-account, no self-registration required
+ • No Alipay account or identity verification needed
+ • Provides complete itemized goods invoice (stock-in capable)
+ • Complies with 2026 E-invoice audit requirements
+ • Includes payment + logistics + customs clearance full service
+ • Local team with Chinese/English/Malay support
+
+ If your business requires:
+ ✅ Complete itemized goods E-invoice (compliant with 2026 E-invoice mandate)
+ ✅ Proper purchase invoice that can be stock-in for accounting
+ ✅ Documents approved by auditors
+ ✅ Convenient solution without opening Alipay
+ ✅ One-stop service (payment + logistics + customs)
+ Then CIEF's Sub-Account Payment + Trade Model is the ideal choice.
+
+ Since 2021, paying on 1688 has become increasingly difficult... +
+ ++ "My Alipay has payment limits. When the amount is slightly larger, it gets restricted, and I can't complete the payment..." ++
Issue: Alipay has limits on single transactions and daily payments, frequently restricting large purchases and affecting business operations.
++ "We used to be able to use bank transfers, but 1688 cancelled this option at the end of 2021, now it's completely unavailable..." ++
Issue: 1688 platform no longer accepts international bank transfers, old methods completely ineffective.
++ "I used a payment service to help with payments, but heard many people's Alipay accounts got frozen, money can't be retrieved..." ++
Issue: Surge in payment service demand led to mass account freezing, fund security becomes problematic.
++ "I paid the money, but only received a payment receipt without goods details. My accountant says it can't be entered in the books..." ++
Issue: Payment receipts only prove payment was made, not purchase invoices, cannot be stock-in or accounted for.
++ "My auditor reminded me that E-invoice will be mandatory in 2026, current receipt format may not be accepted..." ++
Issue: LHDN requires E-invoices to contain complete transaction details, simple receipts don't meet new regulations.
++ "My business is growing, but there are limits on each payment, need to split into multiple transfers, very troublesome..." ++
Issue: Many payment methods have transaction count and amount limits, affecting business expansion.
+
+ Traditional payment methods either cannot be used (bank transfer)
+ or have high risk (payment service freezing)
+ or have incomplete documentation (no proper invoice)
+
+ ↓ You Need a Brand New Solution ↓ +
++ What's the difference between a proper invoice vs a payment receipt? +
+ +
+
+ + Accountants need to know what goods you purchased to properly categorize entries. Receipts with only amounts cannot meet accounting standards. +
++ Stock-in systems require goods details to enter inventory. Without item names, quantities, and unit prices, cannot operate in the system. +
++ Auditors need to see the correspondence between goods and payments. Payment receipts only prove "payment made", cannot prove "what was purchased". +
++ LHDN explicitly requires E-invoices to contain complete transaction information. Simple payment receipts don't meet government's 2026 new regulations. +
++ Detailed goods information allows tracing of each transaction. When problems arise, there's documentation, reducing business risk. +
++ Complete purchase records help you analyze which products sell well, which suppliers are reliable, making better business decisions. +
+
+ "Our company used payment receipts for accounting for over a year. During last year's audit, we were asked to supplement complete purchase invoices.
+ Because we couldn't produce goods details, not only did we have to reorganize all documents, we were also fined.
+ Since then, we only use invoices with complete goods details."
+ — Lesson learned from an e-commerce company owner
+
+ Trade Model = Real Trading = Complete E-invoice +
+ +You only need a CIEF Exchange account, our system will help you complete payments on 1688 platform. No need for Chinese bank account, no identity verification required.
+We use trade model, not payment service. All transactions are legal and compliant, absolutely no account freezing issues.
+Because it's real trade (we purchase then sell to you), the invoice contains complete goods information: item names, quantities, unit prices, totals, all itemized.
+Our E-invoices have been verified by Malaysian accounting firms, meet LHDN requirements, can be directly stock-in and accounted for, passes audit.
+No limit on order quantity, no transfer amount limit, no payment frequency limit. As your business grows, our service keeps up.
+Malaysia's first fully automated online system, all transaction records automatically saved, can download invoices and purchase orders anytime.
++ Exclusive Sub-Account Model, Simple and Convenient +
+ +Register on CIEF Exchange
Activate account
Submit identity verification
Contact customer service
Receive exclusive
1688 sub-account within 24 hours
Use our sub-account
Browse and order on 1688
Choose "Payment"
Pay MYR to CIEF
Calculate by real-time rate
Transparent and open
CIEF main account
Pays for you uniformly
Completed within 1 working day
Auto-generate E-invoice
Complete goods details
Direct stock-in capability
Based on real buying and selling transactions, not just payment receipts
+Item names, specifications, quantities, unit prices, all itemized
+Meets accounting standards, can directly stock-in for accounting
+Complete transaction records, auditor approved
+Meets LHDN E-invoice new regulation requirements
+Trade model + preferential rates, high cost-effectiveness
+Payment + procurement + logistics + invoice, all-inclusive
+Malaysia's first fully automated online system operation
+
+ A: We provide 1688 exclusive sub-account for your use. You use this sub-account to place orders on 1688, then our main account pays for you uniformly.
+ Core Advantages:
+ • You don't need to register 1688 account yourself
+ • No need for Alipay account or identity verification
+ • Our main account is official corporate account, safe and reliable
+ • Provides complete itemized goods E-invoice
+ Simply put: We provide the account, you just place orders, we pay for you and provide official invoice.
+
+ A: CIEF sub-account payment is especially suitable for businesses requiring complete financial documents:
+ ✅ Complete itemized goods E-invoice (compliant with 2026 E-invoice mandate)
+ ✅ Proper purchase invoice that can be stock-in (accountant approved)
+ ✅ Documents that pass audit (complete transaction records)
+ ✅ Zero Alipay risk (no account opening or identity verification)
+ ✅ One-stop service (payment + logistics + customs)
+ ✅ Local team support (Chinese/English/Malay)
+ We use trade model, purchasing from Chinese suppliers then selling to you, thus able to provide complete itemized goods invoice, which remittance services cannot do.
+
+ A: This is the essence of business model:
+ Remittance Platform Model:
+ • Only responsible for fund transfer
+ • Customers purchase directly from Chinese suppliers
+ • Can only provide payment receipt
+ If your import volume is large, full container purchase, and your company meets import qualifications, then using yourself as consignee/importer, choosing remittance platform is a very suitable option.
+ CIEF Trade Model:
+ • We are trading company, purchasing from China then selling to you
+ • This is real buying and selling transaction
+ • We issue sales invoice, naturally including goods details
+ Analogy: Remittance platform is like a bank (helps you transfer money), CIEF is like purchasing agent (buys goods to sell to you).
+
+ A: Very important! Especially from 2026 onwards, Malaysia will fully implement E-invoice.
+ Accounting Needs:
+ • Must have goods details when stock-in to inventory
+ • Receipts with only amounts cannot be operated in system
+ Audit Requirements:
+ • Auditors need to see correspondence between goods and payments
+ • Payment receipts only prove "payment made", cannot prove "what was purchased"
+ 2026 LHDN New Rules:
+ • E-invoices must contain complete transaction information
+ • Simple payment receipts don't meet new regulations
+ Many clients had to supplement documents during audit due to lack of proper invoices, some were even fined.
+
+ A: Completed within 24 hours!
+ Process:
+ 1. Register account at https://exchange.cief-malaysia.com/
+ 2. Contact customer service via WhatsApp "I want to apply for 1688 sub-account"
+ 3. Provide registered email on Exchange, company name, imported goods, estimated monthly purchase volume (RMB)
+ 4. Customer service opens exclusive sub-account within 24 hours
+ 5. Start using after receiving login credentials
+ Very fast and simple!
+
+ A: No limits!
+ • Minimum transaction: CNY 1
+ • Maximum amount: Unlimited
+ • Order quantity: Unlimited
+ • Payment frequency: Unlimited
+ As your business grows, our service keeps up completely.
+
+ A: CIEF is one-stop China-Malaysia trade service:
+ Payment Services:
+ • 1688 sub-account payment
+ • RMB transfer (personal/corporate account)
+ • USD transfer
+ • Alipay transfer
+ Logistics Services:
+ • Sea freight LCL (direct/consolidation/tax refund)
+ • Air freight
+ • Full Container Load (FCL)
+ • Customs declaration and clearance
+ From payment to receiving goods, we handle everything!
+
+ A: Suppliers only see orders and payments, won't affect your purchasing.
+ • Sub-account looks like normal 1688 account
+ • Suppliers receive normal orders and payments
+ • Won't affect prices or service
+ • Goods ship normally to warehouse address
+ The entire process is exactly the same as regular orders for suppliers.
+
+ CIEF is most suitable for the following businesses:
+ ✅ Businesses requiring complete itemized goods E-invoice
+ ✅ Need to comply with 2026 E-invoice mandate
+ ✅ Don't want to open Alipay account (or cannot)
+ ✅ Need one-stop service (payment + logistics + customs)
+ ✅ Value local team support and Chinese service
+ ✅ Want zero account freezing risk safe solution
+ ✅ Need purchase invoice that can directly stock-in
+ If any of the above points match your needs, CIEF is the ideal choice!
+
No Alipay Required • Complete E-invoice • One-Stop Service • 24-Hour Opening
+
+ 💡 Special Reminder:
+ If you currently use other payment methods but lack itemized goods invoice,
+ welcome to switch to CIEF sub-account model, get complete E-invoice!
+
+ 🕐 Customer Service Hours: Monday to Friday 9:00 AM - 6:00 PM (Malaysia Time)
+ 📍 Malaysia's First Fully Automated Online System Operation | 10 Years China-Malaysia Freight Experience
+