update for hooks
This commit is contained in:
parent
be782e14bd
commit
163ec1ea2e
|
@ -90,7 +90,26 @@ class HookController extends AbstractController
|
|||
|
||||
$person = $personService->getPersonInfo($result['code'], $acc);
|
||||
$result['person'] = $person;
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -107,6 +126,13 @@ class HookController extends AbstractController
|
|||
return $this->json($response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#[Route('hooks/setting/getCurrency', name: 'api_hooks_getcurrency')]
|
||||
public function api_hooks_getcurrency(Access $access, Log $log, Request $request, EntityManagerInterface $entityManager): JsonResponse
|
||||
{
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Developed by Mohammad Rezai
|
||||
* https://pirouz.xyz – 2025-07-28
|
||||
*/
|
||||
|
||||
namespace App\Controller\Plugins;
|
||||
|
||||
use App\Service\Access;
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Developed by Mohammad Rezai
|
||||
* https://pirouz.xyz – 2025-07-28
|
||||
*/
|
||||
|
||||
namespace App\Dto;
|
||||
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Developed by Mohammad Rezai
|
||||
* https://pirouz.xyz – 2025-07-28
|
||||
*/
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\PluginTaxInvoiceRepository;
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Developed by Mohammad Rezai
|
||||
* https://pirouz.xyz – 2025-07-28
|
||||
*/
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\PluginTaxInvoice;
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
<template>
|
||||
/*
|
||||
* Developed by Mohammad Rezai
|
||||
* https://pirouz.xyz – 2025-07-28
|
||||
*/
|
||||
|
||||
<template>
|
||||
<div class="sticky-container">
|
||||
<v-toolbar color="toolbar" title="صورتحسابهای ارسالی به سامانه مودیان مالیاتی">
|
||||
<template v-slot:prepend>
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
<template>
|
||||
/*
|
||||
* Developed by Mohammad Rezai
|
||||
* https://pirouz.xyz – 2025-07-28
|
||||
*/
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<v-toolbar color="toolbar" title="تنظیمات مالیاتی">
|
||||
<template v-slot:prepend>
|
||||
|
|
|
@ -291,8 +291,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="isPluginActive('taxsettings')" class="doc-footer">
|
||||
<div class="action-buttons">
|
||||
<div class="doc-footer">
|
||||
<div v-if="isPluginActive('taxsettings')" class="action-buttons">
|
||||
<router-link to="/acc/plugins/taxsettings/intro" class="btn btn-info">
|
||||
<i class="fas fa-home"></i>
|
||||
صفحه اصلی افزونه
|
||||
|
@ -306,6 +306,9 @@
|
|||
مدیریت فاکتورها
|
||||
</router-link>
|
||||
</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>
|
||||
</template>
|
||||
|
|
|
@ -205,8 +205,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="isPluginActive('taxsettings')" class="intro-footer">
|
||||
<div class="action-buttons">
|
||||
<div class="intro-footer">
|
||||
<div v-if="isPluginActive('taxsettings')" class="action-buttons">
|
||||
<router-link to="/acc/plugins/taxsettings/doc" class="btn btn-info">
|
||||
<i class="fas fa-book"></i>
|
||||
راهنمای کامل
|
||||
|
@ -220,6 +220,9 @@
|
|||
مدیریت فاکتورها
|
||||
</router-link>
|
||||
</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>
|
||||
</template>
|
||||
|
|
Loading…
Reference in a new issue