1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-30 01:31:14 +01:00
openstamanager/modules/primanota/ajax/complete.php

19 lines
598 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 descrizione FROM co_pianodeiconti3 WHERE id=co_movimenti_modelli.idconto) AS descrizione_conto FROM co_movimenti_modelli WHERE idmastrino='.prepare($idmastrino).' GROUP 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;
}