Exemplo n.º 1
0
 def test_getTheRpc(self):
     query = VistaSelect()
     query.file = '410'
     #        query.fields = '.01;3;4;16;17;18;19;20;21;22;51'
     #        query.index = 'C'
     #        query.frum = '506-13-1-98'
     #        query.part = '506-13-1-99'
     #        query.screen = 'I $P(^(0),U,21)="506-13-1-99"'
     query.identifier =\
     'S X=$$FCPBAL^PRC0D(506,99,13,2) ' +\
     'S Y=$$FCPBAL^PRC0D(506,99,13,1) ' +\
     'D EN^DDIOL(X_U_Y)'
     query._prepare()
     h = hashlib.sha224(query.rpc).hexdigest()
     x = 0
Exemplo n.º 2
0
def __get_vista_data(cxn, cp_nbr, fy, qtr):
    query = VistaSelect()
    query.file = '410'
    query.fields = '.01;1;3;22;23;24;25;25.5;27;451'
    query.index = 'RB'
    query.frum = '{}-{}-{}-'.format(get_fiscal_start_date(fy, qtr), cxn.site_id, cp_nbr)
    query.part = query.frum
    query.identifier = ''.join(
        [
            'S X=$S($P(^(4),U,10)]"":"Y",1:"N") ',
            'S Y=$S($P(^(7),U,6)]"":"Y",1:"N") ',
            'S Z=$P(^(0),"-")_"-"_$P(^(4),U,5) ',
            'S Z=$O(^PRC(442,"B",Z,0)) ',
            'S Z1=$S(+Z=0:"X",$P($G(^PRC(442,Z,0)),U,2)=25:$P(^(7),U,2),1:"N") ',
            'S Z2=$S(+Z\'=0:$P($$FP^PRCH0A(Z),U,2),1:"X")',
            'D EN^DDIOL(X_U_Y_U_Z1_U_Z2)'
        ]
    )
    return query.find(cxn)