src/EventListener/WorkflowEvents.php line 476

Open in your IDE?
  1. <?php
  2. namespace App\EventListener;
  3. use Pimcore\Controller\FrontendController;
  4. use \Pimcore\Model\DataObject;
  5. use App\Library\EmailLibrary;
  6. use Symfony\Component\Workflow\Event\EnteredEvent;
  7. use Symfony\Component\Workflow\Event\EnterEvent;
  8. use Symfony\Component\Workflow\Event\AnnounceEvent;
  9. use Pimcore\Model\Comment;
  10. use Symfony\Component\Workflow\Event\CompletedEvent;
  11. use Symfony\Component\Workflow\Event\LeaveEvent;
  12. class WorkflowEvents extends FrontendController {
  13.     private $executePreviousEvents true;
  14.     private $team '';
  15.     private $sendComment false;
  16.     public function sendEmail($team,$objectData,$wfPlace 'correction') {
  17.         $division $objectData->getdivision();
  18.         $productName $objectData->getname();
  19.         $escalationEmail = new DataObject\EscalationEmails\Listing();
  20.         $escalationEmail->setCondition(" division = '$division' ");
  21.         $escalationEmail $escalationEmail->getdata();
  22.         if(count($escalationEmail) && !empty($escalationEmail[0])) {
  23.             $escalationEmail $escalationEmail[0];
  24.             $productId $objectData->getId();
  25.             if($team == 'snop') {
  26.                 $emailIds $escalationEmail->getsnopTeam();
  27.             } else if($team == 'finance') {
  28.                 $emailIds $escalationEmail->getfinanceTeam();
  29.             } else if($team == 'brand') {
  30.                 $emailIds $escalationEmail->getbrandTeam();
  31.             } else if($team == 'packaging') {
  32.                 $emailIds $escalationEmail->getpackagingTeam();
  33.             } else if($team == 'indirectTax') {
  34.                 $emailIds $escalationEmail->getindirecttaxTeam();
  35.             } else if($team == 'operationsTeam') {
  36.                 $emailIds $escalationEmail->getoperationsTeam();
  37.             } else if($team == 'demandPlanningTeam') {
  38.                 $emailIds $escalationEmail->getdemandPlanningTeam();
  39.             } else if($team == 'smisTeam') {
  40.                 $emailIds $escalationEmail->getsmisTeam();
  41.             } else if($team == 'sapTeam') {
  42.                 $emailIds $escalationEmail->getsapTeam();
  43.             }
  44.             if(!empty($emailIds)) {
  45.                 $emailParam = array();
  46.                 $emailParam['to'] = $emailIds;
  47.                 $emailParam['subject'] = 'ITC - Product Approval';
  48.                 // $emailParam['isDebug'] = true;
  49.                 $templateData['product'] = $objectData;
  50.                 $templateData['teamEmail'] = $team;
  51.                 $correction false;
  52.                 $sendBackToSnop false;
  53.                 if($wfPlace == 'correction') {
  54.                     $correction true;
  55.                     $this->sendComment true;
  56.                 } else if ($wfPlace == 'sendBackToSnop') {
  57.                     $sendBackToSnop true;
  58.                 }
  59.                 $templateData['url'] = \Pimcore\Tool::getHostUrl().'/admin/login/deeplink?object_'.$productId.'_object';
  60.                 if (!empty($this->sendComment)) {
  61.                     $dbConnection \Pimcore\Db::get();
  62.                     $notes $dbConnection->fetchAssoc("SELECT * FROM `notes` WHERE cid = '$productId' ORDER BY `id` DESC LIMIT 1");
  63.                     if(!empty(trim($notes['description']))) {
  64.                         $templateData['notes'] = nl2br($notes['description']);
  65.                     }
  66.                 }
  67.                 $user \Pimcore\Tool\Session::getReadonly()->get("user");
  68.                 if (empty($user)) {
  69.                     $templateData['userInfo'] = \Pimcore\Model\User::getById($user->getId());
  70.                 }
  71.                 $templateData['correction'] = $correction;
  72.                 $templateData['sendBackToSnop'] = $sendBackToSnop;
  73.                 $templateData['productName'] = $productName;
  74.                 $templateData['team'] = $this->team;
  75.                 $emailParam['message'] = $this->render('default/escalation_email_template.html.twig'$templateData)->getContent();
  76.                 $emailLib = new EmailLibrary();
  77.                 $sendEmail $emailLib->sendEmailNotification($emailParam);
  78.             }
  79.         }
  80.     }
  81.     public function snopCorrection($objectData) {
  82.         if ($this->executePreviousEvents) {
  83.             $this->sendEmail('snop',$objectData);
  84.         }
  85.     }
  86.     public function financeCorrection($objectData) {
  87.         if ($this->executePreviousEvents) {
  88.             $this->sendEmail('finance',$objectData);
  89.         }
  90.     }
  91.     public function brandCorrection($objectData) {
  92.         if ($this->executePreviousEvents) {
  93.             $this->sendEmail('brand',$objectData,'correction');
  94.         }
  95.     }
  96.     public function packagingCorrection($objectData) {
  97.         if ($this->executePreviousEvents) {
  98.             $this->sendEmail('packaging',$objectData);
  99.         }
  100.     }
  101.     public function indirectTaxCorrection($objectData) {
  102.         if ($this->executePreviousEvents) {
  103.             $this->sendEmail('indirectTax',$objectData);
  104.         }
  105.     }
  106.     public function operationteamCorrection($objectData) {
  107.         if ($this->executePreviousEvents) {
  108.             $this->sendEmail('operationsTeam',$objectData);
  109.         }
  110.     }
  111.     public function demandPlanningTeam($objectData) {
  112.         if ($this->executePreviousEvents) {
  113.             $this->sendEmail('demandPlanningTeam',$objectData);
  114.         }
  115.     }
  116.     public function smisTeam($objectData) {
  117.         if ($this->executePreviousEvents) {
  118.             $this->sendEmail('smisTeam',$objectData);
  119.         }
  120.     }
  121.     public function financeAction($objectData) {
  122.         if ($this->executePreviousEvents) {
  123.             $this->sendEmail('finance',$objectData,'Finance');
  124.         }
  125.     }
  126.     public function brandAction($objectData) {
  127.         if ($this->executePreviousEvents) {
  128.             $this->sendEmail('brand',$objectData,'Brand');
  129.         }
  130.     }
  131.     public function packagingAction($objectData) {
  132.         if ($this->executePreviousEvents) {
  133.             $this->sendEmail('packaging',$objectData,'Packaging');
  134.         }
  135.     }
  136.     public function indirectTaxAction($objectData) {
  137.         if ($this->executePreviousEvents) {
  138.             $this->sendEmail('indirectTax',$objectData,'Indirect Tax');
  139.         }
  140.     }
  141.     public function operationsAction($objectData) {
  142.         if ($this->executePreviousEvents) {
  143.             $this->sendEmail('operationsTeam',$objectData,'Operations Team');
  144.         }
  145.     }
  146.     public function demandPlanningAction($objectData) {
  147.         if ($this->executePreviousEvents) {
  148.             $this->sendEmail('demandPlanningTeam',$objectData,'Demand Planning Team');
  149.         }
  150.     }
  151.     public function smisAction($objectData) {
  152.         if ($this->executePreviousEvents) {
  153.             $this->sendEmail('smisTeam',$objectData,'SMIS');
  154.         }
  155.     }
  156.     public function sapAction($objectData) {
  157.         if ($this->executePreviousEvents) {
  158.             $this->sendEmail('sapTeam',$objectData,'sap');
  159.         }
  160.     }
  161.     public function packagingToSnop($objectData) {
  162.         if ($this->executePreviousEvents) {
  163.             $this->team 'Packaging Team';
  164.             $this->sendEmail('snop',$objectData,'sendBackToSnop');
  165.         }
  166.     }
  167.     public function financeToSnop($objectData) {
  168.         if ($this->executePreviousEvents) {
  169.             $this->team 'Finance Team';
  170.             $this->sendEmail('snop',$objectData,'sendBackToSnop');
  171.         }
  172.     }
  173.     public function brandToSnop($objectData) {
  174.         if ($this->executePreviousEvents) {
  175.             $this->team 'Brand Team';
  176.             $this->sendEmail('snop',$objectData,'sendBackToSnop');
  177.         }
  178.     }
  179.     public function indirectTaxToSnop($objectData) {
  180.         if ($this->executePreviousEvents) {
  181.             $this->team 'Indirect Tax Team';
  182.             $this->sendEmail('snop',$objectData,'sendBackToSnop');
  183.         }
  184.     }
  185.     public function operationsToSnop($objectData) {
  186.         if ($this->executePreviousEvents) {
  187.             $this->team 'Operations Team';
  188.             $this->sendEmail('snop',$objectData,'sendBackToSnop');
  189.         }
  190.     }
  191.     public function demandPlanningToSnop($objectData) {
  192.         if ($this->executePreviousEvents) {
  193.             $this->team 'Demand Planning Team';
  194.             $this->sendEmail('snop',$objectData,'sendBackToSnop');
  195.         }
  196.     }
  197.     public function smisToSnop($objectData) {
  198.         if ($this->executePreviousEvents) {
  199.             $this->team 'SMIS Team';
  200.             $this->sendEmail('snop',$objectData,'sendBackToSnop');
  201.         }
  202.     }
  203.     public function sapApproved($objectData) {
  204.         $this->createMarketPlaceProduct($objectData);
  205.     }
  206.     public function createMarketPlaceProduct($productObj) {
  207.         $key $productObj->getkey();
  208.         // Create Amazon DataObject
  209.         // $size = $productObj->getsize();
  210.         // $product_type = $productObj->getproduct_type();
  211.         $newObject = new DataObject\ProductAmazon();
  212.         $newObject->setKey(\Pimcore\Model\Element\Service::getValidKey('A_'.$key'object'));
  213.         // $newObject->setproduct_type($size);
  214.         // $newObject->setsize($product_type);
  215.         $newObject->setstoreProduct($productObj);
  216.         $newObject->seto_parentId('1');
  217.         $newObject->save(["versionNote" => "Product created from SAP"]);
  218.         // Create Big Basket DataObject
  219.         // $how_to_use = $productObj->gethow_to_use();
  220.         // $product_description = $productObj->getproduct_description();
  221.         $hsn_code $productObj->gethsn_code();
  222.         $newObject = new DataObject\ProductBigBasket();
  223.         $newObject->setKey(\Pimcore\Model\Element\Service::getValidKey('BB_'.$key'object'));
  224.         // $newObject->sethow_to_use($how_to_use);
  225.         // $newObject->setproduct_description($product_description);
  226.         $newObject->sethsn_code($hsn_code);
  227.         $newObject->seto_parentId('1');
  228.         $newObject->setstoreProduct($productObj);
  229.         $newObject->save(["versionNote" => "Product created from SAP"]);
  230.         // Create Blinkit DataObject
  231.         // $key_features = $productObj->getkey_features();
  232.         // $product_type = $productObj->getproduct_type();
  233.         // $price = $productObj->getprice();
  234.         // $ingredients = $productObj->getingredients();
  235.         $newObject = new DataObject\ProductBlinkit();
  236.         $newObject->setKey(\Pimcore\Model\Element\Service::getValidKey('BI_'.$key'object'));
  237.         // $newObject->setkey_features($key_features);
  238.         // $newObject->setproduct_type($product_type);
  239.         // $newObject->setprice($price);
  240.         // $newObject->setingredients($ingredients);
  241.         $newObject->seto_parentId('1');
  242.         $newObject->setstoreProduct($productObj);
  243.         $newObject->save(["versionNote" => "Product created from SAP"]);
  244.         $newObject = new DataObject\ProductFlipkart();
  245.         $newObject->setKey(\Pimcore\Model\Element\Service::getValidKey('FK_'.$key'object'));
  246.         $newObject->seto_parentId('1');
  247.         $newObject->setstoreProduct($productObj);
  248.         $newObject->save(["versionNote" => "Product created from SAP"]);
  249.         // Create JioMart DataObject
  250.         $hsn_code $productObj->gethsn_code();
  251.         // $how_to_use = $productObj->gethow_to_use();
  252.         // $product_type = $productObj->getproduct_type();
  253.         // $ingredients = $productObj->getingredients();
  254.         // $size = $productObj->getsize();
  255.         // $food_type = $productObj->getfood_type();
  256.         $newObject = new DataObject\ProductJioMart();
  257.         $newObject->setKey(\Pimcore\Model\Element\Service::getValidKey('JM_'.$key'object'));
  258.         $newObject->sethsn_code($hsn_code);
  259.         // $newObject->sethow_to_use($how_to_use);
  260.         // $newObject->setproduct_type($product_type);
  261.         // $newObject->setingredients($ingredients);
  262.         // $newObject->setsize($size);
  263.         // $newObject->setfood_type($food_type);
  264.         $newObject->seto_parentId('1');
  265.         $newObject->setstoreProduct($productObj);
  266.         $newObject->save(["versionNote" => "Product created from SAP"]);
  267.         // Create Swiggy DataObject
  268.         $sku_name $productObj->getmaterial_number();
  269.         $weight $productObj->getpack_weight();
  270.         $newObject = new DataObject\ProductSwiggy();
  271.         $newObject->setKey(\Pimcore\Model\Element\Service::getValidKey('SG_'.$key'object'));
  272.         $newObject->setsku_name($sku_name);
  273.         $newObject->setweight($weight);
  274.         $newObject->seto_parentId('1');
  275.         $newObject->setstoreProduct($productObj);
  276.         $newObject->save(["versionNote" => "Product created from SAP"]);
  277.         // Create Zepto DataObject
  278.         $newObject = new DataObject\ProductZepto();
  279.         $newObject->setKey(\Pimcore\Model\Element\Service::getValidKey('Zepto_'.$key'object'));
  280.         $newObject->sethsn_code($hsn_code);
  281.         $newObject->seto_parentId('1');
  282.         $newObject->setstoreProduct($productObj);
  283.         $newObject->save(["versionNote" => "Product created from SAP"]);
  284.         $msku $productObj->getold_material_number();
  285.         $sku_name $productObj->getname();
  286.         $newObject = new DataObject\ProductITCStore();
  287.         $newObject->setKey(\Pimcore\Model\Element\Service::getValidKey('Store_'.$key'object'));
  288.         $newObject->seto_parentId('1');
  289.         $newObject->setmsku_itcstore($msku);
  290.         $newObject->setsku_name($sku_name);
  291.         $newObject->setproduct_title($sku_name);
  292.         $newObject->setstoreProduct($productObj);
  293.         $newObject->save(["versionNote" => "Product created from SAP"]);
  294.         // $productSyncKey = "enlwq7pkg6t2od9blt93coomo7g6p9p0"; // Live Integration
  295.         $productSyncKey "qzgg1vbpgwk6pjctbv6ku2a65906ocpb"// Local
  296.         // $productUpdatedUrl = 'https://integration-5ojmyuq-23txbi6folvo6.ap-3.magentosite.cloud/rest/V1/bridge/catalog/product/add';
  297.         $productUpdatedUrl 'http://local.itc.com/rest/V1/bridge/catalog/product/add';
  298.         $data = array( "product_id" => $productObj->getId(),"store_view_id" => "0", );
  299.         $data_json json_encode(array("data" => $data));
  300.         $curl curl_init();
  301.         curl_setopt($curlCURLOPT_CUSTOMREQUEST"PUT");
  302.         curl_setopt($curlCURLOPT_POSTFIELDS$data_json);
  303.         curl_setopt($curlCURLOPT_URL$productUpdatedUrl);
  304.         curl_setopt($curlCURLOPT_HTTPHEADER, array( 'Authorization: Bearer ' $productSyncKey'Accept: application/json''Content-Type:application/json', ));
  305.         curl_setopt($curlCURLOPT_RETURNTRANSFER1);
  306.         curl_setopt($curlCURLOPT_HTTPAUTHCURLAUTH_BASIC);
  307.         $result curl_exec($curl);
  308.         $resultArray json_decode($result);
  309.         curl_close($curl);
  310.     }
  311.     public function snopEmailNotification(EnterEvent $e) {
  312.         $objectData $e->getSubject();
  313.         $productId $objectData->getId();
  314.         $transition $e->getTransition();
  315.         $toPlace $transition->getTos();
  316.         foreach ($toPlace as $key => $value) {
  317.             switch ($value) {
  318.                 case 'packaging_to_snop':
  319.                     $this->packagingToSnop($objectData);
  320.                     break;
  321.                 case 'finance_to_snop':
  322.                     $this->financeToSnop($objectData);
  323.                     break;
  324.                 case 'brand_to_snop':
  325.                     $this->brandToSnop($objectData);
  326.                     break;
  327.                 case 'indirectTax_to_snop':
  328.                     $this->indirectTaxToSnop($objectData);
  329.                     break;
  330.                 case 'operations_to_snop':
  331.                     $this->operationsToSnop($objectData);
  332.                     break;
  333.                 case 'demandPlanning_to_snop':
  334.                     $this->demandPlanningToSnop($objectData);
  335.                     break;
  336.                 case 'smis_to_snop':
  337.                     $this->smisToSnop($objectData);
  338.                     break;
  339.     
  340.                 default:
  341.                     # code...
  342.                     break;
  343.             }
  344.         }
  345.     }
  346.     public function sapCorrectionEmails(AnnounceEvent $e) {
  347.         if ($this->executePreviousEvents) {
  348.             $this->sendComment true;
  349.             $objectData $e->getSubject();
  350.             $productId $objectData->getId();
  351.             $transition $e->getTransition();
  352.             $toPlace $transition->getTos();
  353.             foreach ($toPlace as $key => $value) {
  354.                 switch ($value) {
  355.                     case 'snop_packaging_correction':
  356.                         $this->packagingCorrection($objectData);
  357.                         break;
  358.                     case 'snop_finance_correction':
  359.                         $this->financeCorrection($objectData);
  360.                         break;
  361.                     case 'snop_brand_correction':
  362.                         $this->brandCorrection($objectData);
  363.                         break;
  364.                     case 'snop_indirectTax_correction':
  365.                         $this->indirectTaxCorrection($objectData);
  366.                         break;
  367.                     case 'snop_operations_correction':
  368.                         $this->operationteamCorrection($objectData);
  369.                         break;
  370.                     case 'snop_demandPlanning_correction':
  371.                         $this->demandPlanningTeam($objectData);
  372.                         break;
  373.                     case 'snop_smis_correction':
  374.                         $this->smisTeam($objectData);
  375.                         break;
  376.                     case 'packaging_correction':
  377.                         $this->packagingCorrection($objectData);
  378.                         break;
  379.                     case 'finance_correction':
  380.                         $this->financeCorrection($objectData);
  381.                         break;
  382.                     case 'brand_correction':
  383.                         $this->brandCorrection($objectData);
  384.                         break;
  385.                     case 'indirectTax_correction':
  386.                         $this->indirectTaxCorrection($objectData);
  387.                         break;
  388.                     case 'operations_correction':
  389.                         $this->operationteamCorrection($objectData);
  390.                         break;
  391.                     case 'demandPlanning_correction':
  392.                         $this->demandPlanningTeam($objectData);
  393.                         break;
  394.                     case 'smis_correction':
  395.                         $this->smisTeam($objectData);
  396.                         break;
  397.                     case 'snop_correction':
  398.                         $this->snopCorrection($objectData);
  399.                         break;
  400.                     case 'finance_action':
  401.                         $this->financeAction($objectData);
  402.                         break;
  403.                     case 'brand_action':
  404.                         $this->brandAction($objectData);
  405.                         break;
  406.                     case 'packaging_action':
  407.                         $this->packagingAction($objectData);
  408.                         break;
  409.                     case 'indirect_tax_action':
  410.                         $this->indirectTaxAction($objectData);
  411.                         break;
  412.                     case 'operations_action':
  413.                         $this->operationsAction($objectData);
  414.                         break;
  415.                     case 'demand_planning_action':
  416.                         $this->demandPlanningAction($objectData);
  417.                         break;
  418.                     case 'smis_action':
  419.                         $this->smisAction($objectData);
  420.                         break;
  421.                     case 'sap_action':
  422.                         $this->sapAction($objectData);
  423.                         break;
  424.                     case 'packaging_to_snop':
  425.                         $this->packagingToSnop($objectData);
  426.                         break;
  427.                     case 'finance_to_snop':
  428.                         $this->financeToSnop($objectData);
  429.                         break;
  430.                     case 'brand_to_snop':
  431.                         $this->brandToSnop($objectData);
  432.                         break;
  433.                     case 'indirectTax_to_snop':
  434.                         $this->indirectTaxToSnop($objectData);
  435.                         break;
  436.                     case 'operations_to_snop':
  437.                         $this->operationsToSnop($objectData);
  438.                         break;
  439.                     case 'demandPlanning_to_snop':
  440.                         $this->demandPlanningToSnop($objectData);
  441.                         break;
  442.                     case 'smis_to_snop':
  443.                         $this->smisToSnop($objectData);
  444.                         break;
  445.                     case 'packaging_correction':
  446.                         $this->packagingCorrection($objectData);
  447.                         break;
  448.                     default:
  449.                         break;
  450.                 }
  451.             }
  452.             $this->executePreviousEvents false;
  453.         }
  454.     }
  455.     public function correctionEmails(CompletedEvent $e) {
  456.         if ($this->executePreviousEvents) {
  457.             $this->sendComment true;
  458.             $objectData $e->getSubject();
  459.             $productId $objectData->getId();
  460.             $transition $e->getTransition();
  461.             $toPlace $transition->getTos();
  462.             foreach ($toPlace as $key => $value) {
  463.                 switch ($value) {
  464.                     case 'packaging_correction':
  465.                         $this->packagingCorrection($objectData);
  466.                         break;
  467.                     case 'finance_correction':
  468.                         $this->financeCorrection($objectData);
  469.                         break;
  470.                     case 'brand_correction':
  471.                         $this->brandCorrection($objectData);
  472.                         break;
  473.                     
  474.                     case 'indirectTax_correction':
  475.                         $this->indirectTaxCorrection($objectData);
  476.                         break;
  477.                     
  478.                     case 'operations_correction':
  479.                         $this->operationteamCorrection($objectData);
  480.                         break;
  481.                     
  482.                     case 'demandPlanning_correction':
  483.                         $this->demandPlanningTeam($objectData);
  484.                         break;
  485.                     
  486.                     case 'smis_correction':
  487.                         $this->smisTeam($objectData);
  488.                         break;
  489.                     case 'snop_correction':
  490.                         $this->snopCorrection($objectData);
  491.                         break;
  492.                     default:
  493.                         # code...
  494.                         break;
  495.                 }
  496.             }
  497.             $this->executePreviousEvents false;
  498.         }
  499.     }
  500.     public function emailNotification(EnterEvent $e) {
  501.         if ($this->executePreviousEvents) {
  502.             $objectData $e->getSubject();
  503.             $productId $objectData->getId();
  504.             $transition $e->getTransition();
  505.             $toPlace $transition->getTos();
  506.             foreach ($toPlace as $key => $value) {
  507.                 switch ($value) {
  508.                     case 'finance_action':
  509.                         $this->financeAction($objectData);
  510.                         break;
  511.                     case 'brand_action':
  512.                         $this->brandAction($objectData);
  513.                         break;
  514.                     case 'packaging_action':
  515.                         $this->packagingAction($objectData);
  516.                         break;
  517.                     case 'indirect_tax_action':
  518.                         $this->indirectTaxAction($objectData);
  519.                         break;
  520.                     case 'operations_action':
  521.                         $this->operationsAction($objectData);
  522.                         break;
  523.                     case 'demand_planning_action':
  524.                         $this->demandPlanningAction($objectData);
  525.                         break;
  526.                     case 'smis_action':
  527.                         $this->smisAction($objectData);
  528.                         break;
  529.                     case 'sap_action':
  530.                         $this->sapAction($objectData);
  531.                         break;
  532.                     case 'packaging_to_snop':
  533.                         $this->packagingToSnop($objectData);
  534.                         break;
  535.                     case 'finance_to_snop':
  536.                         $this->financeToSnop($objectData);
  537.                         break;
  538.                     case 'brand_to_snop':
  539.                         $this->brandToSnop($objectData);
  540.                         break;
  541.                     case 'indirectTax_to_snop':
  542.                         $this->indirectTaxToSnop($objectData);
  543.                         break;
  544.                     case 'operations_to_snop':
  545.                         $this->operationsToSnop($objectData);
  546.                         break;
  547.                     case 'demandPlanning_to_snop':
  548.                         $this->demandPlanningToSnop($objectData);
  549.                         break;
  550.                     case 'smis_to_snop':
  551.                         $this->smisToSnop($objectData);
  552.                         break;
  553.                     case 'packaging_correction':
  554.                         $this->packagingCorrection($objectData);
  555.                         break;
  556.                     case 'finance_correction':
  557.                         $this->financeCorrection($objectData);
  558.                         break;
  559.                     case 'brand_correction':
  560.                         $this->brandCorrection($objectData);
  561.                         break;
  562.                     
  563.                     case 'indirectTax_correction':
  564.                         $this->indirectTaxCorrection($objectData);
  565.                         break;
  566.                     
  567.                     case 'operations_correction':
  568.                         $this->operationteamCorrection($objectData);
  569.                         break;
  570.                     
  571.                     case 'demandPlanning_correction':
  572.                         $this->demandPlanningTeam($objectData);
  573.                         break;
  574.                     
  575.                     case 'smis_correction':
  576.                         $this->smisTeam($objectData);
  577.                         break;
  578.                     case 'snop_correction':
  579.                         $this->snopCorrection($objectData);
  580.                         break;
  581.                     case 'sap_approved':
  582.                         $this->sapApproved($objectData);
  583.                         break;
  584.         
  585.                     default:
  586.                         # code...
  587.                         break;
  588.                 }
  589.             }
  590.             $this->executePreviousEvents false;
  591.         }
  592.     }
  593. }