'Put' statement not working
Posted: Tue Apr 16, 2013 5:59 pm
Newby here.
I'm trying to create an accounting stack. I've a main stack that keeps Quotes, invoices, overdues, and paid, and am now trying to create a substack that will show accounting figures. My problem is that the put statements don't work as I've written them.
I'm trying to create an accounting stack. I've a main stack that keeps Quotes, invoices, overdues, and paid, and am now trying to create a substack that will show accounting figures. My problem is that the put statements don't work as I've written them.
Code: Select all
on doCalculate
local theTotal,temp
put field "Start Date" into theStartDate
convert theStartDate from long system date to seconds
put field "End Date" into theEndDate
convert theEndDate from long system date to seconds
lock screen
go invisible to stack "John's Quotes"
put 0 into QuoteTotal
put 0 into InvoiceTotel
put 0 into OverdueTotal
put 0 into PaidTotal
put 0 into GSTTotal
put 0 into GrandTotal
repeat with x= 1 to number of last card
go to card x
put field "Date Field" into tempDate
convert tempDate from long system date to seconds
if tempdate ≥ theStartDate and tempDate ≤ theEndDate then
put thetext(field "Total" ) into theTotal --// why won't these work?
put thetext(field "GST") into theGST
put thetext(field "Grand Total") into theGrandTotal
if button "Overdue" is visible then put OverdueTotal +theGrandTotal into OverdueTotal
if button "Paid" is visible then put PaidTotal +theGrandTotal into PaidTotal
if button "Paid" is visible then put GSTTotal +theGST into GSTTotal
if button "Paid" is visible then put GrandTotal + theGrandTotal into GrandTitle
end if
end repeat
go to me
show me
formatField (QuotedField, QuoteTotal)
unlock screen
end doCalculate
on TheText mySelfField
repeat while " " is in MySelfField
delete char offset (" ",MySelfField) of MySelfField
end repeat
repeat while "$" is in MySelfField
delete char offset ("$" ,MySelfField ) of MySelfField
end repeat
repeat while "," is in MySelfField
delete char offset (",",MySelfField ) of MySelfField
end repeat
answer myselffield
return (MySelfField )
end TheText