Merge branch 'master' of https://github.com/devcode-it/openstamanager
This commit is contained in:
commit
2f7cefcf74
|
@ -200,7 +200,7 @@ switch ($resource) {
|
|||
|
||||
case 'sedi':
|
||||
if (isset($superselect['idanagrafica'])) {
|
||||
$query = "SELECT * FROM (SELECT '0' AS id, CONCAT('Sede legale', ' (' , (SELECT ragione_sociale FROM an_anagrafiche WHERE idanagrafica = ".$superselect['idanagrafica']." ), ')') AS descrizione UNION SELECT id, CONCAT_WS(' - ', nomesede, citta) FROM an_sedi |where|) AS tab |filter| ORDER BY descrizione";
|
||||
$query = "SELECT * FROM (SELECT '0' AS id, CONCAT_WS(' - ', 'Sede legale' , (SELECT CONCAT (citta, ' (', ragione_sociale,')') FROM an_anagrafiche |where|)) AS descrizione UNION SELECT id, CONCAT_WS(' - ', nomesede, citta) FROM an_sedi |where|) AS tab |filter| ORDER BY descrizione";
|
||||
|
||||
foreach ($elements as $element) {
|
||||
$filter[] = 'id='.prepare($element);
|
||||
|
@ -219,7 +219,7 @@ switch ($resource) {
|
|||
if (isset($superselect['idanagrafica'])) {
|
||||
$user = Auth::user();
|
||||
|
||||
$query = "SELECT * FROM (SELECT '0' AS id, CONCAT('Sede legale', ' (' , (SELECT ragione_sociale FROM an_anagrafiche WHERE idanagrafica = ".$user->idanagrafica." ), ')') AS descrizione UNION SELECT id, CONCAT_WS(' - ', nomesede, citta) FROM an_sedi |where|) AS tab |filter| ORDER BY descrizione";
|
||||
$query = "SELECT * FROM (SELECT '0' AS id, CONCAT_WS(' - ', 'Sede legale' , (SELECT CONCAT (citta, ' (', ragione_sociale,')') FROM an_anagrafiche |where|)) AS descrizione UNION SELECT id, CONCAT_WS(' - ', nomesede, citta) FROM an_sedi |where|) AS tab |filter| ORDER BY descrizione";
|
||||
|
||||
foreach ($elements as $element) {
|
||||
$filter[] = 'id='.prepare($element);
|
||||
|
|
|
@ -629,9 +629,13 @@ if ($dir == 'entrata') {
|
|||
echo '
|
||||
<script type="text/javascript">
|
||||
$("#idanagrafica").change(function(){
|
||||
session_set("superselect,idanagrafica", $(this).val(), 0);
|
||||
|
||||
$("#idsede_destinazione").selectReset();
|
||||
session_set("superselect,idanagrafica", $(this).val(), 0);';
|
||||
if ($dir == 'entrata') {
|
||||
echo '$("#idsede_destinazione").selectReset();';
|
||||
}else{
|
||||
echo '$("#idsede_partenza").selectReset();';
|
||||
}
|
||||
echo '
|
||||
});
|
||||
|
||||
$("#ricalcola_scadenze").click(function(){
|
||||
|
|
Loading…
Reference in New Issue