mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-16 11:30:55 +01:00
Merge branch 'master' of https://github.com/devcode-it/openstamanager
This commit is contained in:
commit
73f2a6a97f
@ -4,7 +4,7 @@ Tutti i maggiori cambiamenti di questo progetto saranno documentati in questo fi
|
||||
|
||||
Il formato utilizzato è basato sulle linee guida di [Keep a Changelog](http://keepachangelog.com/), e il progetto segue il [Semantic Versioning](http://semver.org/) per definire le versioni delle release.
|
||||
|
||||
- [2.4.37 (2022-10-26)](#2437-2022-10-26)
|
||||
- [2.4.37 (2022-10-27)](#2437-2022-10-27)
|
||||
- [2.4.36 (2022-09-16)](#2436-2022-09-16)
|
||||
- [2.4.35 (2022-08-12)](#2435-2022-08-12)
|
||||
- [2.4.34 (2022-07-15)](#2434-2022-07-15)
|
||||
@ -49,9 +49,10 @@ Il formato utilizzato è basato sulle linee guida di [Keep a Changelog](http://k
|
||||
- [2.1 (2015-04-02)](#21-2015-04-02)
|
||||
|
||||
|
||||
## 2.4.37 (2022-20-26)
|
||||
## 2.4.37 (2022-20-27)
|
||||
### Aggiunto (Added)
|
||||
- Aggiunto modulo Mappa per geolocalizzare le attività
|
||||
- Aggiunta tipologia documento TD28
|
||||
- Aggiunta tipologia TD21 nei controlli per autofattura
|
||||
- Aggiunte cartelle e file da escludere dal backup
|
||||
- Aggiunto confronto con secondo checksum del database per la versione 5.7.x di MySQL
|
||||
@ -64,6 +65,8 @@ Il formato utilizzato è basato sulle linee guida di [Keep a Changelog](http://k
|
||||
- Aggiunta selezione colore in Stati dei preventivi
|
||||
- Aggiunto il supporto ai valori multipli nelle impostazioni
|
||||
- Aggiunta colonna Anagrafica in Movimenti
|
||||
- Aggiunto codice fornitore in ordini cliente
|
||||
- Aggiunta selezione periodo nelle stampe contabili
|
||||
### Modificato(Changed)
|
||||
- Miglioria per velocizzazione apertura DDT
|
||||
- Migliorie modulo Causali
|
||||
@ -92,6 +95,7 @@ Il formato utilizzato è basato sulle linee guida di [Keep a Changelog](http://k
|
||||
- Corretto indirizzo google in modifica sede
|
||||
- Corretto calcolo numero maschera
|
||||
- Rimozione visualizzazione delle azioni di gruppo nei plugin
|
||||
- Corretta notifica di numerazione errata nei DDT in entrata
|
||||
|
||||
## 2.4.36 (2022-09-16)
|
||||
### Aggiunto (Added)
|
||||
|
23
actions.php
23
actions.php
@ -81,14 +81,6 @@ if (filter('op') == 'aggiungi-allegato' || filter('op') == 'rimuovi-allegato') {
|
||||
]);
|
||||
|
||||
|
||||
echo '
|
||||
<link rel="stylesheet" type="text/css" href="'.$baseurl.'/assets/dist/css/app.min.css" />';
|
||||
|
||||
|
||||
echo '
|
||||
<script src="'.$baseurl.'/assets/dist/js/app.min.js"></script>';
|
||||
|
||||
|
||||
// Creazione file fisico
|
||||
if (!empty($upload)) {
|
||||
//flash()->info(tr('File caricato correttamente!'));
|
||||
@ -96,14 +88,13 @@ if (filter('op') == 'aggiungi-allegato' || filter('op') == 'rimuovi-allegato') {
|
||||
$id_allegato = $dbo->lastInsertedID();
|
||||
$upload = Upload::find($id_allegato);
|
||||
|
||||
echo '
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
window.parent.toastr.success("'.tr('Caricamento riuscito').'");
|
||||
window.parent.CKEDITOR.tools.callFunction('.$funcNum.', "'.$baseurl.'/'.$upload->filepath.'");
|
||||
});
|
||||
</script>';
|
||||
|
||||
$response = [
|
||||
'fileName' => basename($upload->filepath),
|
||||
'uploaded' => 1,
|
||||
'url' => $upload->filepath
|
||||
];
|
||||
|
||||
echo json_encode($response);
|
||||
|
||||
} else {
|
||||
|
||||
|
@ -29,16 +29,18 @@ if ($module['name'] == 'Ddt di acquisto') {
|
||||
$dir = 'entrata';
|
||||
}
|
||||
|
||||
$numero_previsto = verifica_numero_ddt($ddt);
|
||||
if (!empty($numero_previsto)) {
|
||||
echo '
|
||||
<div class="alert alert-warning">
|
||||
<i class="fa fa-warning"></i> '.tr("E' assente un _TYPE_ numero _NUM_ in data precedente o corrispondente a _DATE_: si potrebbero verificare dei problemi con la numerazione corrente delle fatture", [
|
||||
'_TYPE_' => $module['name'],
|
||||
'_DATE_' => dateFormat($ddt->data),
|
||||
'_NUM_' => '"'.$numero_previsto.'"',
|
||||
]).'.</b>
|
||||
</div>';
|
||||
if ($dir=='entrata') {
|
||||
$numero_previsto = verifica_numero_ddt($ddt);
|
||||
if (!empty($numero_previsto)) {
|
||||
echo '
|
||||
<div class="alert alert-warning">
|
||||
<i class="fa fa-warning"></i> '.tr("E' assente un _TYPE_ numero _NUM_ in data precedente o corrispondente a _DATE_: si potrebbero verificare dei problemi con la numerazione corrente dei DDT", [
|
||||
'_TYPE_' => $module['name'],
|
||||
'_DATE_' => dateFormat($ddt->data),
|
||||
'_NUM_' => '"'.$numero_previsto.'"',
|
||||
]).'.</b>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -29,7 +29,7 @@ echo '
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{[ "type": "select", "label": "'.tr('Tipo documento').'", "name": "idtipodocumento", "required": 1, "values": "query=SELECT id, CONCAT_WS(\" - \",codice_tipo_documento_fe, descrizione) AS descrizione FROM co_tipidocumento WHERE dir=\"entrata\" AND codice_tipo_documento_fe IN(\"TD16\", \"TD17\", \"TD18\", \"TD19\", \"TD20\", \"TD21\") ORDER BY codice_tipo_documento_fe" ]}
|
||||
{[ "type": "select", "label": "'.tr('Tipo documento').'", "name": "idtipodocumento", "required": 1, "values": "query=SELECT id, CONCAT_WS(\" - \",codice_tipo_documento_fe, descrizione) AS descrizione FROM co_tipidocumento WHERE dir=\"entrata\" AND codice_tipo_documento_fe IN(\"TD16\", \"TD17\", \"TD18\", \"TD19\", \"TD20\", \"TD21\", \"TD28\") ORDER BY codice_tipo_documento_fe" ]}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
@ -755,7 +755,7 @@ class Fattura extends Document
|
||||
public function isAutofattura()
|
||||
{
|
||||
return in_array($this->tipo->codice_tipo_documento_fe, ['TD16','TD17','TD18','TD19',
|
||||
'TD20', 'TD21']);
|
||||
'TD20', 'TD21', 'TD28']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -19,29 +19,63 @@
|
||||
|
||||
include_once __DIR__.'/../../core.php';
|
||||
|
||||
use Carbon\Carbon;
|
||||
|
||||
// Trovo id_print della stampa
|
||||
$link = Prints::getHref('Scadenzario', null);
|
||||
|
||||
$year = (new Carbon($_SESSION['period_end']))->format('Y');
|
||||
$periodi[] = [
|
||||
'id' => 'manuale',
|
||||
'text' => tr('Manuale'),
|
||||
];
|
||||
|
||||
$month_start = 1;
|
||||
$month_end = 3;
|
||||
for ($i=1; $i<=4; $i++) {
|
||||
$periodi[] = [
|
||||
'id' => ''.$i.'_trimestre',
|
||||
'text' => tr('_NUM_° Trimestre _YEAR_', ['_NUM_' => $i, '_YEAR_' => $year]),
|
||||
'date_start' => $year.','.$month_start.',01',
|
||||
'date_end' => $year.','.$month_end.','.(new Carbon($year.'-'.$month_end.'-01'))->endOfMonth()->format('d'),
|
||||
];
|
||||
$month_start += 3;
|
||||
$month_end += 3;
|
||||
}
|
||||
|
||||
for ($i=1; $i<=12; $i++) {
|
||||
$month = (new Carbon($year.'-'.$i.'-01'))->locale('it')->getTranslatedMonthName('IT MMMM');
|
||||
$periodi[] = [
|
||||
'id' => ''.$i.'_mese',
|
||||
'text' => tr('_MONTH_ _YEAR_', ['_MONTH_' => $month, '_YEAR_' => $year]),
|
||||
'date_start' => $year.','.$i.',01',
|
||||
'date_end' => $year.','.$i.','.(new Carbon($year.'-'.$i.'-01'))->endOfMonth()->format('d'),
|
||||
];
|
||||
}
|
||||
|
||||
echo '
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{[ "type": "date", "label": "'.tr('Data inizio').'", "name": "data_inizio", "value": "" ]}
|
||||
{[ "type": "date", "label": "'.tr('Data inizio').'", "name": "date_start", "value": "'.$_SESSION['period_start'].'" ]}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{[ "type": "date", "label": "'.tr('Data fine').'", "name": "data_fine", "value": "" ]}
|
||||
{[ "type": "date", "label": "'.tr('Data fine').'", "name": "date_end", "value": "'.$_SESSION['period_end'].'" ]}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
{[ "type": "checkbox", "label": "'.tr('Includi scadenze pagate').'", "name": "is_pagata" ]}
|
||||
<div class="col-md-4">
|
||||
{[ "type": "select", "label": "'.tr('Periodo').'", "name": "periodo", "required": "1", "values": '.json_encode($periodi).', "value": "manuale" ]}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
{[ "type": "checkbox", "label": "'.tr('Includi scadenze pagate').'", "name": "is_pagata" ]}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
{[ "type": "checkbox", "label": "'.tr('Includi solo Ri.Ba').'", "name": "is_riba" ]}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
{[ "type": "checkbox", "label": "'.tr('Includi solo scadenze Clienti').'", "name": "is_cliente" ]}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="col-md-3">
|
||||
{[ "type": "checkbox", "label": "'.tr('Includi solo scadenze Fornitori').'", "name": "is_fornitore" ]}
|
||||
</div>
|
||||
</div>
|
||||
@ -58,15 +92,17 @@ echo '
|
||||
|
||||
echo '
|
||||
<script>
|
||||
$(document).ready(init);
|
||||
|
||||
function avvia_stampa (){
|
||||
var data_inizio = $("#data_inizio").val();
|
||||
var data_fine = $("#data_fine").val();
|
||||
var date_start = $("#date_start").val();
|
||||
var date_end = $("#date_end").val();
|
||||
var is_pagata = $("#is_pagata").is(":checked");
|
||||
var is_riba = $("#is_riba").is(":checked");
|
||||
var is_cliente = $("#is_cliente").is(":checked");
|
||||
var is_fornitore = $("#is_fornitore").is(":checked");
|
||||
|
||||
window.open("'.$link.'&data_inizio="+data_inizio+"&data_fine="+data_fine+"&is_pagata="+is_pagata+"&is_riba="+is_riba+"&is_cliente="+is_cliente+"&is_fornitore="+is_fornitore, "_blank");
|
||||
window.open("'.$link.'&date_start="+date_start+"&date_end="+date_end+"&is_pagata="+is_pagata+"&is_riba="+is_riba+"&is_cliente="+is_cliente+"&is_fornitore="+is_fornitore, "_blank");
|
||||
}
|
||||
|
||||
$("#is_cliente").change(function() {
|
||||
@ -80,4 +116,17 @@ echo '
|
||||
$("#is_cliente").prop("checked", false);
|
||||
}
|
||||
});
|
||||
|
||||
$("#periodo").change(function() {
|
||||
if ($(this).val()=="manuale") {
|
||||
input("date_start").enable();
|
||||
input("date_end").enable();
|
||||
} else {
|
||||
$("#date_start").data("DateTimePicker").date(new Date(input("periodo").getData().date_start));
|
||||
$("#date_end").data("DateTimePicker").date(new Date(input("periodo").getData().date_end));
|
||||
input("date_start").disable();
|
||||
input("date_end").disable();
|
||||
}
|
||||
eseguiControlli();
|
||||
});
|
||||
</script>';
|
@ -20,6 +20,7 @@
|
||||
include_once __DIR__.'/../../core.php';
|
||||
|
||||
use Models\Module;
|
||||
use Carbon\Carbon;
|
||||
|
||||
$id_record = filter('id_record');
|
||||
$dir = filter('dir');
|
||||
@ -27,6 +28,36 @@ $nome_stampa = filter('nome_stampa');
|
||||
$id_print = $dbo->fetchOne('SELECT id FROM zz_prints WHERE name='.prepare($nome_stampa))['id'];
|
||||
$id_module = Module::pool('Stampe contabili')->id;
|
||||
|
||||
$year = (new Carbon($_SESSION['period_end']))->format('Y');
|
||||
$periodi[] = [
|
||||
'id' => 'manuale',
|
||||
'text' => tr('Manuale'),
|
||||
];
|
||||
|
||||
$month_start = 1;
|
||||
$month_end = 3;
|
||||
for ($i=1; $i<=4; $i++) {
|
||||
$periodi[] = [
|
||||
'id' => ''.$i.'_trimestre',
|
||||
'text' => tr('_NUM_° Trimestre _YEAR_', ['_NUM_' => $i, '_YEAR_' => $year]),
|
||||
'date_start' => $year.','.$month_start.',01',
|
||||
'date_end' => $year.','.$month_end.','.(new Carbon($year.'-'.$month_end.'-01'))->endOfMonth()->format('d'),
|
||||
];
|
||||
$month_start += 3;
|
||||
$month_end += 3;
|
||||
}
|
||||
|
||||
for ($i=1; $i<=12; $i++) {
|
||||
$month = (new Carbon($year.'-'.$i.'-01'))->locale('it')->getTranslatedMonthName('IT MMMM');
|
||||
$periodi[] = [
|
||||
'id' => ''.$i.'_mese',
|
||||
'text' => tr('_MONTH_ _YEAR_', ['_MONTH_' => $month, '_YEAR_' => $year]),
|
||||
'date_start' => $year.','.$i.',01',
|
||||
'date_end' => $year.','.$i.','.(new Carbon($year.'-'.$i.'-01'))->endOfMonth()->format('d'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
// Trovo id_print della stampa
|
||||
$link = Prints::getHref($nome_stampa, $id_record);
|
||||
|
||||
@ -41,12 +72,6 @@ echo '
|
||||
|
||||
<form action="" method="post" id="form" >
|
||||
<div class="row">';
|
||||
if ($nome_stampa != 'Liquidazione IVA') {
|
||||
echo '
|
||||
<div class="col-md-4">
|
||||
{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_sezionale", "required": "1", "values": "query=SELECT id AS id, name AS descrizione FROM zz_segments WHERE id_module = (SELECT id FROM zz_modules WHERE name = \''.(($dir == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto').'\') AND is_fiscale = 1 UNION SELECT 0 AS id, \'Tutti i sezionali\' AS descrizione" ]}
|
||||
</div>';
|
||||
}
|
||||
echo '
|
||||
<div class="col-md-4">
|
||||
{[ "type": "date", "label": "'.tr('Data inizio').'", "required": "1", "name": "date_start", "value": "'.$_SESSION['period_start'].'" ]}
|
||||
@ -56,10 +81,20 @@ echo '
|
||||
{[ "type": "date", "label": "'.tr('Data fine').'", "required": "1", "name": "date_end", "value": "'.$_SESSION['period_end'].'" ]}
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
{[ "type": "select", "label": "'.tr('Periodo').'", "name": "periodo", "required": "1", "values": '.json_encode($periodi).', "value": "manuale" ]}
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
echo '
|
||||
<div class="row">
|
||||
<div class="row">';
|
||||
if ($nome_stampa != 'Liquidazione IVA') {
|
||||
echo '
|
||||
<div class="col-md-4">
|
||||
{[ "type": "select", "label": "'.tr('Sezionale').'", "name": "id_sezionale", "required": "1", "values": "query=SELECT id AS id, name AS descrizione FROM zz_segments WHERE id_module = (SELECT id FROM zz_modules WHERE name = \''.(($dir == 'entrata') ? 'Fatture di vendita' : 'Fatture di acquisto').'\') AND is_fiscale = 1 UNION SELECT 0 AS id, \'Tutti i sezionali\' AS descrizione" ]}
|
||||
</div>';
|
||||
}
|
||||
echo '
|
||||
<div class="col-md-4">
|
||||
{[ "type": "select", "label": "'.tr('Formato').'", "name": "format", "required": "1", "values": "list=\"A4\": \"'.tr('A4').'\", \"A3\": \"'.tr('A3').'\"", "value": "'.$_SESSION['stampe_contabili']['format'].'" ]}
|
||||
</div>
|
||||
@ -132,24 +167,23 @@ if ($nome_stampa != 'Liquidazione IVA') {
|
||||
|
||||
echo '
|
||||
<script>
|
||||
$(document).ready(init);
|
||||
|
||||
$(document).ready(function () {
|
||||
setTimeout(function () {
|
||||
eseguiControlli();
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
$("#date_start").on("blur", function(){
|
||||
eseguiControlli();
|
||||
});
|
||||
|
||||
$("#date_start").blur(function(){
|
||||
eseguiControlli();
|
||||
});
|
||||
|
||||
$("#date_end").blur(function(){
|
||||
$("#date_end").on("blur", function(){
|
||||
eseguiControlli();
|
||||
});
|
||||
|
||||
function eseguiControlli() {
|
||||
let date_start = $("#date_start").data("DateTimePicker").date().format("YYYY-MM-DD");
|
||||
let date_end = $("#date_end").data("DateTimePicker").date().format("YYYY-MM-DD");
|
||||
|
||||
controllaDate(date_start, date_end);
|
||||
}
|
||||
|
||||
@ -222,6 +256,8 @@ if ($nome_stampa != 'Liquidazione IVA') {
|
||||
|
||||
echo '
|
||||
<script>
|
||||
$(document).ready(init);
|
||||
|
||||
function avvia_stampa (){
|
||||
if ($("#definitiva").is(":checked")) {
|
||||
let date_start = $("#date_start").data("DateTimePicker").date().format("YYYY-MM-DD");
|
||||
@ -258,4 +294,17 @@ echo '
|
||||
$("#orientation").change(function() {
|
||||
session_set("stampe_contabili,orientation", $(this).val(), 0, 0);
|
||||
});
|
||||
|
||||
$("#periodo").change(function() {
|
||||
if ($(this).val()=="manuale") {
|
||||
input("date_start").enable();
|
||||
input("date_end").enable();
|
||||
} else {
|
||||
$("#date_start").data("DateTimePicker").date(new Date(input("periodo").getData().date_start));
|
||||
$("#date_end").data("DateTimePicker").date(new Date(input("periodo").getData().date_end));
|
||||
input("date_start").disable();
|
||||
input("date_end").disable();
|
||||
}
|
||||
eseguiControlli();
|
||||
});
|
||||
</script>';
|
||||
|
@ -126,7 +126,7 @@ if (isset($fattura_body['DatiPagamento'])) {
|
||||
}
|
||||
|
||||
$is_autofattura = false;
|
||||
if (in_array($dati_generali['TipoDocumento'], ['TD16', 'TD17', 'TD18', 'TD19', 'TD20', 'TD21'])) {
|
||||
if (in_array($dati_generali['TipoDocumento'], ['TD16', 'TD17', 'TD18', 'TD19', 'TD20', 'TD21', 'TD28'])) {
|
||||
$is_autofattura = true;
|
||||
}
|
||||
|
||||
@ -273,7 +273,7 @@ if (!empty($anagrafica)) {
|
||||
INNER JOIN co_tipidocumento ON co_tipidocumento.id = co_documenti.idtipodocumento
|
||||
WHERE
|
||||
co_tipidocumento.dir = 'entrata' AND
|
||||
co_tipidocumento.codice_tipo_documento_fe IN('TD16', 'TD17', 'TD18', 'TD19', 'TD20', 'TD21') AND
|
||||
co_tipidocumento.codice_tipo_documento_fe IN('TD16', 'TD17', 'TD18', 'TD19', 'TD20', 'TD21', 'TD28') AND
|
||||
(co_documenti.data BETWEEN NOW() - INTERVAL 1 YEAR AND NOW()) AND
|
||||
co_documenti.idstatodocumento IN (SELECT id FROM co_statidocumento WHERE descrizione != 'Bozza') AND
|
||||
co_documenti.idanagrafica = ".prepare($anagrafica->id);
|
||||
|
@ -1879,6 +1879,9 @@
|
||||
<xsl:when test="$TD='TD27'">
|
||||
fattura per autoconsumo o per cessioni gratuite senza rivalsa
|
||||
</xsl:when>
|
||||
<xsl:when test="$TD='TD28'">
|
||||
fattura per acquisti da San Marino
|
||||
</xsl:when>
|
||||
|
||||
<!--FPRS-->
|
||||
<xsl:when test="$TD='TD07'">
|
||||
|
@ -29,16 +29,16 @@ $total = Util\Query::readQuery($module);
|
||||
// Lettura parametri modulo
|
||||
$module_query = $total['query'];
|
||||
|
||||
if(!empty(get('data_inizio'))){
|
||||
$module_query = str_replace('1=1', '1=1 AND DATE_FORMAT(`data`, "%Y%m%d") >= "'.date('Ymd', strtotime(get('data_inizio'))).'"', $module_query);
|
||||
if(!empty(get('date_start'))){
|
||||
$module_query = str_replace('1=1', '1=1 AND DATE_FORMAT(`data`, "%Y%m%d") >= "'.date('Ymd', strtotime(get('date_start'))).'"', $module_query);
|
||||
|
||||
$date_start = get('data_inizio');
|
||||
$date_start = get('date_start');
|
||||
}
|
||||
|
||||
if(!empty(get('data_fine'))){
|
||||
$module_query = str_replace('1=1', '1=1 AND DATE_FORMAT(`data`, "%Y%m%d") <= "'.date('Ymd', strtotime(get('data_fine'))).'"', $module_query);
|
||||
if(!empty(get('date_end'))){
|
||||
$module_query = str_replace('1=1', '1=1 AND DATE_FORMAT(`data`, "%Y%m%d") <= "'.date('Ymd', strtotime(get('date_end'))).'"', $module_query);
|
||||
|
||||
$date_start = get('data_inizio');
|
||||
$date_end = get('date_end');
|
||||
}
|
||||
|
||||
if(get('is_pagata')=='false'){
|
||||
|
@ -63,4 +63,12 @@ INSERT INTO `zz_views` (`id_module`, `name`, `query`, `order`, `search`, `slow`,
|
||||
((SELECT `id` FROM `zz_modules` WHERE `name`='Movimenti'), 'Anagrafica', 'IF(`reference_type`=\"Modules\\\\Fatture\\\\Fattura\",(SELECT ragione_sociale FROM co_documenti LEFT JOIN an_anagrafiche ON co_documenti.idanagrafica=an_anagrafiche.idanagrafica WHERE co_documenti.id=mg_movimenti.reference_id),IF(`reference_type`=\"Modules\\\\DDT\\\\DDT\",(SELECT ragione_sociale FROM dt_ddt LEFT JOIN an_anagrafiche ON dt_ddt.idanagrafica=an_anagrafiche.idanagrafica WHERE dt_ddt.id=mg_movimenti.reference_id),IF(`reference_type`=\"Modules\\\\Interventi\\\\Intervento\",(SELECT ragione_sociale FROM in_interventi LEFT JOIN an_anagrafiche ON in_interventi.idanagrafica=an_anagrafiche.idanagrafica WHERE in_interventi.id=mg_movimenti.reference_id),"")))', 8, 1, 0, 0, 0, '', '', 1, 0, 1);
|
||||
|
||||
-- Aggiunto condizioni di fornitura in ordini
|
||||
ALTER TABLE `or_ordini` ADD `condizioni_fornitura` TEXT NULL DEFAULT NULL AFTER `note`;
|
||||
ALTER TABLE `or_ordini` ADD `condizioni_fornitura` TEXT NULL DEFAULT NULL AFTER `note`;
|
||||
|
||||
-- Aggiunta tipologia fattura TD28
|
||||
INSERT INTO `fe_tipi_documento` (`codice`, `descrizione`) VALUES ('TD28', 'Fattura per acquisti da San Marino');
|
||||
INSERT INTO `co_tipidocumento` (`id`, `descrizione`, `dir`, `reversed`, `codice_tipo_documento_fe`) VALUES (NULL, 'Fattura per acquisti da San Marino', 'entrata', '0', 'TD28');
|
||||
INSERT INTO `co_tipidocumento` (`id`, `descrizione`, `dir`, `reversed`, `codice_tipo_documento_fe`) VALUES (NULL, 'Fattura per acquisti da San Marino', 'uscita', '0', 'TD28');
|
||||
|
||||
-- Fix vista Ddt in entrata
|
||||
UPDATE `zz_views` INNER JOIN `zz_modules` ON `zz_views`.`id_module` = `zz_modules`.`id` SET `zz_views`.`order_by` = 'CAST(IF(numero_esterno="", numero, numero_esterno) AS UNSIGNED)' WHERE `zz_modules`.`name` = 'Ddt di acquisto' AND `zz_views`.`name` = 'Numero'
|
||||
|
Loading…
x
Reference in New Issue
Block a user