1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2024-12-11 07:56:16 +01:00
openstamanager/modules/preventivi/crea_documento.php

28 lines
574 B
PHP
Raw Normal View History

2019-02-14 17:49:58 +01:00
<?php
include_once __DIR__.'/../../core.php';
use Modules\Preventivi\Preventivo;
$documento = Preventivo::find($id_record);
if (get('documento') == 'fattura') {
$final_module = 'Fatture di vendita';
$op = 'add_documento';
} else {
$final_module = 'Ordini cliente';
$op = 'add_preventivo';
}
2019-02-14 17:49:58 +01:00
$options = [
'op' => $op,
'type' => 'preventivo',
'module' => $final_module,
2019-02-14 17:49:58 +01:00
'button' => tr('Aggiungi'),
'dir' => 'entrata',
'create_document' => true,
'documento' => $documento,
2019-02-14 17:49:58 +01:00
];
echo App::load('importa.php', [], $options, true);