openstamanager/modules/ddt/add_descrizione.php

48 lines
1.2 KiB
PHP

<?php
include_once __DIR__.'/../../core.php';
$module = Modules::get($id_module);
if ($module['name'] == 'Ddt di vendita') {
$dir = 'entrata';
} else {
$dir = 'uscita';
}
// Info documento
$rs = $dbo->fetchArray('SELECT * FROM dt_ddt WHERE id='.prepare($id_record));
$numero = (!empty($rs[0]['numero_esterno'])) ? $rs[0]['numero_esterno'] : $rs[0]['numero'];
$idanagrafica = $rs[0]['idanagrafica'];
/*
Form di inserimento riga ddt
*/
echo '
<p>'.tr('Ddt numero _NUM_', [
'_NUM_' => $numero,
]).'</p>
<form action="'.$rootdir.'/editor.php?id_module='.$id_module.'&id_record='.$id_record.'" method="post">
<input type="hidden" name="op" value="adddescrizione">
<input type="hidden" name="backto" value="record-edit">
<input type="hidden" name="dir" value="'.$dir.'">';
// Descrizione
echo '
<div class="row">
<div class="col-md-12">
{[ "type": "textarea", "label": "'.tr('Descrizione').'", "name": "descrizione", "required": 1 ]}
</div>
</div>';
echo '
<!-- PULSANTI -->
<div class="row">
<div class="col-md-12 text-right">
<button type="submit" class="btn btn-primary pull-right"><i class="fa fa-plus"></i> '.tr('Aggiungi').'</button>
</div>
</div>
</form>';