1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-27 00:06:14 +01:00
openstamanager/modules/fatture/add_descrizione.php

50 lines
1.3 KiB
PHP
Raw Normal View History

<?php
include_once __DIR__.'/../../core.php';
$module = Modules::get($id_module);
if ($module['name'] == 'Fatture di vendita') {
$dir = 'entrata';
$conti = 'conti-vendite';
} else {
$dir = 'uscita';
$conti = 'conti-acquisti';
}
2018-07-18 14:50:46 +02:00
$info = $dbo->fetchOne('SELECT * FROM co_documenti WHERE id='.prepare($id_record));
$numero = ($info['numero_esterno'] != '') ? $info['numero_esterno'] : $info['numero'];
$idanagrafica = $info['idanagrafica'];
/*
Form di inserimento riga documento
*/
echo '
<p>'.tr('Documento 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>';
2018-02-18 19:53:23 +01:00
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>
2018-02-18 19:53:23 +01:00
</form>';