Fix per la sincronizzazione di aliquote rimosse
This commit is contained in:
parent
ef5ad8a38d
commit
92fd631740
|
@ -14,12 +14,12 @@ class AliquoteIva extends AppResource
|
||||||
|
|
||||||
protected function getData($last_sync_at)
|
protected function getData($last_sync_at)
|
||||||
{
|
{
|
||||||
$query = 'SELECT co_iva.id FROM co_iva';
|
$query = 'SELECT co_iva.id FROM co_iva WHERE deleted_at IS NULL';
|
||||||
|
|
||||||
// Filtro per data
|
// Filtro per data
|
||||||
if ($last_sync_at) {
|
if ($last_sync_at) {
|
||||||
$last_sync = new Carbon($last_sync_at);
|
$last_sync = new Carbon($last_sync_at);
|
||||||
$query .= ' WHERE co_iva.updated_at > '.prepare($last_sync);
|
$query .= ' AND co_iva.updated_at > '.prepare($last_sync);
|
||||||
}
|
}
|
||||||
|
|
||||||
$records = database()->fetchArray($query);
|
$records = database()->fetchArray($query);
|
||||||
|
|
Loading…
Reference in New Issue