CAN ANYBODY HELP ????

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

smash
Posts: 99
Joined: Tue Aug 19, 2008 5:18 am

Post by smash » Fri Mar 13, 2009 12:42 am

morning bn
I am not good at accounting
ha ha i am worse lol

ok, for argument sake, i will say that i have 2 cards (card 1 and card 2).
on card 1, i put in all the fee amounts and what has been paid, and this will show if there is money outstanding or money to be refunded (credit)

i then hit this cute little button, and it sends the information to card 2 (invoice) which is printed and sent out to who ever.
so if there is a negative sign in the credit field, it just can get a bit confusing for the other party (i know what it means but that doesnt mean anyone else will)


now i would just like to ask you 2 little insy questions please.
1) in my check boxes (i have over 50 of them on one card) i would like to know if there is a script to place in a seperate button to clear ALL the little ticks in the check boxes ?
i am actually going to try and study a little more on my second question, before i actually ask so it is just one question for now.

thanks bn for taking the time to help me, and please know, i do play around for HOURS trying all sorts of codes and scripts before asking.
i really do
cheers

SparkOut
Posts: 2318
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Fri Mar 13, 2009 12:49 am

Code: Select all

on mouseUp
   repeat with i = 1 to the number of buttons of this card
      if the style of button i is "checkbox" then
         set the highlight of button i to false
      end if
   end repeat
end mouseUp

smash
Posts: 99
Joined: Tue Aug 19, 2008 5:18 am

Post by smash » Fri Mar 13, 2009 12:59 am

*squeals with delight*
thanks sparkout, that works perfectly
*more squeals*
i have been playing around with all sorts of scrpts and such for that, and i WAS NO WHERE CLOSE to what you posted.
i really am on anothe planet.
thank you sparkout

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3444
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Post by bn » Fri Mar 13, 2009 10:21 am

Hi Smash,

please just tell me:
what you expect in the fields if
a) totalFee is 10 and APaid is 25
b) totalFee is 100 and APaid is 25
A balance could well be negative but if you want it dispayed in any other form just answer above questions and I will send you the modified code.

regards
bernd

smash
Posts: 99
Joined: Tue Aug 19, 2008 5:18 am

Post by smash » Fri Mar 13, 2009 10:57 am

hi bn
if the bill came to $30.00
and i paid $50.00
i press the "balance" button
and it in the outstanding field it will show is 0.00
in the credit field it will show -20.00

i would just like the negitive sign not to be there so it just show 20.00

does that make sense ???
thank you for your time bn

Lynn P.
Posts: 79
Joined: Sun Apr 09, 2006 1:09 pm

Post by Lynn P. » Fri Mar 13, 2009 2:50 pm

Hi Smash ~

There are several ways to do this, but one way is to add the line:

Code: Select all

delete the first char of field "Credit"
This will remove the first character of the field "Credit" which is the minus sign.
One minor point though... it's standard accounting practice to have the minus sign in front of a credit balance.
I created an accounting application for the dental office I work in and I just add a short blurb about the statement at the end of it to explain it to those not familiar with accounting concepts. Things such as the minus sign and a "running balance" were familiar things to see on billing statements a while back and were understood by most, but it seems a lot of folks have no idea about them anymore.
However, that was a time when paper balance sheets only had one place on a statement for the "ending balance" to be displayed, so it either had a plain number showing as the balance or a "-number" which indicated it was a credit balance. Most computer apps still follow this standard, but the folks using your application or reading the invoices are more important and if it makes more sense to them to see two balance fields, then that's the way to go.

Randy Hengst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 148
Joined: Thu Jun 29, 2006 4:16 pm

Post by Randy Hengst » Fri Mar 13, 2009 3:12 pm

Would using absolute value (abs) work for what you're trying to accomplish?

smash
Posts: 99
Joined: Tue Aug 19, 2008 5:18 am

Post by smash » Fri Mar 13, 2009 9:18 pm

thak you lynn P
that works a treat

hi randy, i am just finding out what (abs) is and how and when to use them, will try and learn a bit more about that
thank you

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”