Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- verify_tax_return (OidPerson, PropLsTaxReturn) :-
- Date = :prop.get (PropLsTaxReturn, year_tax)
- & t:obj.find ($nap1:cp_tax_return1, [l_person = OidPerson, year_tax = Date], OidAllreadyExist, [])
- & !
- & Value = OidAllreadyExist
- ;
- verify_tax_return (OidPerson, PropLsTaxReturn) :-
- checkPersonInfo (OidPerson, PropLsTaxReturn, Res)
- & Value = Res
- ;
- checkPersonInfo (OidPerson, PropLsTaxReturn, Res) :-
- %PersonInfo
- Partner = get:OidPerson->l_partner.name
- & PersonName = get:OidPerson.name
- & PersonEgn = get:OidPerson.egn
- & PersonAddress = get:OidPerson.addres
- & PersonChildren = :$nap1:cp_person1.children_counter (PersonEgn)
- %TaxReturnInfo
- & [NameSpouse, NamePerson, PersonEgnTax, PersonAddressTax, PersonChildrenTax] = :prop.getl (PropLsTaxReturn, [name_spouse, name_person, egn_person, city, children])
- & LsPerson = [Partner, PersonName, PersonEgn, PersonAddress, PersonChildren]
- & LsTax = [NameSpouse, NamePerson, PersonEgnTax, PersonAddressTax, PersonChildrenTax]
- & check (LsPerson, LsTax, PropLsTaxReturn, Res)
- ;
- check (LsPerson, LsTax, _PropLsTaxReturn, Res) :-
- Res = compute list (P1) where
- (
- m:lst.member (LsPerson, P1, Pos)
- & not t:lst.member (LsTax, P1, Pos)
- )
- & Res <> []
- & !
- ;
- check (_LsPerson, _LsTax, PropLsTaxReturn, _Res) :-
- :$nap1:cp_nap1.createTaxReturn(PropLsTaxReturn)
- ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement