update for hooks
This commit is contained in:
parent
be782e14bd
commit
163ec1ea2e
|
@ -94,6 +94,25 @@ class HookController extends AbstractController
|
||||||
return $this->json($result);
|
return $this->json($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[Route('/hooks/modify/commodity', name: 'app_modify_commodity')]
|
||||||
|
public function app_modify_commodity(Provider $provider, Request $request, Access $access, Log $log, EntityManagerInterface $entityManager, $id = 0): JsonResponse
|
||||||
|
{
|
||||||
|
$acc = $access->hasRole('commodity');
|
||||||
|
if (!$acc)
|
||||||
|
throw $this->createAccessDeniedException();
|
||||||
|
$params = [];
|
||||||
|
if ($content = $request->getContent()) {
|
||||||
|
$params = json_decode($content, true);
|
||||||
|
}
|
||||||
|
$commodityService = new \App\Cog\CommodityService($entityManager);
|
||||||
|
$result = $commodityService->addOrUpdateCommodity($params, $acc, $id);
|
||||||
|
if (isset($result['error'])) {
|
||||||
|
return $this->json($result, 400);
|
||||||
|
}
|
||||||
|
$log->insert('کالا و خدمات', 'کالا / خدمات با نام ' . $params['name'] . ' افزوده/ویرایش شد.', $this->getUser(), $request->headers->get('activeBid'));
|
||||||
|
return $this->json($result);
|
||||||
|
}
|
||||||
|
|
||||||
#[Route('/hooks/info/person', name: 'hook_info_person')]
|
#[Route('/hooks/info/person', name: 'hook_info_person')]
|
||||||
public function hook_info_person($code, Provider $provider, Request $request, Access $access, Log $log, EntityManagerInterface $entityManager, PersonService $personService): JsonResponse
|
public function hook_info_person($code, Provider $provider, Request $request, Access $access, Log $log, EntityManagerInterface $entityManager, PersonService $personService): JsonResponse
|
||||||
{
|
{
|
||||||
|
@ -107,6 +126,13 @@ class HookController extends AbstractController
|
||||||
return $this->json($response);
|
return $this->json($response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#[Route('hooks/setting/getCurrency', name: 'api_hooks_getcurrency')]
|
#[Route('hooks/setting/getCurrency', name: 'api_hooks_getcurrency')]
|
||||||
public function api_hooks_getcurrency(Access $access, Log $log, Request $request, EntityManagerInterface $entityManager): JsonResponse
|
public function api_hooks_getcurrency(Access $access, Log $log, Request $request, EntityManagerInterface $entityManager): JsonResponse
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Developed by Mohammad Rezai
|
||||||
|
* https://pirouz.xyz – 2025-07-28
|
||||||
|
*/
|
||||||
|
|
||||||
namespace App\Controller\Plugins;
|
namespace App\Controller\Plugins;
|
||||||
|
|
||||||
use App\Service\Access;
|
use App\Service\Access;
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Developed by Mohammad Rezai
|
||||||
|
* https://pirouz.xyz – 2025-07-28
|
||||||
|
*/
|
||||||
|
|
||||||
namespace App\Dto;
|
namespace App\Dto;
|
||||||
|
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Developed by Mohammad Rezai
|
||||||
|
* https://pirouz.xyz – 2025-07-28
|
||||||
|
*/
|
||||||
|
|
||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
use App\Repository\PluginTaxInvoiceRepository;
|
use App\Repository\PluginTaxInvoiceRepository;
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Developed by Mohammad Rezai
|
||||||
|
* https://pirouz.xyz – 2025-07-28
|
||||||
|
*/
|
||||||
|
|
||||||
namespace App\Repository;
|
namespace App\Repository;
|
||||||
|
|
||||||
use App\Entity\PluginTaxInvoice;
|
use App\Entity\PluginTaxInvoice;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Developed by Mohammad Rezai
|
||||||
|
* https://pirouz.xyz – 2025-07-28
|
||||||
|
*/
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="sticky-container">
|
<div class="sticky-container">
|
||||||
<v-toolbar color="toolbar" title="صورتحسابهای ارسالی به سامانه مودیان مالیاتی">
|
<v-toolbar color="toolbar" title="صورتحسابهای ارسالی به سامانه مودیان مالیاتی">
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Developed by Mohammad Rezai
|
||||||
|
* https://pirouz.xyz – 2025-07-28
|
||||||
|
*/
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<v-toolbar color="toolbar" title="تنظیمات مالیاتی">
|
<v-toolbar color="toolbar" title="تنظیمات مالیاتی">
|
||||||
|
|
|
@ -291,8 +291,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="isPluginActive('taxsettings')" class="doc-footer">
|
<div class="doc-footer">
|
||||||
<div class="action-buttons">
|
<div v-if="isPluginActive('taxsettings')" class="action-buttons">
|
||||||
<router-link to="/acc/plugins/taxsettings/intro" class="btn btn-info">
|
<router-link to="/acc/plugins/taxsettings/intro" class="btn btn-info">
|
||||||
<i class="fas fa-home"></i>
|
<i class="fas fa-home"></i>
|
||||||
صفحه اصلی افزونه
|
صفحه اصلی افزونه
|
||||||
|
@ -306,6 +306,9 @@
|
||||||
مدیریت فاکتورها
|
مدیریت فاکتورها
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin-top: 20px; font-size: 0.75rem; color: #888; text-align: center;">
|
||||||
|
Developed by <a href="https://pirouz.xyz" target="_blank" style="color: #667eea; text-decoration: none;">Mohammad Rezai</a> – 2025
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -205,8 +205,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="isPluginActive('taxsettings')" class="intro-footer">
|
<div class="intro-footer">
|
||||||
<div class="action-buttons">
|
<div v-if="isPluginActive('taxsettings')" class="action-buttons">
|
||||||
<router-link to="/acc/plugins/taxsettings/doc" class="btn btn-info">
|
<router-link to="/acc/plugins/taxsettings/doc" class="btn btn-info">
|
||||||
<i class="fas fa-book"></i>
|
<i class="fas fa-book"></i>
|
||||||
راهنمای کامل
|
راهنمای کامل
|
||||||
|
@ -220,6 +220,9 @@
|
||||||
مدیریت فاکتورها
|
مدیریت فاکتورها
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="margin-top: 20px; font-size: 0.75rem; color: #888; text-align: center;">
|
||||||
|
Developed by <a href="https://pirouz.xyz" target="_blank" style="color: #667eea; text-decoration: none;">Mohammad Rezai</a> – 2025
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in a new issue