feat: aggiunta risorsa api per pagamenti
This commit is contained in:
parent
4e40f492d5
commit
a60182abc4
|
@ -0,0 +1,50 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* OpenSTAManager: il software gestionale open source per l'assistenza tecnica e la fatturazione
|
||||||
|
* Copyright (C) DevCode s.r.l.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Modules\Pagamenti\API\v1;
|
||||||
|
|
||||||
|
use API\Interfaces\RetrieveInterface;
|
||||||
|
use API\Resource;
|
||||||
|
use Modules\Pagamenti\Pagamento;
|
||||||
|
|
||||||
|
class Pagamenti extends Resource implements RetrieveInterface
|
||||||
|
{
|
||||||
|
public function retrieve($request)
|
||||||
|
{
|
||||||
|
// Periodo per selezionare interventi
|
||||||
|
$user = \Auth::user();
|
||||||
|
|
||||||
|
$table = 'co_pagamenti';
|
||||||
|
|
||||||
|
$select = [
|
||||||
|
'co_pagamenti.*'
|
||||||
|
];
|
||||||
|
|
||||||
|
$where = [];
|
||||||
|
|
||||||
|
$group = 'co_pagamenti.id';
|
||||||
|
|
||||||
|
return [
|
||||||
|
'table' => $table,
|
||||||
|
'select' => $select,
|
||||||
|
'where' => $where,
|
||||||
|
'group' => $group,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
|
@ -96,4 +96,7 @@ UPDATE `zz_views_lang` SET `title` = 'emailto_Email' WHERE `zz_views_lang`.`id_r
|
||||||
ALTER TABLE `mg_articoli` ADD `modello` VARCHAR(255) NULL AFTER `id_marchio`;
|
ALTER TABLE `mg_articoli` ADD `modello` VARCHAR(255) NULL AFTER `id_marchio`;
|
||||||
|
|
||||||
-- Fix filtro segmento Non completate in Attività
|
-- Fix filtro segmento Non completate in Attività
|
||||||
UPDATE `zz_segments` SET `clause` = 'in_interventi.idstatointervento NOT IN(SELECT in_statiintervento.id FROM in_statiintervento WHERE is_completato=1)' WHERE `zz_segments`.`name` = 'Non completate' AND `id_module` = (SELECT `id` FROM `zz_modules` WHERE `name` = 'Interventi');
|
UPDATE `zz_segments` SET `clause` = 'in_interventi.idstatointervento NOT IN(SELECT in_statiintervento.id FROM in_statiintervento WHERE is_completato=1)' WHERE `zz_segments`.`name` = 'Non completate' AND `id_module` = (SELECT `id` FROM `zz_modules` WHERE `name` = 'Interventi');
|
||||||
|
|
||||||
|
INSERT INTO `zz_api_resources` (`id`, `version`, `type`, `resource`, `class`, `enabled`) VALUES
|
||||||
|
(NULL, 'v1', 'retrieve', 'pagamenti', 'Modules\\Pagamenti\\API\\v1\\Pagamenti', 1);
|
Loading…
Reference in New Issue