Process_inv Error File : /storage/emulated/0/My3BC/0/errorlog 05-01-26 09:20.txt: open failed: EPERM (Operation not permitted) NUM,DAD_ENT,DAD_DAT,DAD_TP1,DAD_TP2,DAD_VL1,DAD_VL2,DAD_DSC,DAD_TOT,DAD_DEB,DAD_CRE,DAD_TDD,DAD_IVA,DAD_TTI,DAD_CRG,DAD_DES,DAD_EXP,DAD_HRC,DAD_DTC,DAD_PDO,DAD_PGO,DAD_VNC,DAD_MOV,DAD_ACM,DAD_UTL,DAD_TER,DAD_LOJ,DAD_RET,DAD_VEN,DAD_COM,DAD_MCA,DAD_REQ,DAD_ENC,ESTADO,DAD_ORI,DAD_BAL,DAD_MEM,DAD_OBS,DAD_CUA,DAD_FTC,DAD_TEM,DAD_ULT,DAD_DOC,DAD_FIL,DAD_SES,DAD_UT2,DAD_MXL,DAD_TP3,DAD_TP4,DAD_VL3,DAD_VL4,DAD_CON,DAD_DMO,DAD_PNT,DAD_CAR,DAD_CHV,DAD_CNV,DAD_DCA,DAD_VER,DAD_RSA,DAD_DER,DAD_MOT,DAD_VGT,DAD_TOT2,DAD_NOM,DAD_MOR,DAD_CDP,dad_tdcacm,DAD_loc,dad_pai,dad_APL) VALUES('CMK200', (select ser_num from ser where ser_chv='CMK200'), 0, (select cast(getdate()as date)), 0, 0, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, (select tdc_dcr from tdc where tdc_cod= substring('CMK200',1,2)), 0.000, 0.000, '', '', '', (SELECT CAST(DATEPART(HOUR, GETDATE())AS VARCHAR(2)) + ':' + CAST(DATEPART(MINUTE, GETDATE())AS VARCHAR(2))), (select cast(getdate()as date)), 1, 0.000, (select cast(getdate()as date)), '0', 'S', 5473, 99, 2, 0.000, 0, 0, 0.00, '', '', 9, '', 0, '', '', 0.00, 0,(SELECT CAST(DATEPART(HOUR, GETDATE())AS VARCHAR(2)) + ':' + CAST(DATEPART(MINUTE, GETDATE())AS VARCHAR(2)) + ':' + CAST(DATEPART(SECOND, GETDATE())AS VARCHAR(2))), getdate(), '277', 0, 0, 0, 0, 0, 0, 0.00, 0.00, '', '1900-01-01', 0, 0.00, 'CMK200' + str((select ser_num from ser where ser_chv='CMK200'),10), 0, 0.00, 0, '', getdate(), '', '',0, '', '', '', 0, '', 'PT', ''); DELETE FROM LIN WHERE LIN_DAD= (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(24.89, '2770180', 'CACHAÇO DE PORCO', (select art_med from art where art_ref='2770180'), 0, 0, (select art_med * 24.89 from art where art_ref='2770180'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 1, 0, 0.000, '', '2770180', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('1',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(16.30, '2770080', 'CABEÇA DE PORCO FUMADA/U', (select art_med from art where art_ref='2770080'), 0, 0, (select art_med * 16.30 from art where art_ref='2770080'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 2, 0, 0.000, '', '2770080', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('2',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(20.10, '2770046', 'PERNIL/UNHAS FRESCO', (select art_med from art where art_ref='2770046'), 0, 0, (select art_med * 20.10 from art where art_ref='2770046'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 3, 0, 0.000, '', '2770046', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('3',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(77.10, '2770056', 'FRANGO', (select art_med from art where art_ref='2770056'), 0, 0, (select art_med * 77.10 from art where art_ref='2770056'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 4, 0, 0.000, '', '2770056', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('4',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(6.28, '2770050', 'RABOS PORCO', (select art_med from art where art_ref='2770050'), 0, 0, (select art_med * 6.28 from art where art_ref='2770050'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 5, 0, 0.000, '', '2770050', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('5',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(1.20, '2770084', 'PREPARADO CARNE PICADA', (select art_med from art where art_ref='2770084'), 0, 0, (select art_med * 1.20 from art where art_ref='2770084'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 6, 0, 0.000, '', '2770084', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('6',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(11.48, '2770063', 'PEITO DE FRANGO', (select art_med from art where art_ref='2770063'), 0, 0, (select art_med * 11.48 from art where art_ref='2770063'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 7, 0, 0.000, '', '2770063', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('7',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(35.20, '2770085', 'VITELAO', (select art_med from art where art_ref='2770085'), 0, 0, (select art_med * 35.20 from art where art_ref='2770085'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 8, 0, 0.000, '', '2770085', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('8',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(144.80, '2779999', 'CARCAÇA NOVILHO', (select art_med from art where art_ref='2779999'), 0, 0, (select art_med * 144.80 from art where art_ref='2779999'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 9, 0, 0.000, '', '2779999', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('9',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(16.51, '2770043', 'COSTELA', (select art_med from art where art_ref='2770043'), 0, 0, (select art_med * 16.51 from art where art_ref='2770043'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 10, 0, 0.000, '', '2770043', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('10',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(52.90, '2770078', 'BIFANAS LAMINADAS', (select art_med from art where art_ref='2770078'), 0, 0, (select art_med * 52.90 from art where art_ref='2770078'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 11, 0, 0.000, '', '2770078', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('11',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(3.70, '2770185', 'TOCOS FUMADOS', (select art_med from art where art_ref='2770185'), 0, 0, (select art_med * 3.70 from art where art_ref='2770185'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 12, 0, 0.000, '', '2770185', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('12',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(2.82, '2770002', 'VAZIO S/ OSSO', (select art_med from art where art_ref='2770002'), 0, 0, (select art_med * 2.82 from art where art_ref='2770002'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 13, 0, 0.000, '', '2770002', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('13',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(0.85, '2770027', 'VITELA 1.', (select art_med from art where art_ref='2770027'), 0, 0, (select art_med * 0.85 from art where art_ref='2770027'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 14, 0, 0.000, '', '2770027', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('14',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(58.00, '2770039', 'FEVERAS C/ OSSO', (select art_med from art where art_ref='2770039'), 0, 0, (select art_med * 58.00 from art where art_ref='2770039'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 15, 0, 0.000, '', '2770039', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('15',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(5.20, '2770062', 'ASAS DE FRANGO', (select art_med from art where art_ref='2770062'), 0, 0, (select art_med * 5.20 from art where art_ref='2770062'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 16, 0, 0.000, '', '2770062', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('16',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(12.20, '2770017', 'ABA C/ OSSO', (select art_med from art where art_ref='2770017'), 0, 0, (select art_med * 12.20 from art where art_ref='2770017'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 17, 0, 0.000, '', '2770017', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('17',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(4.60, '2770041', 'COSTELETA PORCO DO PÉ', (select art_med from art where art_ref='2770041'), 0, 0, (select art_med * 4.60 from art where art_ref='2770041'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 18, 0, 0.000, '', '2770041', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('18',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(0.20, '2770182', 'PANADOS FRANGO', (select art_med from art where art_ref='2770182'), 0, 0, (select art_med * 0.20 from art where art_ref='2770182'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 19, 0, 0.000, '', '2770182', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('19',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(26.25, '2770067', 'BIFE DE PERU', (select art_med from art where art_ref='2770067'), 0, 0, (select art_med * 26.25 from art where art_ref='2770067'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 20, 0, 0.000, '', '2770067', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('20',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(11.40, '2770093', 'MORCELA', (select art_med from art where art_ref='2770093'), 0, 0, (select art_med * 11.40 from art where art_ref='2770093'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 21, 0, 0.000, '', '2770093', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('21',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(1.00, '2770055', 'SANGUE COZIDO PORCO', (select art_med from art where art_ref='2770055'), 0, 0, (select art_med * 1.00 from art where art_ref='2770055'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 22, 0, 0.000, '', '2770055', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('22',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(10.70, '2770014', 'NISPO', (select art_med from art where art_ref='2770014'), 0, 0, (select art_med * 10.70 from art where art_ref='2770014'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 23, 0, 0.000, '', '2770014', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('23',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(23.58, '2770042', 'BARRIGA PORCO', (select art_med from art where art_ref='2770042'), 0, 0, (select art_med * 23.58 from art where art_ref='2770042'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 24, 0, 0.000, '', '2770042', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('24',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); INSERT INTO LIN (LIN_QNT,ART_REF,LIN_DCR,LIN_PRC,LIN_DSC,LIN_DSC2,LIN_TOT,LIN_TDC,LIN_NUM,LIN_DAT,LIN_IVA,LIN_UNI,LIN_ENT,LIN_QN2,LIN_ACM,LIN_MOV,LIN_LOJ,LIN_FUN,LIN_TAL,LIN_IMP,ESTADO,LIN_LIN,LIN_TDS,LIN_CST,LIN_STK,LIN_REQ,LIN_INT,LIN_VAL,LIN_DMO,LIN_CHV,LIN_DAD,LIN_CNV,LIN_OUT,LIN_ENC,LIN_ORI,LIN_LOT,lin_siva,lin_civa,lin_mem,lin_mot,lin_viva,stk_tdc,lin_agr,dtalt) VALUES(23490.00, '2770038', 'FEVERAS', (select art_med from art where art_ref='2770038'), 0, 0, (select art_med * 23490.00 from art where art_ref='2770038'),'CMK200', (select ser_num from ser where ser_chv='CMK200'), (select cast(getdate()as date)), 0, 0, 0, 0.000, 'S', '0', 2, 0, '', 0, 9, 25, 0, 0.000, '', '2770038', 0, '1900-01-01', (select cast(getdate()as date)), (select 'CMK200'+str((select ser_num from ser where ser_chv='CMK200'),10)+str('25',6)), (select 'CMK200'+(select str((select ser_num from ser where ser_chv='CMK200'),10))), 0, '', 0, '', 'S/LOTE', 0, 0, '', '', 0, 'N', 0, getdate()); UPDATE DAD SET DAD_MXL=25, DAD_ULT=getdate(), ESTADO=9 WHERE DAD_CHV='CMK200' + str((select ser_num from ser where ser_chv='CMK200'),10); commit transaction : I/O Error: Connection reset