gest366/modules/ordini/add.php

39 lines
1.3 KiB
PHP

<?php
include_once(__DIR__."/../../core.php");
if( $modules_info['Ordini cliente']['id'] == $id_module ){
$dir = 'entrata';
$tipo_anagrafica = _("Cliente");
}
else{
$dir = 'uscita';
$tipo_anagrafica = _("Fornitore");
}
?>
<form action="editor.php?id_module=$id_module$" method="post">
<input type="hidden" name="op" value="add">
<input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="dir" value="<?php echo $dir ?>">
<div class="row">
<div class="col-md-6">
{[ "type": "text", "label": "<?php echo _("Data"); ?>", "name": "data", "required": 1, "class": "datepicker text-center", "value": "<?php echo date('d/m/Y') ?>", "extra": "" ]}
</div>
<div class="col-md-6">
{[ "type": "select", "label": "<?php echo $tipo_anagrafica ?>", "name": "idanagrafica", "required": 1, "class": "", "value": "", "extra": "", "value": "<?php echo $idanagrafica ?>", "extra": "", "ajax-source": "<?php
if($tipo_anagrafica == _("Fornitore")) echo 'fornitori';
else echo 'clienti';
?>" ]}
</div>
</div>
<!-- PULSANTI -->
<div class="row">
<div class="col-md-12 text-right">
<button type="submit" class="btn btn-primary"><i class="fa fa-plus"></i> <?php echo _("Aggiungi"); ?></button>
</div>
</div>
</form>