Rimossa scelta conto in fattura perché già presente nelle righe

This commit is contained in:
Fabio Lovato 2018-05-24 18:29:37 +02:00
parent 8308478652
commit ead3528970
1 changed files with 7 additions and 13 deletions

View File

@ -9,6 +9,13 @@ $tipodoc = $rs[0]['descrizione'];
$_SESSION['superselect']['idanagrafica'] = $records[0]['idanagrafica']; $_SESSION['superselect']['idanagrafica'] = $records[0]['idanagrafica'];
$_SESSION['superselect']['ddt'] = $dir; $_SESSION['superselect']['ddt'] = $dir;
if ($dir == 'entrata') {
$conto = 'vendite';
} else {
$conto = 'acquisti';
}
?> ?>
<form action="" method="post" id="edit-form"> <form action="" method="post" id="edit-form">
<input type="hidden" name="backto" value="record-edit"> <input type="hidden" name="backto" value="record-edit">
@ -133,19 +140,6 @@ $_SESSION['superselect']['ddt'] = $dir;
{[ "type": "select", "label": "<?php echo tr('Tipo fattura'); ?>", "name": "idtipodocumento", "required": 1, "values": "query=SELECT id, descrizione FROM co_tipidocumento WHERE dir='<?php echo $dir; ?>'", "value": "$idtipodocumento$" ]} {[ "type": "select", "label": "<?php echo tr('Tipo fattura'); ?>", "name": "idtipodocumento", "required": 1, "values": "query=SELECT id, descrizione FROM co_tipidocumento WHERE dir='<?php echo $dir; ?>'", "value": "$idtipodocumento$" ]}
</div> </div>
<div class="col-md-3">
<?php
if ($dir == 'entrata') {
$ajaxsource = 'conti-vendite';
$conto = 'vendite';
} else {
$ajaxsource = 'conti-acquisti';
$conto = 'acquisti';
}
?>
{[ "type": "select", "label": "<?php echo tr('Conto'); ?>", "name": "idconto", "required": 1, "value": "$idconto$", "ajax-source": "<?php echo $ajaxsource; ?>" ]}
</div>
<div class="col-md-3"> <div class="col-md-3">
{[ "type": "select", "label": "<?php echo tr('Pagamento'); ?>", "name": "idpagamento", "required": 1, "values": "query=SELECT id, descrizione, (SELECT id FROM co_banche WHERE id_pianodeiconti3 = co_pagamenti.idconto_<?php echo $conto; ?> ) AS idbanca FROM co_pagamenti GROUP BY descrizione ORDER BY descrizione ASC", "value": "$idpagamento$", "extra": "onchange=\"$('#idbanca').val( $(this).find('option:selected').data('idbanca') ).change(); \" " ]} {[ "type": "select", "label": "<?php echo tr('Pagamento'); ?>", "name": "idpagamento", "required": 1, "values": "query=SELECT id, descrizione, (SELECT id FROM co_banche WHERE id_pianodeiconti3 = co_pagamenti.idconto_<?php echo $conto; ?> ) AS idbanca FROM co_pagamenti GROUP BY descrizione ORDER BY descrizione ASC", "value": "$idpagamento$", "extra": "onchange=\"$('#idbanca').val( $(this).find('option:selected').data('idbanca') ).change(); \" " ]}
</div> </div>