Changes between Version 13 and Version 14 of carga_movimientos


Ignore:
Timestamp:
03/07/12 22:15:32 (13 years ago)
Author:
Luis Carlos
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • carga_movimientos

    v13 v14  
    246246
    247247          UPDATE CN_TABLE_VIG_SEQ
    248           SET SEQ = NVL( (SELECT max(ID_DOCUMENTO) FROM CN_DOCUMENTO where ID_VIGENCIA = 2010 ),0 )
     248          SET SEQ = NVL( (SELECT max(ID_DOCUMENTO) FROM CN_DOCUMENTO where ID_VIGENCIA = 2010 AND ID_CIA=1  ),0 )
    249249          WHERE NOM_ENTIDAD='CN_DOCUMENTO' AND ID_CIA=1 and ID_VIGENCIA = 2010
    250250
    251251          go
    252252          UPDATE CN_TABLE_VIG_SEQ
    253           SET SEQ = NVL( (SELECT max(ID_DOCUMENTO) FROM CN_DOCUMENTO where ID_VIGENCIA = 2011 ),0 )
     253          SET SEQ = NVL( (SELECT max(ID_DOCUMENTO) FROM CN_DOCUMENTO where ID_VIGENCIA = 2011 AND ID_CIA=1  ),0 )
    254254          WHERE NOM_ENTIDAD='CN_DOCUMENTO' AND ID_CIA=1 and ID_VIGENCIA = 2011
    255255          go
    256256          UPDATE CN_TABLE_VIG_SEQ
    257           SET SEQ = NVL( (SELECT max(ID_CAD) FROM CN_CONTROL_CAD where ID_VIGENCIA = 2010 ),0 )
     257          SET SEQ = NVL( (SELECT max(ID_CAD) FROM CN_CONTROL_CAD where ID_VIGENCIA = 2010 AND ID_CIA=1  ),0 )
    258258          WHERE NOM_ENTIDAD='CN_CONTROL_CAD' AND ID_CIA=1 and ID_VIGENCIA = 2010
    259259          go
    260260          UPDATE CN_TABLE_VIG_SEQ
    261           SET SEQ = NVL( (SELECT max(ID_CAD) FROM CN_CONTROL_CAD where ID_VIGENCIA = 2011 ),0 )
     261          SET SEQ = NVL( (SELECT max(ID_CAD) FROM CN_CONTROL_CAD where ID_VIGENCIA = 2011 AND ID_CIA=1  ),0 )
    262262          WHERE NOM_ENTIDAD='CN_CONTROL_CAD' AND ID_CIA=1 and ID_VIGENCIA = 2011
    263263          go
    264264          UPDATE CN_TABLE_VIG_SEQ
    265           SET SEQ = NVL( (SELECT max(ID_MOV_CONT) FROM CN_MOVIMIENTO_CONTABLE where ID_VIGENCIA = 2010 ),0 )
     265          SET SEQ = NVL( (SELECT max(ID_MOV_CONT) FROM CN_MOVIMIENTO_CONTABLE where ID_VIGENCIA = 2010 AND ID_CIA=1  ),0 )
    266266          WHERE NOM_ENTIDAD='CN_MOVIMIENTO_CONTABLE' AND ID_CIA=1 and ID_VIGENCIA = 2010
    267267
    268268          go
    269269          UPDATE CN_TABLE_VIG_SEQ
    270           SET SEQ = NVL( (SELECT max(ID_MOV_CONT) FROM CN_MOVIMIENTO_CONTABLE where ID_VIGENCIA = 2011 ),0 )
     270          SET SEQ = NVL( (SELECT max(ID_MOV_CONT) FROM CN_MOVIMIENTO_CONTABLE where ID_VIGENCIA = 2011 AND ID_CIA=1  ),0 )
    271271          WHERE NOM_ENTIDAD='CN_MOVIMIENTO_CONTABLE' AND ID_CIA=1 and ID_VIGENCIA = 2011
    272272