mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-21 14:00:53 +01:00
Compare commits
7 Commits
0e1fabb99a
...
82cfeaee32
Author | SHA1 | Date | |
---|---|---|---|
|
82cfeaee32 | ||
|
203b26a087 | ||
|
e51ab219c8 | ||
|
3585c947ed | ||
|
9351ddf79d | ||
|
fe2117f26b | ||
|
542f897318 |
@ -41,7 +41,7 @@ Il formato utilizzato è basato sulle linee guida di [Keep a Changelog](http://k
|
||||
- Aggiunta percentuale di imponibilità nel modulo **Piano dei conti** sezione **Ricavi** per il calcolo del **Totale reddito**.
|
||||
|
||||
### Modificato (Changed)
|
||||
|
||||
- In fase di importazione **Fattura di acquisto** la data competenza ora viene allineata alla data di emissione
|
||||
### Fixed
|
||||
|
||||
## 2.4.24 (2021-07-28)
|
||||
|
@ -156,9 +156,9 @@ function searchFieldName(field) {
|
||||
*
|
||||
* @param {int} module_id
|
||||
* @param {string} field
|
||||
* @param {mixed} value
|
||||
* @param {string} value
|
||||
*/
|
||||
function searchTable(module_id, field, value) {
|
||||
function setTableSearch(module_id, field, value) {
|
||||
session_set('module_' + module_id + ',' + 'search_' + searchFieldName(field), value, 0);
|
||||
}
|
||||
|
||||
@ -272,6 +272,7 @@ function getDatatablesButtons(table) {
|
||||
|
||||
function initComplete(settings) {
|
||||
const api = this.api();
|
||||
const $this = $(this);
|
||||
const search = getTableSearch();
|
||||
|
||||
api.columns('.search').every(function () {
|
||||
@ -305,7 +306,7 @@ function initComplete(settings) {
|
||||
}
|
||||
|
||||
function start_search(module_id, field, search_value) {
|
||||
searchTable(module_id, field, search_value);
|
||||
setTableSearch(module_id, field, search_value);
|
||||
column.search(search_value).draw();
|
||||
}
|
||||
|
||||
|
10
editor.php
10
editor.php
@ -472,19 +472,19 @@ if ($read_only || !empty($block_edit)) {
|
||||
|
||||
var content_was_modified = false;
|
||||
|
||||
//controllo se digito qualche valore o cambio qualche select
|
||||
$("input, textarea, select").bind("change paste keyup", function(event) {
|
||||
// Controllo se digito qualche valore o cambio qualche select
|
||||
$(".content input, .content textarea, .content select").bind("change paste keyup", function(event) {
|
||||
if (event.keyCode >= 32) {
|
||||
content_was_modified = true;
|
||||
}
|
||||
});
|
||||
|
||||
$(".superselect, .superselectajax").on("change", function (e) {
|
||||
$(".content .superselect, .content .superselectajax").on("change", function (e) {
|
||||
content_was_modified = true;
|
||||
});
|
||||
|
||||
//tolgo il controllo se sto salvando
|
||||
$(".btn-success, button[type=submit]").bind("click", function() {
|
||||
// Tolgo il controllo se sto salvando
|
||||
$(".content .btn-success, .content button[type=submit]").bind("click", function() {
|
||||
content_was_modified = false;
|
||||
});
|
||||
|
||||
|
@ -302,7 +302,7 @@ function verifica_numero_intervento(Intervento $intervento)
|
||||
}
|
||||
|
||||
$data = $intervento->data_richiesta;
|
||||
$documenti = Intervento::where('data_richiesta', '=', $data)
|
||||
$documenti = Intervento::whereDate('data_richiesta', '=', $data->format('Y-m-d'))
|
||||
->get();
|
||||
|
||||
// Recupero maschera per questo segmento
|
||||
@ -310,12 +310,12 @@ function verifica_numero_intervento(Intervento $intervento)
|
||||
|
||||
if ((strpos($maschera, 'YYYY') !== false) or (strpos($maschera, 'yy') !== false)) {
|
||||
$ultimo = Generator::getPreviousFrom($maschera, 'in_interventi', 'codice', [
|
||||
'DATE(data_richiesta) < '.prepare(date('Y-m-d', strtotime($data))),
|
||||
'YEAR(data_richiesta) = '.prepare(date('Y', strtotime($data))),
|
||||
'DATE(data_richiesta) < '.prepare($data->format('Y-m-d')),
|
||||
'YEAR(data_richiesta) = '.prepare($data->format('Y')),
|
||||
], $data);
|
||||
} else {
|
||||
$ultimo = Generator::getPreviousFrom($maschera, 'in_interventi', 'codice', [
|
||||
'DATE(data_richiesta) < '.prepare(date('Y-m-d', strtotime($data))),
|
||||
'DATE(data_richiesta) < '.prepare($data->format('Y-m-d')),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -326,7 +326,7 @@ class FatturaElettronica
|
||||
// Per il destinatario, la data di registrazione della fattura assume grande rilievo ai fini IVA, poiché determina la decorrenza dei termini per poter esercitare il diritto alla detrazione.
|
||||
// La data di ricezione della fattura è contenuta all’interno della “ricevuta di consegna” visibile al trasmittente della stessa.
|
||||
$fattura->data_registrazione = $data_registrazione;
|
||||
$fattura->data_competenza = $fattura->data_registrazione;
|
||||
$fattura->data_competenza = $fattura->data;
|
||||
|
||||
$stato_documento = StatoFattura::where('descrizione', 'Emessa')->first();
|
||||
$fattura->stato()->associate($stato_documento);
|
||||
|
@ -266,4 +266,5 @@ input("prezzo_qta").change(function () {
|
||||
})
|
||||
|
||||
$(document).ready(cambioImpostazioni);
|
||||
content_was_modified = false;
|
||||
</script>';
|
||||
|
@ -36,7 +36,7 @@ echo '
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<button type="button" class="btn btn-info btn-block" style="margin-top:25px;" onclick="aggiungiPrezzi(this)">
|
||||
<button type="button" class="btn btn-info btn-block" style="margin-top:25px;" onclick="aggiungiPrezzi(this, false)">
|
||||
<i class="fa fa-money"></i> '.tr('Prezzi').'
|
||||
</button>
|
||||
</div>
|
||||
@ -141,11 +141,10 @@ function gestionePrezzi(id_anagrafica, direzione) {
|
||||
openModal("'.tr('Gestisci prezzi specifici').'", "'.$structure->fileurl('dettaglio_prezzi.php').'?id_plugin='.$id_plugin.'&id_module='.$id_module.'&id_parent='.$id_record.'&id_articolo='.$id_record.'&id_anagrafica=" + id_anagrafica + "&direzione=" + direzione);
|
||||
}
|
||||
|
||||
function aggiungiPrezzi(button) {
|
||||
function aggiungiPrezzi(button, is_uscita) {
|
||||
let panel = $(button).closest(".box");
|
||||
let tab = panel.closest(".tab-pane");
|
||||
|
||||
let direzione = tab.attr("id") === "fornitori" ? "uscita" : "entrata";
|
||||
let direzione = is_uscita ? "uscita" : "entrata";
|
||||
let id_anagrafica = panel.find("select").val();
|
||||
|
||||
if (id_anagrafica) {
|
||||
|
@ -84,4 +84,7 @@ echo '
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>$(document).ready(init);</script>';
|
||||
<script>
|
||||
$(document).ready(init);
|
||||
content_was_modified = false;
|
||||
</script>';
|
||||
|
@ -39,7 +39,7 @@ echo '
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="btn-group btn-group-flex">
|
||||
<button type="button" class="btn btn-info" style="margin-top:25px;" onclick="aggiungiPrezzi(this)">
|
||||
<button type="button" class="btn btn-info" style="margin-top:25px;" onclick="aggiungiPrezzi(this, true)">
|
||||
<i class="fa fa-money"></i> '.tr('Prezzi').'
|
||||
</button>
|
||||
|
||||
@ -177,7 +177,7 @@ if (!$fornitori_disponibili->isEmpty()) {
|
||||
|
||||
<td class="text-right">
|
||||
'.moneyFormat($dettaglio->prezzo_unitario).'
|
||||
<p><small class="label label-default tip" title="'.Translator::timestampToLocale($dettaglio['updated_at']).'"><i class="fa fa-clock-o"></i> '.Carbon::parse($dettaglio['updated_at'])->diffForHumans().'</small></p>
|
||||
<p><small class="label label-default tip" title="'.Translator::timestampToLocale($dettaglio['updated_at']).'"><i class="fa fa-clock-o"></i> '.$dettaglio->updated_at->diffForHumans().'</small></p>
|
||||
</td>
|
||||
|
||||
<td class="text-right">
|
||||
@ -210,32 +210,6 @@ if (!$fornitori_disponibili->isEmpty()) {
|
||||
|
||||
echo '
|
||||
<script>
|
||||
function modificaPrezzi(button) {
|
||||
let tr = $(button).closest("tr");
|
||||
let id_anagrafica = tr.data("id_anagrafica");
|
||||
let direzione = tr.data("direzione");
|
||||
|
||||
gestionePrezzi(id_anagrafica, direzione);
|
||||
}
|
||||
|
||||
function gestionePrezzi(id_anagrafica, direzione) {
|
||||
openModal("'.tr('Gestisci prezzi specifici').'", "'.Plugin::pool('Listino Clienti')->fileurl('dettaglio_prezzi.php').'?id_plugin='.$id_plugin.'&id_module='.$id_module.'&id_parent='.$id_record.'&id_articolo='.$id_record.'&id_anagrafica=" + id_anagrafica + "&direzione=" + direzione);
|
||||
}
|
||||
|
||||
function aggiungiPrezzi(button) {
|
||||
let panel = $(button).closest(".box");
|
||||
let tab = panel.closest(".tab-pane");
|
||||
|
||||
let direzione = tab.attr("id") === "fornitori" ? "uscita" : "entrata";
|
||||
let id_anagrafica = panel.find("select").val();
|
||||
|
||||
if (id_anagrafica) {
|
||||
gestionePrezzi(id_anagrafica, direzione);
|
||||
} else {
|
||||
swal("'.tr('Attenzione').'", "'.tr('Inserire un\'anagrafica').'", "warning");
|
||||
}
|
||||
}
|
||||
|
||||
function modificaFornitore(id_riga, id_anagrafica) {
|
||||
openModal("Modifica dati fornitore", "'.$structure->fileurl('dettaglio_fornitore.php').'?id_plugin='.$id_plugin.'&id_module='.$id_module.'&id_parent='.$id_record.'&id_articolo='.$id_record.'&id_riga=" + id_riga + "&id_anagrafica=" + id_anagrafica);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user