Code: Select all
/* glacctc.p - Change G/L Account Table routine
- Includes fixed gl-cds - can only change g/1 # *
def var pgl-cd like glacct.gl-cd.
MAIN:
repeat:
pgl-cd = "".
update space pgl-cd help "Leave blank to display all existing records"
column-label " !G/L Code"
space(2)
with frame a down centered title "G/L Account Change".
if pgl-cd = "" then do: for
each glacct no-lock:
pgl-cd = glacct.gl-cd.
display pgl-cd glacct.gl-acct column-label " !G/L Account"
space(2) glacct.gl-dept space(2) glacct.gl-desc
space with frame a.
down with frame a.
end. /* for each glacct */
next main.
end. /* if pgl-cd = "" */
find glacct use-index glacct-pi where
glacct.gl-cd = pgl-cd exclusive-lock no-error.
if not available glacct then do:
bell. message "Invalid G/L Code".
undo, retry.
end.
update glacct.gl-acct validate( glacct.gl-acct <> 0,
"Account # cannot be 0" )
glacct.gl-dept
glacct.gl-desc
with frame a.
down with frame a.
end.
/* srccd/passthru.p - Pass Thru Standing Orders Add/Change Routine */
def shared var suserid like uzer.uz-fname.
def var newamt like passthru.amount.
display " PASS THROUGH ACCOUNTS ADD/CHANGE " with frame a centered.
repeat:
clear frame F1.
prompt-for password.account auto-return password.password
with 1 column 1 down row 5 centered frame fl no-box.
find password using input password.account
and input password.password no-error.
if not available password then do:
message "Security Violation - No Password on File. " undo, retry.
end.
find client use-index client-pi where
client.account = input password.account no-lock.
display skip(2) client.name
with frame w centered no-box no-label 1 column 1 down.
find passthru where passthru.account = input password.account no-error.
if not available passthru then do:
create passthru.
assign passthru.Account = input Password.Account.
end.
newamt = passthru.amount.
display newamt passthru.previous with frame c centered row 11.
update newamt with frame c.
assign passthru.amount = input newamt passthru.uz-fname = suserid.
end. /* repeat */
I tried to maintain some of the formatting but the original source seemed to be formatted kinda randomly.