diff --git a/db/routines/sage/procedures/accountingMovements_add.sql b/db/routines/sage/procedures/accountingMovements_add.sql index 88c599b09..ada954334 100644 --- a/db/routines/sage/procedures/accountingMovements_add.sql +++ b/db/routines/sage/procedures/accountingMovements_add.sql @@ -425,6 +425,8 @@ BEGIN INSERT IGNORE INTO sage.clientSupplier (companyFk, `type`, idClientSupplier, isSync) SELECT vCompanyCode, `type`, idClientSupplier, FALSE FROM tmp.clientSupplier; + + DROP TEMPORARY TABLE tmp.clientSupplier; CALL pgc_add(vCompanyFk); -- Elimina cuentas contables que no se utilizarán en la importación diff --git a/db/routines/sage/procedures/clientSupplier_add.sql b/db/routines/sage/procedures/clientSupplier_add.sql index 2c4b4db9d..2d1a51882 100644 --- a/db/routines/sage/procedures/clientSupplier_add.sql +++ b/db/routines/sage/procedures/clientSupplier_add.sql @@ -122,7 +122,5 @@ BEGIN LEFT JOIN vn.supplierAccount sa ON sa.supplierFk = s.id WHERE cs.type = 'P' GROUP BY s.id; - - DROP TEMPORARY TABLE IF EXISTS tmp.clientSupplier; END$$ DELIMITER ;