Bladeren bron

Refactoring services #885

refactoring
Guillaume 1 jaar geleden
bovenliggende
commit
8b9984b3cd
100 gewijzigde bestanden met toevoegingen van 501 en 468 verwijderingen
  1. +1
    -5
      backend/controllers/AccessController.php
  2. +3
    -3
      backend/controllers/BackendController.php
  3. +1
    -1
      backend/controllers/CommunicateAdminController.php
  4. +10
    -6
      backend/controllers/CronController.php
  5. +1
    -3
      backend/controllers/DeliveryNoteController.php
  6. +11
    -14
      backend/controllers/DistributionController.php
  7. +9
    -8
      backend/controllers/DocumentController.php
  8. +2
    -3
      backend/controllers/InvoiceController.php
  9. +14
    -14
      backend/controllers/OrderController.php
  10. +5
    -5
      backend/controllers/PointSaleController.php
  11. +3
    -3
      backend/controllers/ProducerAdminController.php
  12. +2
    -2
      backend/controllers/ProducerController.php
  13. +1
    -1
      backend/controllers/ProducerPriceRangeAdminController.php
  14. +2
    -2
      backend/controllers/ProductCategoryController.php
  15. +8
    -8
      backend/controllers/ProductController.php
  16. +2
    -2
      backend/controllers/QuotationController.php
  17. +0
    -1
      backend/controllers/ReportController.php
  18. +5
    -5
      backend/controllers/SiteController.php
  19. +0
    -1
      backend/controllers/StatsController.php
  20. +2
    -2
      backend/controllers/SubscriptionController.php
  21. +7
    -8
      backend/controllers/UserController.php
  22. +2
    -2
      backend/controllers/UserGroupController.php
  23. +3
    -3
      backend/views/layouts/header.php
  24. +6
    -5
      common/components/ActiveRecordCommon.php
  25. +1
    -24
      common/components/BusinessLogic.php
  26. +46
    -46
      common/components/BusinessLogicTrait.php
  27. +1
    -1
      common/config/main.php
  28. +1
    -1
      common/controllers/CommonController.php
  29. +2
    -2
      common/forms/LoginForm.php
  30. +2
    -2
      common/helpers/GlobalParam.php
  31. +7
    -3
      common/helpers/Tiller.php
  32. +11
    -0
      common/logic/Distribution/Distribution/Event/DistributionActiveEvent.php
  33. +6
    -6
      common/logic/Distribution/Distribution/Model/Distribution.php
  34. +8
    -6
      common/logic/Distribution/Distribution/Repository/DistributionRepository.php
  35. +1
    -1
      common/logic/Distribution/Distribution/Repository/DistributionRepositoryQuery.php
  36. +17
    -16
      common/logic/Distribution/Distribution/Service/DistributionBuilder.php
  37. +2
    -1
      common/logic/Distribution/Distribution/Service/DistributionSolver.php
  38. +5
    -1
      common/logic/Distribution/Distribution/Wrapper/DistributionContainer.php
  39. +4
    -0
      common/logic/Distribution/Distribution/Wrapper/DistributionManager.php
  40. +2
    -2
      common/logic/Distribution/PointSaleDistribution/Model/PointSaleDistribution.php
  41. +3
    -2
      common/logic/Distribution/PointSaleDistribution/Repository/PointSaleDistributionRepository.php
  42. +1
    -1
      common/logic/Distribution/PointSaleDistribution/Repository/PointSaleDistributionRepositoryQuery.php
  43. +7
    -6
      common/logic/Distribution/PointSaleDistribution/Service/PointSaleDistributionBuilder.php
  44. +4
    -1
      common/logic/Distribution/PointSaleDistribution/Wrapper/PointSaleDistributionContainer.php
  45. +3
    -1
      common/logic/Distribution/PointSaleDistribution/Wrapper/PointSaleDistributionManager.php
  46. +2
    -2
      common/logic/Distribution/ProductDistribution/Model/ProductDistribution.php
  47. +3
    -2
      common/logic/Distribution/ProductDistribution/Repository/ProductDistributionRepository.php
  48. +1
    -1
      common/logic/Distribution/ProductDistribution/Repository/ProductDistributionRepositoryQuery.php
  49. +7
    -6
      common/logic/Distribution/ProductDistribution/Service/ProductDistributionBuilder.php
  50. +4
    -1
      common/logic/Distribution/ProductDistribution/Wrapper/ProductDistributionContainer.php
  51. +3
    -1
      common/logic/Distribution/ProductDistribution/Wrapper/ProductDistributionManager.php
  52. +1
    -1
      common/logic/Document/DeliveryNote/Model/DeliveryNote.php
  53. +2
    -2
      common/logic/Document/DeliveryNote/Model/DeliveryNoteSearch.php
  54. +2
    -1
      common/logic/Document/DeliveryNote/Repository/DeliveryNoteRepository.php
  55. +1
    -1
      common/logic/Document/DeliveryNote/Repository/DeliveryNoteRepositoryQuery.php
  56. +2
    -1
      common/logic/Document/DeliveryNote/Service/DeliveryNoteBuilder.php
  57. +2
    -1
      common/logic/Document/DeliveryNote/Service/DeliveryNoteSolver.php
  58. +4
    -1
      common/logic/Document/DeliveryNote/Wrapper/DeliveryNoteContainer.php
  59. +4
    -2
      common/logic/Document/DeliveryNote/Wrapper/DeliveryNoteManager.php
  60. +0
    -8
      common/logic/Document/Document/DocumentInterface.php
  61. +5
    -8
      common/logic/Document/Document/Model/Document.php
  62. +8
    -0
      common/logic/Document/Document/Model/DocumentInterface.php
  63. +4
    -2
      common/logic/Document/Document/Service/DocumentBuilder.php
  64. +3
    -1
      common/logic/Document/Document/Service/DocumentSolver.php
  65. +5
    -4
      common/logic/Document/Document/Service/DocumentUtils.php
  66. +5
    -1
      common/logic/Document/Document/Wrapper/DocumentContainer.php
  67. +1
    -1
      common/logic/Document/Document/Wrapper/DocumentManager.php
  68. +0
    -17
      common/logic/Document/Invoice/InvoiceManager.php
  69. +2
    -2
      common/logic/Document/Invoice/Model/Invoice.php
  70. +2
    -2
      common/logic/Document/Invoice/Model/InvoiceSearch.php
  71. +2
    -1
      common/logic/Document/Invoice/Repository/InvoiceRepository.php
  72. +1
    -1
      common/logic/Document/Invoice/Repository/InvoiceRepositoryQuery.php
  73. +3
    -2
      common/logic/Document/Invoice/Service/InvoiceBuilder.php
  74. +5
    -2
      common/logic/Document/Invoice/Wrapper/InvoiceContainer.php
  75. +19
    -0
      common/logic/Document/Invoice/Wrapper/InvoiceManager.php
  76. +2
    -2
      common/logic/Document/Quotation/Model/Quotation.php
  77. +2
    -2
      common/logic/Document/Quotation/Model/QuotationSearch.php
  78. +0
    -19
      common/logic/Document/Quotation/QuotationManager.php
  79. +2
    -2
      common/logic/Document/Quotation/Repository/QuotationRepository.php
  80. +1
    -1
      common/logic/Document/Quotation/Repository/QuotationRepositoryQuery.php
  81. +2
    -1
      common/logic/Document/Quotation/Service/QuotationBuilder.php
  82. +5
    -5
      common/logic/Document/Quotation/Wrapper/QuotationContainer.php
  83. +19
    -0
      common/logic/Document/Quotation/Wrapper/QuotationManager.php
  84. +11
    -11
      common/logic/Order/Order/Model/Order.php
  85. +2
    -1
      common/logic/Order/Order/Model/OrderSearch.php
  86. +0
    -27
      common/logic/Order/Order/OrderManager.php
  87. +12
    -10
      common/logic/Order/Order/Repository/OrderRepository.php
  88. +1
    -1
      common/logic/Order/Order/Repository/OrderRepositoryQuery.php
  89. +44
    -46
      common/logic/Order/Order/Service/OrderBuilder.php
  90. +14
    -17
      common/logic/Order/Order/Service/OrderSolver.php
  91. +1
    -1
      common/logic/Order/Order/Service/OrderUtils.php
  92. +6
    -1
      common/logic/Order/Order/Wrapper/OrderContainer.php
  93. +21
    -0
      common/logic/Order/Order/Wrapper/OrderManager.php
  94. +3
    -3
      common/logic/Order/OrderStatusHistory/Model/OrderStatusHistory.php
  95. +1
    -1
      common/logic/Order/OrderStatusHistory/Repository/OrderStatusHistoryRepository.php
  96. +1
    -1
      common/logic/Order/OrderStatusHistory/Repository/OrderStatusHistoryRepositoryQuery.php
  97. +5
    -4
      common/logic/Order/OrderStatusHistory/Service/OrderStatusHistoryBuilder.php
  98. +4
    -2
      common/logic/Order/OrderStatusHistory/Wrapper/OrderStatusHistoryContainer.php
  99. +3
    -2
      common/logic/Order/OrderStatusHistory/Wrapper/OrderStatusHistoryManager.php
  100. +2
    -3
      common/logic/Order/ProductOrder/Model/ProductOrder.php

+ 1
- 5
backend/controllers/AccessController.php Bestand weergeven

@@ -38,12 +38,8 @@

namespace backend\controllers;

use common\helpers\GlobalParam;
use backend\models\AccessUserProducerForm;
use common\logic\Document\DeliveryNote\DeliveryNoteManager;
use common\logic\Producer\Producer\ProducerManager;
use common\logic\User\User\User;
use common\logic\User\User\UserSearch;
use common\logic\User\User\Model\UserSearch;
use yii\filters\AccessControl;
use yii\filters\VerbFilter;


+ 3
- 3
backend/controllers/BackendController.php Bestand weergeven

@@ -38,10 +38,10 @@

namespace backend\controllers;

use common\logic\PointSale\PointSale\PointSale;
use common\logic\Producer\Producer\Producer;
use common\logic\Product\Product\Product;
use common\controllers\CommonController;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\Product\Product\Model\Product;

class BackendController extends CommonController
{

+ 1
- 1
backend/controllers/CommunicateAdminController.php Bestand weergeven

@@ -39,7 +39,7 @@
namespace backend\controllers;

use backend\models\MailForm;
use common\logic\User\User\User;
use common\logic\User\User\Model\User;
use yii\filters\AccessControl;
use yii\filters\VerbFilter;
use yii\web\NotFoundHttpException;

+ 10
- 6
backend/controllers/CronController.php Bestand weergeven

@@ -38,10 +38,10 @@

namespace backend\controllers;

use common\logic\Order\Order\Order;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\User\CreditHistory\CreditHistory;
use common\logic\User\User\User;
use common\logic\Order\Order\Model\Order;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\User\CreditHistory\Model\CreditHistory;
use common\logic\User\User\Model\User;
use Yii;
use yii\filters\VerbFilter;
use yii\filters\AccessControl;
@@ -85,8 +85,13 @@ class CronController extends BackendController
public function actionInitDemo($key = '')
{
if ($key == '45432df6e842ac71aa0b5bb6b9f25d44') {

$producerManager = $this->getProducerManager();
$distributionManager = $this->getDistributionManager();

$producer = $producerManager->findOneProducerDemoAccount();
$producerManager->setProducerContext($producer);
$distributionManager->setProducerContext($producer);

if ($producer) {
// initialisation de la distribution à J+7
@@ -102,8 +107,7 @@ class CronController extends BackendController
}

if ($activeDistribution) {
$distributionManager = $this->getDistributionManager();
$distribution = $distributionManager->createDistributionIfNotExist($producer, date('Y-m-d', $dateTime));
$distribution = $distributionManager->createDistributionIfNotExist(date('Y-m-d', $dateTime));
$distributionManager->activeDistribution($distribution);
}
}

+ 1
- 3
backend/controllers/DeliveryNoteController.php Bestand weergeven

@@ -38,12 +38,11 @@

namespace backend\controllers;

use common\logic\Document\DeliveryNote\DeliveryNoteSearch;
use common\logic\Document\DeliveryNote\Model\DeliveryNoteSearch;
use Yii;
use yii\filters\AccessControl;
use yii\filters\VerbFilter;


class DeliveryNoteController extends DocumentController
{
public function behaviors()
@@ -84,5 +83,4 @@ class DeliveryNoteController extends DocumentController
'dataProvider' => $dataProvider,
]);
}

}

+ 11
- 14
backend/controllers/DistributionController.php Bestand weergeven

@@ -44,23 +44,20 @@ use common\helpers\MeanPayment;
use common\helpers\Password;
use common\helpers\Price;
use common\helpers\Tiller;
use common\logic\Distribution\Distribution\Distribution;
use common\logic\Distribution\PointSaleDistribution\PointSaleDistribution;
use common\logic\Distribution\ProductDistribution\ProductDistribution;
use common\logic\Document\DeliveryNote\DeliveryNote;
use common\logic\Document\Document\Document;
use common\logic\Order\Order\Order;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\Product\Product\Product;
use common\logic\User\User\User;
use common\logic\User\UserProducer\UserProducer;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Document\DeliveryNote\Model\DeliveryNote;
use common\logic\Document\Document\Model\Document;
use common\logic\Order\Order\Model\Order;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\Product\Product\Model\Product;
use common\logic\User\UserProducer\Model\UserProducer;
use DateTime;
use kartik\mpdf\Pdf;
use yii\filters\AccessControl;
use yii\web\User;

class DistributionController extends BackendController
{

public function behaviors()
{
return [
@@ -168,7 +165,7 @@ class DistributionController extends BackendController
$json['distributions'] = $distributionsArray;

if ($dateObject && $dateObject->format($format) === $date) {
$distribution = $distributionManager->createDistributionIfNotExist($producer, $date);
$distribution = $distributionManager->createDistributionIfNotExist($date);
$json['distribution'] = [
'id' => $distribution->id,
'active' => $distribution->active,
@@ -1323,7 +1320,7 @@ class DistributionController extends BackendController
$format = 'Y-m-d';
$dateObject = DateTime::createFromFormat($format, $date);
if ($dateObject && $dateObject->format($format) === $date) {
$distribution = $distributionManager->createDistributionIfNotExist($producerCurrent, $date);
$distribution = $distributionManager->createDistributionIfNotExist($date);
}

if ($distribution) {
@@ -1718,7 +1715,7 @@ class DistributionController extends BackendController
$user = $userManager->findOneUserById($deliveryNote->id_user);
$userProducer = $userProducerManager->findOneUserProducer($user, $producerCurrent);
} else {
$user = new User;
$user = new User();
$user->type = User::TYPE_LEGAL_PERSON;
$user->name_legal_person = $firstOrder->pointSale->name;
$user->address = $firstOrder->pointSale->address;

+ 9
- 8
backend/controllers/DocumentController.php Bestand weergeven

@@ -40,18 +40,20 @@ namespace backend\controllers;

use common\helpers\CSV;
use common\helpers\GlobalParam;
use common\logic\Document\DeliveryNote\DeliveryNote;
use common\logic\Document\Document\Document;
use common\logic\Document\Invoice\Invoice;
use common\logic\Document\Quotation\Quotation;
use common\logic\Order\Order\Order;
use common\logic\Order\ProductOrder\ProductOrder;
use common\logic\Product\Product\Product;
use common\logic\Document\DeliveryNote\Model\DeliveryNote;
use common\logic\Document\Document\Model\Document;
use common\logic\Document\Invoice\Model\Invoice;
use common\logic\Document\Quotation\Model\Quotation;
use common\logic\Order\Order\Model\Order;
use common\logic\Order\ProductOrder\Model\ProductOrder;
use common\logic\Product\Product\Model\Product;
use kartik\mpdf\Pdf;
use yii\base\UserException;
use yii;
use yii\filters\VerbFilter;
use yii\filters\AccessControl;
use yii\web\NotFoundHttpException;
use yii\helpers\Html;

class DocumentController extends BackendController
{
@@ -789,5 +791,4 @@ class DocumentController extends BackendController
throw new NotFoundHttpException('The requested page does not exist.');
}
}

}

+ 2
- 3
backend/controllers/InvoiceController.php Bestand weergeven

@@ -38,9 +38,8 @@

namespace backend\controllers;

use common\logic\Document\Invoice\InvoiceSearch;
use common\logic\Order\Order\Order;
use Yii;
use common\logic\Document\Invoice\Model\InvoiceSearch;
use common\logic\Order\Order\Model\Order;

class InvoiceController extends DocumentController
{

+ 14
- 14
backend/controllers/OrderController.php Bestand weergeven

@@ -41,16 +41,16 @@ namespace backend\controllers;
use common\forms\SubscriptionForm;
use common\helpers\CSV;
use common\helpers\GlobalParam;
use common\logic\Distribution\Distribution\Distribution;
use common\logic\Distribution\PointSaleDistribution\PointSaleDistribution;
use common\logic\Distribution\ProductDistribution\ProductDistribution;
use common\logic\Order\Order\Order;
use common\logic\Order\ProductOrder\ProductOrder;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\Product\Product\Product;
use common\logic\User\CreditHistory\CreditHistory;
use common\logic\User\User\User;
use common\logic\User\UserProducer\UserProducer;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\PointSaleDistribution\Model\PointSaleDistribution;
use common\logic\Distribution\ProductDistribution\Model\ProductDistribution;
use common\logic\Order\Order\Model\Order;
use common\logic\Order\ProductOrder\Model\ProductOrder;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\Product\Product\Model\Product;
use common\logic\User\CreditHistory\Model\CreditHistory;
use common\logic\User\User\Model\User;
use common\logic\User\UserProducer\Model\UserProducer;
use yii\filters\AccessControl;
use yii\helpers\Html;

@@ -125,7 +125,7 @@ class OrderController extends BackendController
$date = \Yii::$app->getRequest()->post('date_order_point_sale_' . $point->id, 0);
$oneProduct = false;
foreach ($products as $product) {
$quantity = Yii::$app->getRequest()->post('product_point_sale_' . $point->id . '_' . $product->id, 0);
$quantity = \Yii::$app->getRequest()->post('product_point_sale_' . $point->id . '_' . $product->id, 0);
if ($quantity) {
$oneProduct = true;
}
@@ -144,7 +144,7 @@ class OrderController extends BackendController
foreach ($products as $product) {
$quantity = \Yii::$app->getRequest()->post('product_point_sale_' . $point->id . '_' . $product->id, 0);
if ($quantity) {
$productOrder = new ProductOrder;
$productOrder = new ProductOrder();
$productOrder->id_order = $order->id;
$productOrder->id_product = $product->id;
$productOrder->quantity = $quantity;
@@ -188,7 +188,7 @@ class OrderController extends BackendController
$arrayUsers[$user->id] = $user->name . ' ' . $user->lastname;
}

$distribution = $distributionManager->createDistributionIfNotExist($this->getProducerCurrent(), $date);
$distribution = $distributionManager->createDistributionIfNotExist($date);

if ($distribution) {
$arrayPointsSale = PointSale::find()
@@ -666,7 +666,7 @@ class OrderController extends BackendController
public function actionChangeState(string $date, bool $active, bool $redirect = true)
{
$distributionManager = $this->getDistributionManager();
$distribution = $distributionManager->createDistributionIfNotExist($this->getProducerCurrent(), $date);
$distribution = $distributionManager->createDistributionIfNotExist($date);
$distributionManager->activeDistribution($distribution, $active);

if ($redirect) {

+ 5
- 5
backend/controllers/PointSaleController.php Bestand weergeven

@@ -39,11 +39,11 @@
namespace backend\controllers;

use common\helpers\GlobalParam;
use common\logic\Distribution\PointSaleDistribution\PointSaleDistribution;
use common\logic\Order\Order\Order;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\PointSale\PointSale\PointSaleSearch;
use common\logic\PointSale\UserPointSale\UserPointSale;
use common\logic\Distribution\PointSaleDistribution\Model\PointSaleDistribution;
use common\logic\Order\Order\Model\Order;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\PointSale\PointSale\Model\PointSaleSearch;
use common\logic\PointSale\UserPointSale\Model\UserPointSale;
use Yii;
use yii\filters\AccessControl;
use yii\web\NotFoundHttpException;

+ 3
- 3
backend/controllers/ProducerAdminController.php Bestand weergeven

@@ -38,9 +38,9 @@

namespace backend\controllers;

use common\logic\Order\Order\Order;
use common\logic\Producer\Producer\Producer;
use common\logic\Product\Product\Product;
use common\logic\Order\Order\Model\Order;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\Product\Product\Model\Product;
use Yii;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;

+ 2
- 2
backend/controllers/ProducerController.php Bestand weergeven

@@ -39,8 +39,8 @@
namespace backend\controllers;

use common\helpers\GlobalParam;
use common\logic\Producer\Producer\Producer;
use common\logic\Producer\ProducerPriceRange\ProducerPriceRange;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\Producer\ProducerPriceRange\Model\ProducerPriceRange;
use Yii;
use yii\data\ActiveDataProvider;
use yii\web\NotFoundHttpException;

+ 1
- 1
backend/controllers/ProducerPriceRangeAdminController.php Bestand weergeven

@@ -38,7 +38,7 @@

namespace backend\controllers;

use common\logic\Producer\ProducerPriceRange\ProducerPriceRange;
use common\logic\Producer\ProducerPriceRange\Model\ProducerPriceRange;
use Yii;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;

+ 2
- 2
backend/controllers/ProductCategoryController.php Bestand weergeven

@@ -39,8 +39,8 @@
namespace backend\controllers;

use common\helpers\GlobalParam;
use common\logic\Product\Product\Product;
use common\logic\Product\ProductCategory\ProductCategorySearch;
use common\logic\Product\Product\Model\Product;
use common\logic\Product\ProductCategory\Model\ProductCategorySearch;
use Yii;
use yii\filters\AccessControl;
use yii\web\NotFoundHttpException;

+ 8
- 8
backend/controllers/ProductController.php Bestand weergeven

@@ -39,14 +39,14 @@
namespace backend\controllers;

use common\helpers\GlobalParam;
use common\logic\Distribution\ProductDistribution\ProductDistribution;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\Product\Product\Product;
use common\logic\Product\Product\ProductSearch;
use common\logic\Product\ProductPointSale\ProductPointSale;
use common\logic\Product\ProductPrice\ProductPrice;
use common\logic\Product\ProductPrice\ProductPriceSearch;
use common\logic\User\UserProducer\UserProducer;
use common\logic\Distribution\ProductDistribution\Model\ProductDistribution;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\Product\Product\Model\Product;
use common\logic\Product\Product\Model\ProductSearch;
use common\logic\Product\ProductPointSale\Model\ProductPointSale;
use common\logic\Product\ProductPrice\Model\ProductPrice;
use common\logic\Product\ProductPrice\Model\ProductPriceSearch;
use common\logic\User\UserProducer\Model\UserProducer;
use Yii;
use yii\filters\AccessControl;
use yii\helpers\Html;

+ 2
- 2
backend/controllers/QuotationController.php Bestand weergeven

@@ -39,8 +39,8 @@
namespace backend\controllers;

use common\helpers\GlobalParam;
use common\logic\Document\Quotation\QuotationSearch;
use common\logic\Order\Order\Order;
use common\logic\Document\Quotation\Model\QuotationSearch;
use common\logic\Order\Order\Model\Order;
use Yii;
use yii\base\UserException;
use yii\filters\AccessControl;

+ 0
- 1
backend/controllers/ReportController.php Bestand weergeven

@@ -40,7 +40,6 @@ namespace backend\controllers;

use common\helpers\GlobalParam;
use common\helpers\Price;
use common\logic\Distribution\Distribution\Distribution;
use Yii;
use yii\filters\AccessControl;


+ 5
- 5
backend/controllers/SiteController.php Bestand weergeven

@@ -39,11 +39,11 @@
namespace backend\controllers;

use common\helpers\GlobalParam;
use common\logic\Distribution\Distribution\Distribution;
use common\logic\Order\Order\Order;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\Product\Product\Product;
use common\logic\User\User\User;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Order\Order\Model\Order;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\Product\Product\Model\Product;
use common\logic\User\User\Model\User;
use Yii;
use yii\filters\AccessControl;
use common\forms\LoginForm;

+ 0
- 1
backend/controllers/StatsController.php Bestand weergeven

@@ -47,7 +47,6 @@ use DatePeriod;

class StatsController extends BackendController
{

public function behaviors()
{
return [

+ 2
- 2
backend/controllers/SubscriptionController.php Bestand weergeven

@@ -39,8 +39,8 @@ namespace backend\controllers;

use common\forms\SubscriptionForm;
use common\helpers\GlobalParam;
use common\logic\Product\Product\Product;
use common\logic\Subscription\Subscription\SubscriptionSearch;
use common\logic\Product\Product\Model\Product;
use common\logic\Subscription\Subscription\Model\SubscriptionSearch;
use yii\filters\AccessControl;
use yii\web\NotFoundHttpException;


+ 7
- 8
backend/controllers/UserController.php Bestand weergeven

@@ -43,14 +43,13 @@ use common\helpers\GlobalParam;
use common\helpers\Mailjet;
use backend\models\MailForm;
use common\helpers\Password;
use common\logic\Distribution\Distribution\Distribution;
use common\logic\Order\Order\OrderSearch;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\PointSale\UserPointSale\UserPointSale;
use common\logic\User\CreditHistory\CreditHistory;
use common\logic\User\User\UserSearch;
use common\logic\User\UserProducer\UserProducer;
use common\logic\User\UserUserGroup\UserUserGroup;
use common\logic\Order\Order\Model\OrderSearch;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\PointSale\UserPointSale\Model\UserPointSale;
use common\logic\User\CreditHistory\Model\CreditHistory;
use common\logic\User\User\Model\UserSearch;
use common\logic\User\UserProducer\Model\UserProducer;
use common\logic\User\UserUserGroup\Model\UserUserGroup;
use yii\base\UserException;
use yii\debug\models\search\User;
use yii\filters\AccessControl;

+ 2
- 2
backend/controllers/UserGroupController.php Bestand weergeven

@@ -39,8 +39,8 @@
namespace backend\controllers;

use common\helpers\GlobalParam;
use common\logic\User\UserGroup\UserGroupSearch;
use common\logic\User\UserUserGroup\UserUserGroup;
use common\logic\User\UserGroup\Model\UserGroupSearch;
use common\logic\User\UserUserGroup\Model\UserUserGroup;
use Yii;
use yii\filters\AccessControl;
use yii\web\NotFoundHttpException;

+ 3
- 3
backend/views/layouts/header.php Bestand weergeven

@@ -39,9 +39,9 @@
use yii\helpers\Html;
use common\helpers\GlobalParam;

use common\logic\Distribution\Distribution\Distribution;
use common\logic\Producer\Producer\Producer;
use common\logic\User\User\User;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\User\User\Model\User;

$userManager = $this->getUserManager();
$producerManager = $this->getProducerManager();

+ 6
- 5
common/components/ActiveRecordCommon.php Bestand weergeven

@@ -65,14 +65,14 @@ class ActiveRecordCommon extends \yii\db\ActiveRecord
public static function searchBy($params = [], $options = [])
{
$class = get_called_class();
$repositoryClass = $class.'Repository';
$repositoryClass = str_replace('\\Model\\', '\\Repository\\', $class).'Repository';
$repository = $repositoryClass::getInstance();

if (is_callable([$repositoryClass, 'getDefaultOptionsSearch'])) {
$repository = $repositoryClass::getInstance();
if(method_exists($repository , 'getDefaultOptionsSearch')) {
$default_options = $repository->getDefaultOptionsSearch();
} else {
throw new \ErrorException('La méthode "getDefaultOptionsSearch" n\'est '
. 'pas définie dans la classe "' . $class . '"');
. 'pas définie dans la classe "' . $repositoryClass . '"');
}

$options = array_merge($default_options, $options);
@@ -81,7 +81,8 @@ class ActiveRecordCommon extends \yii\db\ActiveRecord
$pk = $class::tableName() . '.' . $pk[0];

if (isset($options['attribute_id_producer']) && strlen($options['attribute_id_producer'])
&& !isset($params[$options['attribute_id_producer']]) && !\Yii::$app->user->isGuest) {
&& !isset($params[$options['attribute_id_producer']]) && !\Yii::$app->user->isGuest
) {
$params[$options['attribute_id_producer']] = GlobalParam::getCurrentProducerId();
}


+ 1
- 24
common/components/BusinessLogic.php Bestand weergeven

@@ -2,30 +2,7 @@

namespace common\components;

use common\logic\Config\TaxRate\TaxRateContainer;
use common\logic\Distribution\Distribution\DistributionContainer;
use common\logic\Distribution\PointSaleDistribution\PointSaleDistributionContainer;
use common\logic\Distribution\ProductDistribution\ProductDistributionContainer;
use common\logic\Document\Document\DocumentContainer;
use common\logic\Order\Order\OrderContainer;
use common\logic\Order\Order\OrderManager;
use common\logic\Order\OrderStatusHistory\OrderStatusHistoryContainer;
use common\logic\Order\ProductOrder\ProductOrderContainer;
use common\logic\PointSale\PointSale\PointSaleContainer;
use common\logic\Producer\Producer\Producer;
use common\logic\Producer\Producer\ProducerContainer;
use common\logic\Producer\ProducerPriceRange\ProducerPriceRangeContainer;
use common\logic\Product\Product\ProductContainer;
use common\logic\Product\ProductCategory\ProductCategoryContainer;
use common\logic\Product\ProductPointSale\ProductPointSaleContainer;
use common\logic\Product\ProductPrice\ProductPriceContainer;
use common\logic\Subscription\ProductSubscription\ProductSubscriptionContainer;
use common\logic\Subscription\Subscription\SubscriptionContainer;
use common\logic\User\CreditHistory\CreditHistoryContainer;
use common\logic\User\User\UserContainer;
use common\logic\User\UserGroup\UserGroupContainer;
use common\logic\User\UserProducer\UserProducerContainer;
use common\logic\User\UserUserGroup\UserUserGroupContainer;
use common\logic\Producer\Producer\Model\Producer;
use yii\base\ErrorException;

class BusinessLogic

+ 46
- 46
common/components/BusinessLogicTrait.php Bestand weergeven

@@ -4,53 +4,53 @@ namespace common\components;

use common\logic\Config\TaxRate\TaxRateContainer;
use common\logic\Config\TaxRate\TaxRateManager;
use common\logic\Distribution\Distribution\DistributionContainer;
use common\logic\Distribution\Distribution\DistributionManager;
use common\logic\Distribution\PointSaleDistribution\PointSaleDistributionContainer;
use common\logic\Distribution\PointSaleDistribution\PointSaleDistributionManager;
use common\logic\Distribution\ProductDistribution\ProductDistributionContainer;
use common\logic\Distribution\ProductDistribution\ProductDistributionManager;
use common\logic\Document\DeliveryNote\DeliveryNoteManager;
use common\logic\Document\Document\DocumentContainer;
use common\logic\Document\Document\DocumentManager;
use common\logic\Document\Invoice\InvoiceManager;
use common\logic\Document\Invoice\QuotationManager;
use common\logic\Order\Order\OrderContainer;
use common\logic\Order\Order\OrderManager;
use common\logic\Order\OrderStatusHistory\OrderStatusHistoryContainer;
use common\logic\Order\OrderStatusHistory\OrderStatusHistoryManager;
use common\logic\Order\ProductOrder\ProductOrderContainer;
use common\logic\Order\ProductOrder\ProductOrderManager;
use common\logic\PointSale\PointSale\PointSaleContainer;
use common\logic\PointSale\PointSale\PointSaleManager;
use common\logic\PointSale\UserPointSale\UserPointSaleContainer;
use common\logic\PointSale\UserPointSale\UserPointSaleManager;
use common\logic\Producer\Producer\ProducerContainer;
use common\logic\Producer\Producer\ProducerManager;
use common\logic\Producer\ProducerPriceRange\ProducerPriceRangeContainer;
use common\logic\Producer\ProducerPriceRange\ProducerPriceRangeManager;
use common\logic\Product\Product\ProductContainer;
use common\logic\Product\Product\ProductManager;
use common\logic\Product\ProductCategory\ProductCategoryContainer;
use common\logic\Product\ProductCategory\ProductCategoryManager;
use common\logic\Product\ProductPointSale\ProductPointSaleContainer;
use common\logic\Product\ProductPointSale\ProductPointSaleManager;
use common\logic\Product\ProductPrice\ProductPriceContainer;
use common\logic\Product\ProductPrice\ProductPriceManager;
use common\logic\Subscription\ProductSubscription\ProductSubscriptionContainer;
use common\logic\Subscription\ProductSubscription\ProductSubscriptionManager;
use common\logic\Subscription\Subscription\SubscriptionContainer;
use common\logic\Subscription\Subscription\SubscriptionManager;
use common\logic\User\CreditHistory\CreditHistoryContainer;
use common\logic\User\CreditHistory\CreditHistoryManager;
use common\logic\User\User\UserContainer;
use common\logic\User\User\UserManager;
use common\logic\User\UserGroup\UserGroupContainer;
use common\logic\User\UserGroup\UserGroupManager;
use common\logic\User\UserProducer\UserProducerContainer;
use common\logic\User\UserProducer\UserProducerManager;
use common\logic\User\UserUserGroup\UserUserGroupContainer;
use common\logic\User\UserUserGroup\UserUserGroupManager;
use common\logic\Distribution\Distribution\Wrapper\DistributionContainer;
use common\logic\Distribution\PointSaleDistribution\Wrapper\PointSaleDistributionContainer;
use common\logic\Distribution\PointSaleDistribution\Wrapper\PointSaleDistributionManager;
use common\logic\Distribution\ProductDistribution\Wrapper\ProductDistributionContainer;
use common\logic\Distribution\ProductDistribution\Wrapper\ProductDistributionManager;
use common\logic\Document\DeliveryNote\Wrapper\DeliveryNoteManager;
use common\logic\Document\Document\Wrapper\DocumentContainer;
use common\logic\Document\Document\Wrapper\DocumentManager;
use common\logic\Document\Invoice\Wrapper\InvoiceManager;
use common\logic\Document\Invoice\Wrapper\QuotationManager;
use common\logic\Order\Order\Wrapper\OrderContainer;
use common\logic\Order\Order\Wrapper\OrderManager;
use common\logic\Order\OrderStatusHistory\Wrapper\OrderStatusHistoryContainer;
use common\logic\Order\OrderStatusHistory\Wrapper\OrderStatusHistoryManager;
use common\logic\Order\ProductOrder\Wrapper\ProductOrderContainer;
use common\logic\Order\ProductOrder\Wrapper\ProductOrderManager;
use common\logic\PointSale\PointSale\Wrapper\PointSaleContainer;
use common\logic\PointSale\PointSale\Wrapper\PointSaleManager;
use common\logic\PointSale\UserPointSale\Wrapper\UserPointSaleContainer;
use common\logic\PointSale\UserPointSale\Wrapper\UserPointSaleManager;
use common\logic\Producer\Producer\Wrapper\ProducerContainer;
use common\logic\Producer\Producer\Wrapper\ProducerManager;
use common\logic\Producer\ProducerPriceRange\Wrapper\ProducerPriceRangeContainer;
use common\logic\Producer\ProducerPriceRange\Wrapper\ProducerPriceRangeManager;
use common\logic\Product\Product\Wrapper\ProductContainer;
use common\logic\Product\Product\Wrapper\ProductManager;
use common\logic\Product\ProductCategory\Wrapper\ProductCategoryContainer;
use common\logic\Product\ProductCategory\Wrapper\ProductCategoryManager;
use common\logic\Product\ProductPointSale\Wrapper\ProductPointSaleContainer;
use common\logic\Product\ProductPointSale\Wrapper\ProductPointSaleManager;
use common\logic\Product\ProductPrice\Wrapper\ProductPriceContainer;
use common\logic\Product\ProductPrice\Wrapper\ProductPriceManager;
use common\logic\Subscription\ProductSubscription\Wrapper\ProductSubscriptionContainer;
use common\logic\Subscription\ProductSubscription\Wrapper\ProductSubscriptionManager;
use common\logic\Subscription\Subscription\Wrapper\SubscriptionContainer;
use common\logic\Subscription\Subscription\Wrapper\SubscriptionManager;
use common\logic\User\CreditHistory\Wrapper\CreditHistoryContainer;
use common\logic\User\CreditHistory\Wrapper\CreditHistoryManager;
use common\logic\User\User\Wrapper\UserContainer;
use common\logic\User\User\Wrapper\UserManager;
use common\logic\User\UserGroup\Wrapper\UserGroupContainer;
use common\logic\User\UserGroup\Wrapper\UserGroupManager;
use common\logic\User\UserProducer\Wrapper\UserProducerContainer;
use common\logic\User\UserProducer\Wrapper\UserProducerManager;
use common\logic\User\UserUserGroup\Wrapper\UserUserGroupContainer;
use common\logic\User\UserUserGroup\Wrapper\UserUserGroupManager;

trait BusinessLogicTrait
{

+ 1
- 1
common/config/main.php Bestand weergeven

@@ -61,7 +61,7 @@ return [
],
'user' => [
'class' => 'yii\web\User',
'identityClass' => 'common\logic\User\User\User',
'identityClass' => 'common\logic\User\User\Model\User',
'enableAutoLogin' => true,
'identityCookie' => [
'name' => 'distrib',

+ 1
- 1
common/controllers/CommonController.php Bestand weergeven

@@ -40,7 +40,7 @@ namespace common\controllers;

use common\components\BusinessLogic;
use common\components\BusinessLogicTrait;
use common\logic\User\User\User;
use common\logic\User\User\Model\User;
use yii;

class CommonController extends \yii\web\Controller

+ 2
- 2
common/forms/LoginForm.php Bestand weergeven

@@ -38,8 +38,8 @@ termes.

namespace common\forms;

use common\logic\Producer\Producer\Producer;
use common\logic\User\User\User;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\User\User\Model\User;
use Yii;
use yii\base\Model;


+ 2
- 2
common/helpers/GlobalParam.php Bestand weergeven

@@ -38,8 +38,8 @@

namespace common\helpers;

use common\logic\Producer\Producer\Producer;
use common\logic\User\User\UserSolver;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\User\User\Service\UserSolver;

class GlobalParam
{

+ 7
- 3
common/helpers/Tiller.php Bestand weergeven

@@ -38,7 +38,9 @@

namespace common\helpers;

use common\logic\Order\Order\Order;
use common\logic\Producer\Producer\Producer;
use common\logic\Producer\Producer\ProducerManager;
use linslin\yii2\curl;

class Tiller
@@ -52,10 +54,12 @@ class Tiller

public function __construct()
{
$producerManager = ProducerManager::getInstance();

$this->curl = new curl\Curl();
$this->producer_tiller = Producer::getConfig('tiller');
$this->provider_token = Producer::getConfig('tiller_provider_token');
$this->restaurant_token = Producer::getConfig('tiller_restaurant_token');
$this->producer_tiller = $producerManager->getConfig('tiller');
$this->provider_token = $producerManager->getConfig('tiller_provider_token');
$this->restaurant_token = $producerManager->getConfig('tiller_restaurant_token');
}

public function getOrders($date)

+ 11
- 0
common/logic/Distribution/Distribution/Event/DistributionActiveEvent.php Bestand weergeven

@@ -0,0 +1,11 @@
<?php

namespace common\logic\Distribution\Distribution\Event;

use common\logic\Distribution\Distribution\Model\Distribution;
use yii\base\Event;

class DistributionActiveEvent extends Event
{
public Distribution $distribution;
}

common/logic/Distribution/Distribution/Distribution.php → common/logic/Distribution/Distribution/Model/Distribution.php Bestand weergeven

@@ -36,14 +36,14 @@
* termes.
*/

namespace common\logic\Distribution\Distribution;
namespace common\logic\Distribution\Distribution\Model;

use common\logic\Distribution\PointSaleDistribution\PointSaleDistribution;
use common\logic\Distribution\ProductDistribution\ProductDistribution;
use common\logic\Order\Order\Order;
use common\logic\Producer\Producer\Producer;
use common\components\ActiveRecordCommon;
use common\logic\Subscription\Subscription\SubscriptionEventSubscriber;
use common\logic\Distribution\PointSaleDistribution\Model\PointSaleDistribution;
use common\logic\Distribution\ProductDistribution\Model\ProductDistribution;
use common\logic\Order\Order\Model\Order;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\Subscription\Subscription\Event\SubscriptionEventSubscriber;

class Distribution extends ActiveRecordCommon
{

common/logic/Distribution/Distribution/DistributionRepository.php → common/logic/Distribution/Distribution/Repository/DistributionRepository.php Bestand weergeven

@@ -1,12 +1,14 @@
<?php

namespace common\logic\Distribution\Distribution;
namespace common\logic\Distribution\Distribution\Repository;

use common\helpers\GlobalParam;
use common\logic\AbstractRepository;
use common\logic\Producer\Producer\Producer;
use common\logic\Subscription\Subscription\Subscription;
use common\logic\Subscription\Subscription\SubscriptionSolver;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\Distribution\Service\DistributionSolver;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\Subscription\Subscription\Model\Subscription;
use common\logic\Subscription\Subscription\Service\SubscriptionSolver;

class DistributionRepository extends AbstractRepository
{
@@ -125,11 +127,11 @@ class DistributionRepository extends AbstractRepository

$incomingDistributions->params($params);
$incomingDistributionsArray = $incomingDistributions->all();
$this->subscriptionSolver->filterDistributionsByDateDelay($incomingDistributionsArray);
$this->distributionSolver->filterDistributionsByDateDelay($incomingDistributionsArray);

$matchedIncomingDistributionsArray = [];
foreach ($incomingDistributionsArray as $incomingDistribution) {
if ($this->subscriptionSolver->matchWith($subscription, $incomingDistribution->date)) {
if ($this->subscriptionSolver->isSubscriptionMatchWith($subscription, $incomingDistribution->date)) {
$matchedIncomingDistributionsArray[] = $incomingDistribution;
}
}

common/logic/Distribution/Distribution/DistributionRepositoryQuery.php → common/logic/Distribution/Distribution/Repository/DistributionRepositoryQuery.php Bestand weergeven

@@ -1,6 +1,6 @@
<?php

namespace common\logic\Distribution\Distribution;
namespace common\logic\Distribution\Distribution\Repository;

use common\logic\AbstractRepositoryQuery;


common/logic/Distribution/Distribution/DistributionBuilder.php → common/logic/Distribution/Distribution/Service/DistributionBuilder.php Bestand weergeven

@@ -1,22 +1,19 @@
<?php

namespace common\logic\Distribution\Distribution;
namespace common\logic\Distribution\Distribution\Service;

use common\logic\AbstractBuilder;
use common\logic\Distribution\PointSaleDistribution\PointSaleDistribution;
use common\logic\Distribution\PointSaleDistribution\PointSaleDistributionBuilder;
use common\logic\Distribution\PointSaleDistribution\PointSaleDistributionRepository;
use common\logic\Distribution\ProductDistribution\ProductDistribution;
use common\logic\Distribution\ProductDistribution\ProductDistributionBuilder;
use common\logic\Distribution\ProductDistribution\ProductDistributionRepository;
use common\logic\Order\Order\OrderRepository;
use common\logic\Order\ProductOrder\ProductOrderBuilder;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\Producer\Producer\Producer;
use common\logic\Product\Product\Product;
use common\logic\Product\Product\ProductRepository;
use common\logic\User\UserProducer\UserProducerRepository;
use yii\base\Event;
use common\logic\Distribution\Distribution\Event\DistributionActiveEvent;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\Distribution\Repository\DistributionRepository;
use common\logic\Distribution\PointSaleDistribution\Repository\PointSaleDistributionRepository;
use common\logic\Distribution\PointSaleDistribution\Service\PointSaleDistributionBuilder;
use common\logic\Distribution\ProductDistribution\Repository\ProductDistributionRepository;
use common\logic\Distribution\ProductDistribution\Service\ProductDistributionBuilder;
use common\logic\Order\Order\Repository\OrderRepository;
use common\logic\Order\ProductOrder\Service\ProductOrderBuilder;
use common\logic\Product\Product\Repository\ProductRepository;
use common\logic\User\UserProducer\Repository\UserProducerRepository;

class DistributionBuilder extends AbstractBuilder
{
@@ -39,6 +36,7 @@ class DistributionBuilder extends AbstractBuilder
$this->pointSaleDistributionBuilder = $this->loadService(PointSaleDistributionBuilder::class);
$this->productRepository = $this->loadService(ProductRepository::class);
$this->productDistributionRepository = $this->loadService(ProductDistributionRepository::class);
$this->productDistributionBuilder = $this->loadService(ProductDistributionBuilder::class);
$this->orderRepository = $this->loadService(OrderRepository::class);
$this->userProducerRepository = $this->loadService(UserProducerRepository::class);
$this->productOrderBuilder = $this->loadService(ProductOrderBuilder::class);
@@ -189,7 +187,10 @@ class DistributionBuilder extends AbstractBuilder
$this->saveUpdate($distribution);

if ($active) {
$distribution->trigger(Distribution::EVENT_ACTIVE, new Event(['distribution' => $distribution]));
$distributionActiveEvent = new DistributionActiveEvent();
$distributionActiveEvent->distribution = $distribution;

$distribution->trigger(Distribution::EVENT_ACTIVE, $distributionActiveEvent);
}
}
}

common/logic/Distribution/Distribution/DistributionSolver.php → common/logic/Distribution/Distribution/Service/DistributionSolver.php Bestand weergeven

@@ -1,9 +1,10 @@
<?php

namespace common\logic\Distribution\Distribution;
namespace common\logic\Distribution\Distribution\Service;

use common\helpers\GlobalParam;
use common\logic\AbstractService;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\Product\Product\Product;
use common\logic\SolverInterface;

common/logic/Distribution/Distribution/DistributionContainer.php → common/logic/Distribution/Distribution/Wrapper/DistributionContainer.php Bestand weergeven

@@ -1,8 +1,12 @@
<?php

namespace common\logic\Distribution\Distribution;
namespace common\logic\Distribution\Distribution\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\Distribution\Repository\DistributionRepository;
use common\logic\Distribution\Distribution\Service\DistributionBuilder;
use common\logic\Distribution\Distribution\Service\DistributionSolver;

class DistributionContainer extends AbstractContainer
{

common/logic/Distribution/Distribution/DistributionManager.php → common/logic/Distribution/Distribution/Wrapper/DistributionManager.php Bestand weergeven

@@ -3,6 +3,10 @@
namespace common\logic\Distribution\Distribution;

use common\logic\AbstractManager;
use common\logic\Distribution\Distribution\Repository\DistributionRepository;
use common\logic\Distribution\Distribution\Service\DistributionBuilder;
use common\logic\Distribution\Distribution\Service\DistributionSolver;
use common\logic\Distribution\Distribution\Wrapper\DistributionContainer;

/**
* @mixin DistributionSolver

common/logic/Distribution/PointSaleDistribution/PointSaleDistribution.php → common/logic/Distribution/PointSaleDistribution/Model/PointSaleDistribution.php Bestand weergeven

@@ -36,10 +36,10 @@ pris connaissance de la licence CeCILL, et que vous en avez accepté les
termes.
*/

namespace common\logic\Distribution\PointSaleDistribution;
namespace common\logic\Distribution\PointSaleDistribution\Model;

use common\components\ActiveRecordCommon ;
use common\logic\Distribution\Distribution\Distribution;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\PointSale\PointSale\PointSale;

class PointSaleDistribution extends ActiveRecordCommon

common/logic/Distribution/PointSaleDistribution/PointSaleDistributionRepository.php → common/logic/Distribution/PointSaleDistribution/Repository/PointSaleDistributionRepository.php Bestand weergeven

@@ -1,9 +1,10 @@
<?php

namespace common\logic\Distribution\PointSaleDistribution;
namespace common\logic\Distribution\PointSaleDistribution\Repository;

use common\logic\AbstractRepository;
use common\logic\Distribution\Distribution\Distribution;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\PointSaleDistribution\Model\PointSaleDistribution;
use common\logic\PointSale\PointSale\PointSale;

class PointSaleDistributionRepository extends AbstractRepository

common/logic/Distribution/PointSaleDistribution/PointSaleDistributionRepositoryQuery.php → common/logic/Distribution/PointSaleDistribution/Repository/PointSaleDistributionRepositoryQuery.php Bestand weergeven

@@ -1,6 +1,6 @@
<?php

namespace common\logic\Distribution\PointSaleDistribution;
namespace common\logic\Distribution\PointSaleDistribution\Repository;

use common\logic\AbstractRepositoryQuery;


common/logic/Distribution/PointSaleDistribution/PointSaleDistributionBuilder.php → common/logic/Distribution/PointSaleDistribution/Service/PointSaleDistributionBuilder.php Bestand weergeven

@@ -1,12 +1,13 @@
<?php

namespace common\logic\Distribution\PointSaleDistribution;
namespace common\logic\Distribution\PointSaleDistribution\Service;

use common\logic\AbstractBuilder;
use common\logic\Distribution\Distribution\Distribution;
use common\logic\Distribution\Distribution\DistributionRepository;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\PointSale\PointSale\PointSaleRepository;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\Distribution\Repository\DistributionRepository;
use common\logic\Distribution\PointSaleDistribution\Model\PointSaleDistribution;
use common\logic\Distribution\PointSaleDistribution\Repository\PointSaleDistributionRepository;
use common\logic\PointSale\PointSale\Repository\PointSaleRepository;

class PointSaleDistributionBuilder extends AbstractBuilder
{
@@ -57,7 +58,7 @@ class PointSaleDistributionBuilder extends AbstractBuilder
// setAll
public function createAllPointSaleDistributions(Distribution $distribution, bool $delivery): void
{
$pointSaleArray = $this->pointSaleRepository->findPointSaleDistributionsByDistribution($distribution);
$pointSaleArray = $this->pointSaleDistributionRepository->findPointSaleDistributionsByDistribution($distribution);
foreach ($pointSaleArray as $pointSale) {
if (!$pointSale->pointSaleDistribution) {
$this->createPointSaleDistribution($distribution, $pointSale);

common/logic/Distribution/PointSaleDistribution/PointSaleDistributionContainer.php → common/logic/Distribution/PointSaleDistribution/Wrapper/PointSaleDistributionContainer.php Bestand weergeven

@@ -1,8 +1,11 @@
<?php

namespace common\logic\Distribution\PointSaleDistribution;
namespace common\logic\Distribution\PointSaleDistribution\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Distribution\PointSaleDistribution\Model\PointSaleDistribution;
use common\logic\Distribution\PointSaleDistribution\Repository\PointSaleDistributionRepository;
use common\logic\Distribution\PointSaleDistribution\Service\PointSaleDistributionBuilder;

class PointSaleDistributionContainer extends AbstractContainer
{

common/logic/Distribution/PointSaleDistribution/PointSaleDistributionManager.php → common/logic/Distribution/PointSaleDistribution/Wrapper/PointSaleDistributionManager.php Bestand weergeven

@@ -1,8 +1,10 @@
<?php

namespace common\logic\Distribution\PointSaleDistribution;
namespace common\logic\Distribution\PointSaleDistribution\Wrapper;

use common\logic\AbstractManager;
use common\logic\Distribution\PointSaleDistribution\Repository\PointSaleDistributionRepository;
use common\logic\Distribution\PointSaleDistribution\Service\PointSaleDistributionBuilder;

/**
* @mixin PointSaleDistributionRepository

common/logic/Distribution/ProductDistribution/ProductDistribution.php → common/logic/Distribution/ProductDistribution/Model/ProductDistribution.php Bestand weergeven

@@ -36,10 +36,10 @@ pris connaissance de la licence CeCILL, et que vous en avez accepté les
termes.
*/

namespace common\logic\Distribution\ProductDistribution;
namespace common\logic\Distribution\ProductDistribution\Model;

use common\components\ActiveRecordCommon ;
use common\logic\Distribution\Distribution\Distribution;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Product\Product\Product;

class ProductDistribution extends ActiveRecordCommon

common/logic/Distribution/ProductDistribution/ProductDistributionRepository.php → common/logic/Distribution/ProductDistribution/Repository/ProductDistributionRepository.php Bestand weergeven

@@ -1,9 +1,10 @@
<?php

namespace common\logic\Distribution\ProductDistribution;
namespace common\logic\Distribution\ProductDistribution\Repository;

use common\logic\AbstractRepository;
use common\logic\Distribution\Distribution\Distribution;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\ProductDistribution\Model\ProductDistribution;
use common\logic\Product\Product\Product;

class ProductDistributionRepository extends AbstractRepository

common/logic/Distribution/ProductDistribution/ProductDistributionRepositoryQuery.php → common/logic/Distribution/ProductDistribution/Repository/ProductDistributionRepositoryQuery.php Bestand weergeven

@@ -1,6 +1,6 @@
<?php

namespace common\logic\Distribution\ProductDistribution;
namespace common\logic\Distribution\ProductDistribution\Repository;

use common\logic\AbstractRepositoryQuery;


common/logic/Distribution/ProductDistribution/ProductDistributionBuilder.php → common/logic/Distribution/ProductDistribution/Service/ProductDistributionBuilder.php Bestand weergeven

@@ -1,13 +1,14 @@
<?php

namespace common\logic\Distribution\ProductDistribution;
namespace common\logic\Distribution\ProductDistribution\Service;

use common\logic\AbstractBuilder;
use common\logic\BuilderInterface;
use common\logic\Distribution\Distribution\Distribution;
use common\logic\Distribution\Distribution\DistributionSolver;
use common\logic\Product\Product\Product;
use common\logic\Product\Product\ProductSolver;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\Distribution\Service\DistributionSolver;
use common\logic\Distribution\ProductDistribution\Model\ProductDistribution;
use common\logic\Distribution\ProductDistribution\Repository\ProductDistributionRepository;
use common\logic\Product\Product\Model\Product;
use common\logic\Product\Product\Service\ProductSolver;

class ProductDistributionBuilder extends AbstractBuilder
{

common/logic/Distribution/ProductDistribution/ProductDistributionContainer.php → common/logic/Distribution/ProductDistribution/Wrapper/ProductDistributionContainer.php Bestand weergeven

@@ -1,8 +1,11 @@
<?php

namespace common\logic\Distribution\ProductDistribution;
namespace common\logic\Distribution\ProductDistribution\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Distribution\ProductDistribution\Model\ProductDistribution;
use common\logic\Distribution\ProductDistribution\Repository\ProductDistributionRepository;
use common\logic\Distribution\ProductDistribution\Service\ProductDistributionBuilder;

class ProductDistributionContainer extends AbstractContainer
{

common/logic/Distribution/ProductDistribution/ProductDistributionManager.php → common/logic/Distribution/ProductDistribution/Wrapper/ProductDistributionManager.php Bestand weergeven

@@ -1,8 +1,10 @@
<?php

namespace common\logic\Distribution\ProductDistribution;
namespace common\logic\Distribution\ProductDistribution\Wrapper;

use common\logic\AbstractManager;
use common\logic\Distribution\ProductDistribution\Repository\ProductDistributionRepository;
use common\logic\Distribution\ProductDistribution\Service\ProductDistributionBuilder;

/**
* @mixin ProductDistributionRepository

common/logic/Document/DeliveryNote/DeliveryNote.php → common/logic/Document/DeliveryNote/Model/DeliveryNote.php Bestand weergeven

@@ -36,7 +36,7 @@
* termes.
*/

namespace common\logic\Document\DeliveryNote;
namespace common\logic\Document\DeliveryNote\Model;

use common\logic\Document\Document\Document;


common/logic/Document/DeliveryNote/DeliveryNoteSearch.php → common/logic/Document/DeliveryNote/Model/DeliveryNoteSearch.php Bestand weergeven

@@ -36,10 +36,10 @@
* termes.
*/

namespace common\logic\Document\DeliveryNote;
namespace common\logic\Document\DeliveryNote\Model;

use common\helpers\GlobalParam;
use common\logic\PointSale\PointSale\DeliveryNoteRepository;
use common\logic\Document\DeliveryNote\Repository\DeliveryNoteRepository;
use yii\data\ActiveDataProvider;

class DeliveryNoteSearch extends DeliveryNote

common/logic/Document/DeliveryNote/DeliveryNoteRepository.php → common/logic/Document/DeliveryNote/Repository/DeliveryNoteRepository.php Bestand weergeven

@@ -1,8 +1,9 @@
<?php

namespace common\logic\Document\DeliveryNote;
namespace common\logic\Document\DeliveryNote\Repository;

use common\logic\AbstractRepository;
use common\logic\Document\DeliveryNote\Model\DeliveryNote;

class DeliveryNoteRepository extends AbstractRepository
{

common/logic/Document/DeliveryNote/DeliveryNoteRepositoryQuery.php → common/logic/Document/DeliveryNote/Repository/DeliveryNoteRepositoryQuery.php Bestand weergeven

@@ -1,6 +1,6 @@
<?php

namespace common\logic\Document\DeliveryNote;
namespace common\logic\Document\DeliveryNote\Repository;

use common\logic\AbstractRepositoryQuery;


common/logic/Document/DeliveryNote/DeliveryNoteBuilder.php → common/logic/Document/DeliveryNote/Service/DeliveryNoteBuilder.php Bestand weergeven

@@ -1,7 +1,8 @@
<?php

namespace common\logic\Document\DeliveryNote;
namespace common\logic\Document\DeliveryNote\Service;

use common\logic\Document\DeliveryNote\Model\DeliveryNote;
use common\logic\Document\Document\DocumentBuilder;

class DeliveryNoteBuilder extends DocumentBuilder

common/logic/Document/DeliveryNote/DeliveryNoteSolver.php → common/logic/Document/DeliveryNote/Service/DeliveryNoteSolver.php Bestand weergeven

@@ -1,7 +1,8 @@
<?php

namespace common\logic\Document\DeliveryNote;
namespace common\logic\Document\DeliveryNote\Service;

use common\logic\Document\DeliveryNote\Model\DeliveryNote;
use common\logic\Document\Document\DocumentSolver;
use common\logic\Document\Invoice\Invoice;
use common\logic\SolverInterface;

common/logic/Document/DeliveryNote/DeliveryNoteContainer.php → common/logic/Document/DeliveryNote/Wrapper/DeliveryNoteContainer.php Bestand weergeven

@@ -1,8 +1,11 @@
<?php

namespace common\logic\Document\DeliveryNote;
namespace common\logic\Document\DeliveryNote\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Document\DeliveryNote\Model\DeliveryNote;
use common\logic\Document\DeliveryNote\Service\DeliveryNoteBuilder;
use common\logic\Document\DeliveryNote\Service\DeliveryNoteSolver;

class DeliveryNoteContainer extends AbstractContainer
{

common/logic/Document/DeliveryNote/DeliveryNoteManager.php → common/logic/Document/DeliveryNote/Wrapper/DeliveryNoteManager.php Bestand weergeven

@@ -1,9 +1,11 @@
<?php

namespace common\logic\Document\DeliveryNote;
namespace common\logic\Document\DeliveryNote\Wrapper;

use common\logic\Document\DeliveryNote\Repository\DeliveryNoteRepository;
use common\logic\Document\DeliveryNote\Service\DeliveryNoteBuilder;
use common\logic\Document\DeliveryNote\Service\DeliveryNoteSolver;
use common\logic\Document\Document\DocumentManager;
use common\logic\PointSale\PointSale\DeliveryNoteRepository;

/**
* @mixin DeliveryNoteSolver

+ 0
- 8
common/logic/Document/Document/DocumentInterface.php Bestand weergeven

@@ -1,8 +0,0 @@
<?php

namespace common\logic\Document\Document;

interface DocumentInterface
{

}

common/logic/Document/Document/Document.php → common/logic/Document/Document/Model/Document.php Bestand weergeven

@@ -36,16 +36,13 @@
* termes.
*/

namespace common\logic\Document\Document;
namespace common\logic\Document\Document\Model;

use common\components\ActiveRecordCommon;
use common\helpers\GlobalParam;
use common\logic\Order\Order\Order;
use common\logic\Order\Order\OrderRepository;
use common\logic\Producer\Producer\Producer;
use common\logic\User\User\User;
use kartik\mpdf\Pdf;
use yii\base\ErrorException;
use common\logic\Order\Order\Model\Order;
use common\logic\Order\Order\Repository\OrderRepository;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\User\User\Model\User;

class Document extends ActiveRecordCommon implements DocumentInterface
{

+ 8
- 0
common/logic/Document/Document/Model/DocumentInterface.php Bestand weergeven

@@ -0,0 +1,8 @@
<?php

namespace common\logic\Document\Document\Model;

interface DocumentInterface
{

}

common/logic/Document/Document/DocumentBuilder.php → common/logic/Document/Document/Service/DocumentBuilder.php Bestand weergeven

@@ -1,9 +1,11 @@
<?php

namespace common\logic\Document\Document;
namespace common\logic\Document\Document\Service;

use common\logic\AbstractBuilder;
use common\logic\Producer\Producer\ProducerRepository;
use common\logic\Document\Document\Model\Document;
use common\logic\Document\Document\Model\DocumentInterface;
use common\logic\Producer\Producer\Repository\ProducerRepository;

class DocumentBuilder extends AbstractBuilder
{

common/logic/Document/Document/DocumentSolver.php → common/logic/Document/Document/Service/DocumentSolver.php Bestand weergeven

@@ -1,9 +1,11 @@
<?php

namespace common\logic\Document\Document;
namespace common\logic\Document\Document\Service;

use common\helpers\Price;
use common\logic\AbstractService;
use common\logic\Document\Document\Model\Document;
use common\logic\Document\Document\Model\DocumentInterface;
use common\logic\Order\Order\Order;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\SolverInterface;

common/logic/Document/Document/DocumentUtils.php → common/logic/Document/Document/Service/DocumentUtils.php Bestand weergeven

@@ -1,11 +1,12 @@
<?php

namespace common\logic\Document\Document;
namespace common\logic\Document\Document\Service;

use common\helpers\GlobalParam;
use common\logic\AbstractService;
use common\logic\Producer\Producer\ProducerRepository;
use common\logic\Producer\Producer\ProducerSolver;
use common\logic\Document\Document\Model\DocumentInterface;
use common\logic\Producer\Producer\Repository\ProducerRepository;
use common\logic\Producer\Producer\Service\ProducerSolver;
use common\logic\UtilsInterface;
use kartik\mpdf\Pdf;
use yii\base\ErrorException;
@@ -120,7 +121,7 @@ class DocumentUtils extends AbstractService implements UtilsInterface
->setFrom([$producer->getEmailOpendistrib() => $producer->name])
->setSubject('[' . $producer->name . '] ' . $subjectEmail);

$this->documentBuilder->generatePdf($document, Pdf::DEST_FILE);
$this->generatePdf($document, Pdf::DEST_FILE);
$email->attach($this->documentSolver->getFilenameComplete($document));

return $email->send();

common/logic/Document/Document/DocumentContainer.php → common/logic/Document/Document/Wrapper/DocumentContainer.php Bestand weergeven

@@ -1,8 +1,12 @@
<?php

namespace common\logic\Document\Document;
namespace common\logic\Document\Document\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Document\Document\Model\Document;
use common\logic\Document\Document\Service\DocumentBuilder;
use common\logic\Document\Document\Service\DocumentSolver;
use common\logic\Document\Document\Service\DocumentUtils;

class DocumentContainer extends AbstractContainer
{

common/logic/Document/Document/DocumentManager.php → common/logic/Document/Document/Wrapper/DocumentManager.php Bestand weergeven

@@ -1,6 +1,6 @@
<?php

namespace common\logic\Document\Document;
namespace common\logic\Document\Document\Wrapper;

use common\logic\AbstractManager;


+ 0
- 17
common/logic/Document/Invoice/InvoiceManager.php Bestand weergeven

@@ -1,17 +0,0 @@
<?php

namespace common\logic\Document\Invoice;

use common\logic\Document\Document\DocumentManager;

/**
* @mixin InvoiceRepository
* @mixin InvoiceBuilder
*/
class InvoiceManager extends DocumentManager
{
public function getContainerFqcn(): string
{
return InvoiceContainer::class;
}
}

common/logic/Document/Invoice/Invoice.php → common/logic/Document/Invoice/Model/Invoice.php Bestand weergeven

@@ -36,9 +36,9 @@
* termes.
*/

namespace common\logic\Document\Invoice;
namespace common\logic\Document\Invoice\Model;

use common\logic\Document\Document\Document;
use common\logic\Document\Document\Model\Document;

/**
* This is the model class for table "invoice".

common/logic/Document/Invoice/InvoiceSearch.php → common/logic/Document/Invoice/Model/InvoiceSearch.php Bestand weergeven

@@ -36,10 +36,10 @@
* termes.
*/

namespace common\logic\Document\Invoice;
namespace common\logic\Document\Invoice\Model;

use common\helpers\GlobalParam;
use common\logic\PointSale\PointSale\InvoiceRepository;
use common\logic\Document\Invoice\Repository\InvoiceRepository;
use yii\data\ActiveDataProvider;

class InvoiceSearch extends Invoice

common/logic/Document/Invoice/InvoiceRepository.php → common/logic/Document/Invoice/Repository/InvoiceRepository.php Bestand weergeven

@@ -1,8 +1,9 @@
<?php

namespace common\logic\Document\Invoice;
namespace common\logic\Document\Invoice\Repository;

use common\logic\AbstractRepository;
use common\logic\Document\Invoice\Model\Invoice;

class InvoiceRepository extends AbstractRepository
{

common/logic/Document/Invoice/InvoiceRepositoryQuery.php → common/logic/Document/Invoice/Repository/InvoiceRepositoryQuery.php Bestand weergeven

@@ -1,6 +1,6 @@
<?php

namespace common\logic\Document\Invoice;
namespace common\logic\Document\Invoice\Repository;

use common\logic\AbstractRepositoryQuery;


common/logic/Document/Invoice/InvoiceBuilder.php → common/logic/Document/Invoice/Service/InvoiceBuilder.php Bestand weergeven

@@ -1,8 +1,9 @@
<?php

namespace common\logic\Document\Invoice;
namespace common\logic\Document\Invoice\Service;

use common\logic\Document\Document\DocumentBuilder;
use common\logic\Document\Document\Service\DocumentBuilder;
use common\logic\Document\Invoice\Model\Invoice;

class InvoiceBuilder extends DocumentBuilder
{

common/logic/Document/Invoice/InvoiceContainer.php → common/logic/Document/Invoice/Wrapper/InvoiceContainer.php Bestand weergeven

@@ -1,9 +1,12 @@
<?php

namespace common\logic\Document\Invoice;
namespace common\logic\Document\Invoice\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Document\Document\DocumentSolver;
use common\logic\Document\Document\Service\DocumentSolver;
use common\logic\Document\Invoice\Model\Invoice;
use common\logic\Document\Invoice\Repository\InvoiceRepository;
use common\logic\Document\Invoice\Service\InvoiceBuilder;

class InvoiceContainer extends AbstractContainer
{

+ 19
- 0
common/logic/Document/Invoice/Wrapper/InvoiceManager.php Bestand weergeven

@@ -0,0 +1,19 @@
<?php

namespace common\logic\Document\Invoice\Wrapper;

use common\logic\Document\Document\Wrapper\DocumentManager;
use common\logic\Document\Invoice\Repository\InvoiceRepository;
use common\logic\Document\Invoice\Service\InvoiceBuilder;

/**
* @mixin InvoiceRepository
* @mixin InvoiceBuilder
*/
class InvoiceManager extends DocumentManager
{
public function getContainerFqcn(): string
{
return InvoiceContainer::class;
}
}

common/logic/Document/Quotation/Quotation.php → common/logic/Document/Quotation/Model/Quotation.php Bestand weergeven

@@ -36,9 +36,9 @@
* termes.
*/

namespace common\logic\Document\Quotation;
namespace common\logic\Document\Quotation\Model;

use common\logic\Document\Document\Document;
use common\logic\Document\Document\Model\Document;

/**
* This is the model class for table "quotation".

common/logic/Document/Quotation/QuotationSearch.php → common/logic/Document/Quotation/Model/QuotationSearch.php Bestand weergeven

@@ -36,10 +36,10 @@
* termes.
*/

namespace common\logic\Document\Quotation;
namespace common\logic\Document\Quotation\Model;

use common\helpers\GlobalParam;
use common\logic\PointSale\PointSale\QuotationRepository;
use common\logic\PointSale\PointSale\Repository\QuotationRepository;
use yii\data\ActiveDataProvider;

class QuotationSearch extends Quotation

+ 0
- 19
common/logic/Document/Quotation/QuotationManager.php Bestand weergeven

@@ -1,19 +0,0 @@
<?php

namespace common\logic\Document\Invoice;

use common\logic\Document\Document\DocumentManager;
use common\logic\Document\Quotation\QuotationBuilder;
use common\logic\PointSale\PointSale\QuotationRepository;

/**
* @mixin QuotationRepository
* @mixin QuotationBuilder
*/
class QuotationManager extends DocumentManager
{
public function getContainerFqcn(): string
{
return QuotationContainer::class;
}
}

common/logic/Document/Quotation/QuotationRepository.php → common/logic/Document/Quotation/Repository/QuotationRepository.php Bestand weergeven

@@ -1,9 +1,9 @@
<?php

namespace common\logic\PointSale\PointSale;
namespace common\logic\PointSale\PointSale\Repository;

use common\logic\AbstractRepository;
use common\logic\Document\Quotation\QuotationRepositoryQuery;
use common\logic\Document\Quotation\Repository\QuotationRepositoryQuery;

class QuotationRepository extends AbstractRepository
{

common/logic/Document/Quotation/QuotationRepositoryQuery.php → common/logic/Document/Quotation/Repository/QuotationRepositoryQuery.php Bestand weergeven

@@ -1,6 +1,6 @@
<?php

namespace common\logic\Document\Quotation;
namespace common\logic\Document\Quotation\Repository;

use common\logic\AbstractRepositoryQuery;


common/logic/Document/Quotation/QuotationBuilder.php → common/logic/Document/Quotation/Service/QuotationBuilder.php Bestand weergeven

@@ -1,8 +1,9 @@
<?php

namespace common\logic\Document\Quotation;
namespace common\logic\Document\Quotation\Service;

use common\logic\AbstractBuilder;
use common\logic\Document\Quotation\Model\Quotation;

class QuotationBuilder extends AbstractBuilder
{

common/logic/Document/Quotation/QuotationContainer.php → common/logic/Document/Quotation/Wrapper/QuotationContainer.php Bestand weergeven

@@ -1,12 +1,12 @@
<?php

namespace common\logic\Document\Invoice;
namespace common\logic\Document\Invoice\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Document\Document\DocumentSolver;
use common\logic\Document\Quotation\QuotationBuilder;
use common\logic\Document\Quotation\Quotation;
use common\logic\PointSale\PointSale\QuotationRepository;
use common\logic\Document\Document\Service\DocumentSolver;
use common\logic\Document\Quotation\Model\Quotation;
use common\logic\Document\Quotation\Service\QuotationBuilder;
use common\logic\PointSale\PointSale\Repository\QuotationRepository;

class QuotationContainer extends AbstractContainer
{

+ 19
- 0
common/logic/Document/Quotation/Wrapper/QuotationManager.php Bestand weergeven

@@ -0,0 +1,19 @@
<?php

namespace common\logic\Document\Invoice\Wrapper;

use common\logic\Document\Document\Wrapper\DocumentManager;
use common\logic\Document\Quotation\Service\QuotationBuilder;
use common\logic\PointSale\PointSale\Repository\QuotationRepository;

/**
* @mixin QuotationRepository
* @mixin QuotationBuilder
*/
class QuotationManager extends DocumentManager
{
public function getContainerFqcn(): string
{
return QuotationContainer::class;
}
}

common/logic/Order/Order/Order.php → common/logic/Order/Order/Model/Order.php Bestand weergeven

@@ -36,17 +36,17 @@
* termes.
*/

namespace common\logic\Order\Order;
use common\logic\Distribution\Distribution\Distribution;
use common\logic\Document\DeliveryNote\DeliveryNote;
use common\logic\Document\Invoice\Invoice;
use common\logic\Document\Quotation\Quotation;
use common\logic\Order\ProductOrder\ProductOrder;
use common\logic\PointSale\PointSale\PointSale;
use common\logic\Subscription\Subscription\Subscription;
use common\logic\User\CreditHistory\CreditHistory;
use common\logic\User\User\User;
namespace common\logic\Order\Order\Model;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Document\DeliveryNote\Model\DeliveryNote;
use common\logic\Document\Invoice\Model\Invoice;
use common\logic\Document\Quotation\Model\Quotation;
use common\logic\Order\ProductOrder\Model\ProductOrder;
use common\logic\PointSale\PointSale\Model\PointSale;
use common\logic\Subscription\Subscription\Model\Subscription;
use common\logic\User\CreditHistory\Model\CreditHistory;
use common\logic\User\User\Model\User;
use common\components\ActiveRecordCommon;

/**

common/logic/Order/Order/OrderSearch.php → common/logic/Order/Order/Model/OrderSearch.php Bestand weergeven

@@ -36,8 +36,9 @@ pris connaissance de la licence CeCILL, et que vous en avez accepté les
termes.
*/

namespace common\logic\Order\Order ;
namespace common\logic\Order\Order\Model;

use common\logic\Order\Order\Repository\OrderRepository;
use yii\data\ActiveDataProvider;

class OrderSearch extends Order

+ 0
- 27
common/logic/Order/Order/OrderManager.php Bestand weergeven

@@ -1,27 +0,0 @@
<?php

namespace common\logic\Order\Order;

use common\logic\AbstractManager;
use common\logic\Config\TaxRate\TaxRate;
use common\logic\Distribution\Distribution\Distribution;
use common\logic\Document\Document\Document;
use common\logic\Order\ProductOrder\ProductOrder;
use common\logic\Producer\Producer\Producer;
use common\logic\Product\Product\Product;
use common\logic\Subscription\Subscription\Subscription;
use common\logic\User\User\User;
use yii\db\Query;

/**
* @mixin OrderSolver
* @mixin OrderRepository
* @mixin OrderBuilder
*/
class OrderManager extends AbstractManager
{
public function getContainerFqcn(): string
{
return OrderContainer::class;
}
}

common/logic/Order/Order/OrderRepository.php → common/logic/Order/Order/Repository/OrderRepository.php Bestand weergeven

@@ -1,15 +1,17 @@
<?php

namespace common\logic\Order\Order;
namespace common\logic\Order\Order\Repository;

use common\logic\AbstractRepository;
use common\logic\Distribution\Distribution\Distribution;
use common\logic\Distribution\ProductDistribution\ProductDistributionRepository;
use common\logic\Order\ProductOrder\ProductOrderRepository;
use common\logic\Producer\Producer\Producer;
use common\logic\Producer\Producer\ProducerRepository;
use common\logic\Product\Product\Product;
use common\logic\User\User\User;
use common\logic\Distribution\Distribution\Model\Distribution;
use common\logic\Distribution\ProductDistribution\Repository\ProductDistributionRepository;
use common\logic\Order\Order\Model\Order;
use common\logic\Order\Order\Service\OrderSolver;
use common\logic\Order\ProductOrder\Repository\ProductOrderRepository;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\Producer\Producer\Repository\ProducerRepository;
use common\logic\Product\Product\Model\Product;
use common\logic\User\User\Model\User;
use yii\helpers\Html;

class OrderRepository extends AbstractRepository
@@ -136,7 +138,7 @@ class OrderRepository extends AbstractRepository
public function getCartSummary(Order $order, $htmlFormat = true): string
{
if (!isset($order->productOrder)) {
$order->productOrder = $this->productOrderRepository->getByOrder($order);
$order->productOrder = $this->productOrderRepository->findProductOrdersByOrder($order);
}

$html = '';
@@ -170,7 +172,7 @@ class OrderRepository extends AbstractRepository
{
$html = '';
$creditActive = $this->producerRepository->getConfig('credit');
$html .= $this->orderSolver->getAmountWithTax($order, Order::AMOUNT_TOTAL, true);
$html .= $this->orderSolver->getOrderAmountWithTax($order, Order::AMOUNT_TOTAL, true);

if ($creditActive) {
$html .= '<br />';

common/logic/Order/Order/OrderRepositoryQuery.php → common/logic/Order/Order/Repository/OrderRepositoryQuery.php Bestand weergeven

@@ -1,6 +1,6 @@
<?php

namespace common\logic\Order\Order;
namespace common\logic\Order\Order\Repository;

use common\logic\AbstractRepositoryQuery;


common/logic/Order/Order/OrderBuilder.php → common/logic/Order/Order/Service/OrderBuilder.php Bestand weergeven

@@ -1,36 +1,34 @@
<?php

namespace common\logic\Order\Order;
namespace common\logic\Order\Order\Service;

use common\helpers\GlobalParam;
use common\helpers\MeanPayment;
use common\helpers\Price;
use common\logic\AbstractBuilder;
use common\logic\AbstractService;
use common\logic\BuilderInterface;
use common\logic\Config\TaxRate\TaxRate;
use common\logic\Distribution\Distribution\Distribution;
use common\logic\Distribution\Distribution\DistributionRepository;
use common\logic\Document\Document\Document;
use common\logic\Order\OrderStatusHistory\OrderStatusHistoryBuilder;
use common\logic\Order\ProductOrder\ProductOrder;
use common\logic\Order\ProductOrder\ProductOrderBuilder;
use common\logic\Order\ProductOrder\ProductOrderSolver;
use common\logic\PointSale\PointSale\PointSaleBuilder;
use common\logic\PointSale\PointSale\PointSaleRepository;
use common\logic\PointSale\UserPointSale\UserPointSaleRepository;
use common\logic\Producer\Producer\Producer;
use common\logic\Producer\Producer\ProducerRepository;
use common\logic\Subscription\Subscription\Subscription;
use common\logic\Subscription\Subscription\SubscriptionBuilder;
use common\logic\Subscription\Subscription\SubscriptionRepository;
use common\logic\Subscription\Subscription\SubscriptionSolver;
use common\logic\User\CreditHistory\CreditHistory;
use common\logic\User\CreditHistory\CreditHistoryBuilder;
use common\logic\User\CreditHistory\CreditHistoryRepository;
use common\logic\User\User\User;
use common\logic\User\User\UserSolver;
use common\logic\User\UserProducer\UserProducerRepository;
use common\logic\Distribution\Distribution\Repository\DistributionRepository;
use common\logic\Document\Document\Model\Document;
use common\logic\Order\Order\Model\Order;
use common\logic\Order\Order\Repository\OrderRepository;
use common\logic\Order\OrderStatusHistory\Service\OrderStatusHistoryBuilder;
use common\logic\Order\ProductOrder\Model\ProductOrder;
use common\logic\Order\ProductOrder\Service\ProductOrderBuilder;
use common\logic\Order\ProductOrder\Service\ProductOrderSolver;
use common\logic\PointSale\PointSale\Service\PointSaleBuilder;
use common\logic\PointSale\PointSale\Repository\PointSaleRepository;
use common\logic\PointSale\UserPointSale\Repository\UserPointSaleRepository;
use common\logic\Producer\Producer\Model\Producer;
use common\logic\Producer\Producer\Repository\ProducerRepository;
use common\logic\Subscription\Subscription\Model\Subscription;
use common\logic\Subscription\Subscription\Service\SubscriptionBuilder;
use common\logic\Subscription\Subscription\Repository\SubscriptionRepository;
use common\logic\Subscription\Subscription\Service\SubscriptionSolver;
use common\logic\User\CreditHistory\Model\CreditHistory;
use common\logic\User\CreditHistory\Service\CreditHistoryBuilder;
use common\logic\User\CreditHistory\Repository\CreditHistoryRepository;
use common\logic\User\User\Service\UserSolver;
use common\logic\User\UserProducer\Repository\UserProducerRepository;
use yii\web\NotFoundHttpException;

class OrderBuilder extends AbstractBuilder
@@ -105,7 +103,7 @@ class OrderBuilder extends AbstractBuilder
{
$now = date('Y-m-d');
$distributionDate = date('Y-m-d', strtotime($date));
$distribution = $this->distributionRepository->getOneByDate($distributionDate);
$distribution = $this->distributionRepository->findOneDistributionByDate($distributionDate);

if ($distribution
&& $distribution->active
@@ -130,11 +128,11 @@ class OrderBuilder extends AbstractBuilder
public function createAllOrdersFromSubscriptions(string $date, bool $force = false): array
{
$orderArray = [];
$distribution = $this->distributionRepository->getOneByDate(date('Y-m-d', strtotime($date)));
$distribution = $this->distributionRepository->findOneDistributionByDate(date('Y-m-d', strtotime($date)));

if ($distribution) {
$orderArray = $this->orderRepository->getByDistribution($distribution);
$subscriptionArray = $this->subscriptionRepository->getByDate($date);
$orderArray = $this->orderRepository->findOrdersByDistribution($distribution);
$subscriptionArray = $this->subscriptionRepository->findSubscriptionsByDate($date);
foreach ($subscriptionArray as $subscription) {
if (!$this->subscriptionSolver->hasOrderAlreadyExist($subscription, $orderArray)) {
$this->createOrderFromSubscription($subscription, $date, $force);
@@ -149,7 +147,7 @@ class OrderBuilder extends AbstractBuilder
public function updateOrdersIncomingDistributionsFromSubscription(Subscription $subscription, $update = false): array
{
$orderArray = [];
$matchedDistributionsArray = $this->distributionRepository->searchMatchedIncomingDistributions($subscription);
$matchedDistributionsArray = $this->distributionRepository->findDistributionsIncomingMatchWithSubscrtiption($subscription);

if ($update) {
$this->deleteOrdersIncomingDistributionsFromSubscription($subscription);
@@ -205,12 +203,12 @@ class OrderBuilder extends AbstractBuilder
if ($ordersArray && count($ordersArray)) {
foreach ($ordersArray as $order) {

$theOrder = $this->orderRepository->getOneById($order->id);
$theOrder = $this->orderRepository->findOneOrderById($order->id);

// remboursement de la commande
if ($theOrder->id_user && $theOrder->getAmount(Order::AMOUNT_PAID) && $configCredit) {

$this->creditHistoryBuilder->create(
$this->creditHistoryBuilder->createCreditHistory(
CreditHistory::TYPE_REFUND,
$theOrder->getAmount(Order::AMOUNT_PAID),
$theOrder->distribution->producer,
@@ -234,7 +232,7 @@ class OrderBuilder extends AbstractBuilder
$user = $subscription->user ?? null;
foreach ($subscription->productSubscription as $productSubscription) {

$this->productOrderBuilder->create(
$this->productOrderBuilder->createProductOrder(
$order,
$productSubscription->product,
$productSubscription->quantity,
@@ -295,7 +293,7 @@ class OrderBuilder extends AbstractBuilder
$order->auto_payment = 1;
} elseif ($creditFunctioning == Producer::CREDIT_FUNCTIONING_USER) {

$userProducer = $this->userProducerRepository->getOne($order->user, $order->producer);
$userProducer = $this->userProducerRepository->findOneUserProducer($order->user, $order->producer);

if ($userProducer) {
$order->auto_payment = $userProducer->credit_active;
@@ -324,7 +322,7 @@ class OrderBuilder extends AbstractBuilder
public function initOrderCommentPointSale(Order $order): void
{
if($order->user && $order->pointSale) {
$userPointSale = $this->userPointSaleRepository->getOne($order->user, $order->pointSale);
$userPointSale = $this->userPointSaleRepository->findOneUserPointSale($order->user, $order->pointSale);

if ($userPointSale && strlen($userPointSale->comment)) {
$order->comment_point_sale = $userPointSale->comment;
@@ -435,10 +433,10 @@ class OrderBuilder extends AbstractBuilder
public function deleteOrder(Order $order, bool $force = false): bool
{
// remboursement si l'utilisateur a payé pour cette commande
$amountPaid = $this->orderSolver->getAmount($order, Order::AMOUNT_PAID);
$amountPaid = $this->orderSolver->getOrderAmount($order, Order::AMOUNT_PAID);

if ($amountPaid >= 0.01) {
$this->creditHistoryBuilder->create(
$this->creditHistoryBuilder->createCreditHistory(
CreditHistory::TYPE_REFUND,
$amountPaid,
GlobalParam::getCurrentProducer(),
@@ -454,7 +452,7 @@ class OrderBuilder extends AbstractBuilder
($this->producerRepository->getConfig('option_behavior_cancel_order') == Producer::BEHAVIOR_DELETE_ORDER_STATUS && strlen($order->date_delete))
|| $force) {

$this->productOrderBuilder->deleteByOrder($order);
$this->productOrderBuilder->deleteProductOrdersByOrder($order);

return $this->delete($order);
}
@@ -480,13 +478,13 @@ class OrderBuilder extends AbstractBuilder
return;
} elseif ($paymentStatus == Order::PAYMENT_SURPLUS) {
$type = CreditHistory::TYPE_REFUND;
$amount = $this->orderSolver->getAmount($order, Order::AMOUNT_SURPLUS);
$amount = $this->orderSolver->getOrderAmount($order, Order::AMOUNT_SURPLUS);
} elseif ($paymentStatus == Order::PAYMENT_UNPAID) {
$type = CreditHistory::TYPE_PAYMENT;
$amount = $this->orderSolver->getAmount($order, Order::AMOUNT_REMAINING);
$amount = $this->orderSolver->getOrderAmount($order, Order::AMOUNT_REMAINING);
}

$this->creditHistoryBuilder->create(
$this->creditHistoryBuilder->createCreditHistory(
$type,
$amount,
GlobalParam::getCurrentProducer(),
@@ -529,7 +527,7 @@ class OrderBuilder extends AbstractBuilder

switch ($newStatus) {
case 'new-order' :
$this->orderStatusHistoryBuilder->create($order, $userCurrent, $newStatus, $origin);
$this->orderStatusHistoryBuilder->createOrderStatusHistory($order, $userCurrent, $newStatus, $origin);
$order->status = $newStatus;
$order->save();
break;
@@ -541,7 +539,7 @@ class OrderBuilder extends AbstractBuilder
case 'refunded':
case 'cancel':
if (in_array($newStatus, $orderStatusArray[$order->status]['nextStatusAllow'])) {
$this->orderStatusHistoryBuilder->create($order, $userCurrent, $newStatus, $origin);
$this->orderStatusHistoryBuilder->createOrderStatusHistory($order, $userCurrent, $newStatus, $origin);
$order->status = $newStatus;
$order->save();
}
@@ -555,10 +553,10 @@ class OrderBuilder extends AbstractBuilder
// generateReference
public function generateOrderReference(Order $order): void
{
$producer = $order->producer;
$producer = $this->producerRepository->findOneProducerById($order->id_producer);

if (!$order->reference && $producer->option_order_reference_type == Producer::ORDER_REFERENCE_TYPE_YEARLY) {
$lastOrder = $this->orderRepository->getOneLastOfYear($producer);
$lastOrder = $this->orderRepository->findOneOrderLastOfYear($producer);

if ($lastOrder && $lastOrder->reference && strlen($lastOrder->reference) > 0) {
$pattern = '#A([0-9]+)C([0-9]+)#';
@@ -582,7 +580,7 @@ class OrderBuilder extends AbstractBuilder
{
foreach ($order->productOrder as $productOrder) {
if ($productOrder->product) {
$this->productOrderBuilder->updateInvoicePrice($productOrder, $params);
$this->productOrderBuilder->updateProductOrderInvoicePrice($productOrder, $params);
}
}
}

common/logic/Order/Order/OrderSolver.php → common/logic/Order/Order/Service/OrderSolver.php Bestand weergeven

@@ -1,18 +1,15 @@
<?php

namespace common\logic\Order\Order;
namespace common\logic\Order\Order\Service;

use common\helpers\GlobalParam;
use common\helpers\Price;
use common\logic\AbstractService;
use common\logic\Document\Document\Document;
use common\logic\Document\Document\DocumentSolver;
use common\logic\Order\ProductOrder\ProductOrder;
use common\logic\Producer\Producer\Producer;
use common\logic\Product\Product\Product;
use common\logic\Document\Document\Service\DocumentSolver;
use common\logic\Order\Order\Model\Order;
use common\logic\Product\Product\Model\Product;
use common\logic\SolverInterface;
use common\logic\User\User\User;
use common\logic\User\User\UserSolver;
use common\logic\User\User\Model\User;
use common\logic\User\User\Service\UserSolver;
use yii\helpers\Html;


@@ -61,14 +58,14 @@ class OrderSolver extends AbstractService implements SolverInterface
public function getPaymentStatus(Order $order): ?string
{
// payé
if ($this->getAmountWithtax($order) - $this->getAmount($order, Order::AMOUNT_PAID) < 0.01 &&
$this->getAmountWithtax($order) - $this->getAmount($order, Order::AMOUNT_PAID) > -0.01) {
if ($this->getOrderAmountWithtax($order) - $this->getOrderAmount($order, Order::AMOUNT_PAID) < 0.01 &&
$this->getOrderAmountWithtax($order) - $this->getOrderAmount($order, Order::AMOUNT_PAID) > -0.01) {
return Order::PAYMENT_PAID;
} // à rembourser
elseif ($this->getAmountWithtax($order) - $this->getAmount($order, Order::AMOUNT_PAID) <= -0.01) {
elseif ($this->getOrderAmountWithtax($order) - $this->getOrderAmount($order, Order::AMOUNT_PAID) <= -0.01) {
return Order::PAYMENT_SURPLUS;
} // reste à payer
elseif ($this->getAmountWithtax($order) - $this->getAmount($order, Order::AMOUNT_PAID) >= 0.01) {
elseif ($this->getOrderAmountWithtax($order) - $this->getOrderAmount($order, Order::AMOUNT_PAID) >= 0.01) {
return Order::PAYMENT_UNPAID;
}

@@ -345,12 +342,12 @@ class OrderSolver extends AbstractService implements SolverInterface
$amount = $order->paid_amount;
break;
case Order::AMOUNT_REMAINING :
$amount = $this->getAmountWithTax($order, Order::AMOUNT_TOTAL)
- $this->getAmountWithTax($order,Order::AMOUNT_PAID);
$amount = $this->getOrderAmountWithTax($order, Order::AMOUNT_TOTAL)
- $this->getOrderAmountWithTax($order,Order::AMOUNT_PAID);
break;
case Order::AMOUNT_SURPLUS :
$amount = $this->getAmountWithTax($order,Order::AMOUNT_PAID)
- $this->getAmountWithTax($order,Order::AMOUNT_TOTAL);
$amount = $this->getOrderAmountWithTax($order,Order::AMOUNT_PAID)
- $this->getOrderAmountWithTax($order,Order::AMOUNT_TOTAL);
break;
}


common/logic/Order/Order/OrderUtils.php → common/logic/Order/Order/Service/OrderUtils.php Bestand weergeven

@@ -1,6 +1,6 @@
<?php

namespace common\logic\Order\Order;
namespace common\logic\Order\Order\Service;

use common\logic\AbstractService;
use common\logic\UtilsInterface;

common/logic/Order/Order/OrderContainer.php → common/logic/Order/Order/Wrapper/OrderContainer.php Bestand weergeven

@@ -1,8 +1,13 @@
<?php

namespace common\logic\Order\Order;
namespace common\logic\Order\Order\Wrapper;

use common\logic\AbstractContainer;
use common\logic\Order\Order\Model\Order;
use common\logic\Order\Order\Repository\OrderRepository;
use common\logic\Order\Order\Service\OrderBuilder;
use common\logic\Order\Order\Service\OrderSolver;
use common\logic\Order\Order\Service\OrderUtils;

class OrderContainer extends AbstractContainer
{

+ 21
- 0
common/logic/Order/Order/Wrapper/OrderManager.php Bestand weergeven

@@ -0,0 +1,21 @@
<?php

namespace common\logic\Order\Order\Wrapper;

use common\logic\AbstractManager;
use common\logic\Order\Order\Repository\OrderRepository;
use common\logic\Order\Order\Service\OrderBuilder;
use common\logic\Order\Order\Service\OrderSolver;

/**
* @mixin OrderSolver
* @mixin OrderRepository
* @mixin OrderBuilder
*/
class OrderManager extends AbstractManager
{
public function getContainerFqcn(): string
{
return OrderContainer::class;
}
}

common/logic/Order/OrderStatusHistory/OrderStatusHistory.php → common/logic/Order/OrderStatusHistory/Model/OrderStatusHistory.php Bestand weergeven

@@ -1,10 +1,10 @@
<?php

namespace common\logic\Order\OrderStatusHistory;
namespace common\logic\Order\OrderStatusHistory\Model;

use common\components\ActiveRecordCommon;
use common\logic\Order\Order\Order;
use common\logic\User\User\User;
use common\logic\Order\Order\Model\Order;
use common\logic\User\User\Model\User;

/**
* This is the model class for table "order_status_history".

common/logic/Order/OrderStatusHistory/OrderStatusHistoryRepository.php → common/logic/Order/OrderStatusHistory/Repository/OrderStatusHistoryRepository.php Bestand weergeven

@@ -1,6 +1,6 @@
<?php

namespace common\logic\Order\OrderStatusHistory;
namespace common\logic\Order\OrderStatusHistory\Repository;

use common\logic\AbstractRepository;


common/logic/Order/OrderStatusHistory/OrderStatusHistoryRepositoryQuery.php → common/logic/Order/OrderStatusHistory/Repository/OrderStatusHistoryRepositoryQuery.php Bestand weergeven

@@ -1,6 +1,6 @@
<?php

namespace common\logic\Order\OrderStatusHistory;
namespace common\logic\Order\OrderStatusHistory\Repository;

use common\logic\AbstractRepositoryQuery;


common/logic/Order/OrderStatusHistory/OrderStatusHistoryBuilder.php → common/logic/Order/OrderStatusHistory/Service/OrderStatusHistoryBuilder.php Bestand weergeven

@@ -1,11 +1,12 @@
<?php

namespace common\logic\Order\OrderStatusHistory;
namespace common\logic\Order\OrderStatusHistory\Service;

use common\logic\AbstractBuilder;
use common\logic\Order\Order\Order;
use common\logic\User\User\User;
use common\logic\User\User\UserSolver;
use common\logic\Order\Order\Model\Order;
use common\logic\Order\OrderStatusHistory\Model\OrderStatusHistory;
use common\logic\User\User\Model\User;
use common\logic\User\User\Service\UserSolver;

class OrderStatusHistoryBuilder extends AbstractBuilder
{

common/logic/Order/OrderStatusHistory/OrderStatusHistoryContainer.php → common/logic/Order/OrderStatusHistory/Wrapper/OrderStatusHistoryContainer.php Bestand weergeven

@@ -1,9 +1,11 @@
<?php

namespace common\logic\Order\OrderStatusHistory;
namespace common\logic\Order\OrderStatusHistory\Wrapper;

use common\logic\AbstractContainer;
use common\logic\PointSale\PointSale\OrderStatusHistoryRepository;
use common\logic\Order\OrderStatusHistory\Model\OrderStatusHistory;
use common\logic\Order\OrderStatusHistory\Repository\OrderStatusHistoryRepository;
use common\logic\Order\OrderStatusHistory\Service\OrderStatusHistoryBuilder;

class OrderStatusHistoryContainer extends AbstractContainer
{

common/logic/Order/OrderStatusHistory/OrderStatusHistoryManager.php → common/logic/Order/OrderStatusHistory/Wrapper/OrderStatusHistoryManager.php Bestand weergeven

@@ -1,9 +1,10 @@
<?php

namespace common\logic\Order\OrderStatusHistory;
namespace common\logic\Order\OrderStatusHistory\Wrapper;

use common\logic\AbstractManager;
use common\logic\PointSale\PointSale\OrderStatusHistoryRepository;
use common\logic\Order\OrderStatusHistory\Repository\OrderStatusHistoryRepository;
use common\logic\Order\OrderStatusHistory\Service\OrderStatusHistoryBuilder;

/**
* @mixin OrderStatusHistoryRepository

common/logic/Order/ProductOrder/ProductOrder.php → common/logic/Order/ProductOrder/Model/ProductOrder.php Bestand weergeven

@@ -36,13 +36,12 @@
* termes.
*/

namespace common\logic\Order\ProductOrder;
namespace common\logic\Order\ProductOrder\Model;

use common\helpers\GlobalParam;
use common\helpers\Price;
use common\components\ActiveRecordCommon;
use common\logic\Config\TaxRate\TaxRate;
use common\logic\Order\Order\Order;
use common\logic\Order\Order\Model\Order;
use common\logic\Product\Product\Product;

/**

Some files were not shown because too many files changed in this diff

Laden…
Annuleren
Opslaan