1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-17 18:59:21 +01:00
openstamanager/modules/primanota/ajax/complete.php

19 lines
721 B
PHP
Raw Normal View History

2018-05-04 17:57:46 +02:00
<?php
include_once __DIR__.'/../../../core.php';
switch ($resource) {
case 'get_conti':
$idmastrino = get('idmastrino');
$conti = [];
$rs_conti = $dbo->fetchArray('SELECT *, (SELECT CONCAT ((SELECT numero FROM co_pianodeiconti2 WHERE id=co_pianodeiconti3.idpianodeiconti2), ".", numero, " ", descrizione) FROM co_pianodeiconti3 WHERE id=co_movimenti_modelli.idconto) AS descrizione_conto FROM co_movimenti_modelli WHERE idmastrino='.prepare($idmastrino).' GROUP BY id ORDER BY id');
2018-05-04 17:57:46 +02:00
for ($i = 0; $i < sizeof($rs_conti); ++$i) {
$conti[$i] = $rs_conti[$i]['idconto'].';'.$rs_conti[$i]['descrizione_conto'];
2018-05-04 17:57:46 +02:00
}
2018-05-04 17:57:46 +02:00
echo implode(',', $conti);
2018-05-04 17:57:46 +02:00
break;
}