locked
Cash Denomination Calculator RRS feed

  • General discussion

  • I made a program to calculate cash denomination: XBN027.  Why don't you modify this program for your currency?

    Screen shot of a program Cash Denomination Calculator 0.1.0


    Nonki Takahashi

    Saturday, August 8, 2020 3:57 AM

All replies

  • I added the euro to the calculator. I included the rounding to the nearest 5 eurocent, used with cash payments is most countries of Europe.  Code XBN027-0

    Jan [ WhTurner ] The Netherlands


    Saturday, August 8, 2020 1:25 PM
    Answerer
  • I added the euro to the calculator. I included the rounding to the nearest 5 eurocent, used with cash payments is most countries of Europe.  Code XBN027-0

    Jan [ WhTurner ] The Netherlands


    Hi Jan, nice program.  Excellent! 


    Nonki Takahashi

    Saturday, August 8, 2020 4:11 PM
  • Added CNY; still trying to colour the bills.

    The new ID is XBN027-1.

    Seid Bereit!

    Best Regards.

    Sunday, August 9, 2020 10:19 AM
  • I added the possibilty to select the currency (no need to change the programmingsource to change) and select the rounding dependent on the currency

    the code is XBN027-2 

    A further refinement could be to change these selection while the porgram is running (to be made)


    Jan [ WhTurner ] The Netherlands

    Sunday, August 9, 2020 11:36 AM
    Answerer
  • added some clrs and 500/200E bills: NNF261-0

    Monday, August 10, 2020 6:53 AM
  • added some clrs and 500/200E bills: NNF261-0

    So quick!
    Monday, August 10, 2020 11:02 AM
  •  update NNF261-1

    • added HR Kuna

    • shadows

    Tuesday, August 11, 2020 6:51 AM
  • Hello,

    I tried some of the euroconverters. In fact in the bank-world if you have to transfer cash you need to use at "less as possible" banknotes and coins ... so something as 74 = 1x50  + 1x20 + 2x2  and not 3x20 + 1x10 + 4x1

    At the same time in the cash machines have to keep the total of the remaining banknotes and coins in the machine. Most machines stops functioning when there are no more banknotes of 50 and you are asking 60 ... the machine will not give 3x20 ... except if there a specific algorithm ! If you have to calculate individual cash salaries the bank have to deliver just enough banknotes and coins, and the employee need to follow this method in order to be able to pay even the last employee ... just imagine you have to pay the last one 80 euro and you still have 4 banknotes of 20 ... you made some mistakes with at least two employees  ... and if you have only 1 x50 euro you are in big trouble and perhaps there is a lucky employee. As student I had to prepare the enveloppes with the salaries by bundle of hundred employees - a lot of stress and finally a horror story. An idea to keep track of the conversions in the program and total of banknotes ans coins ? 


    • Edited by Eddy Abts Thursday, August 13, 2020 7:14 AM
    Thursday, August 13, 2020 7:12 AM
  • added GBP/BoE and bill amount limit: FPP410

    Thursday, August 13, 2020 10:13 AM
  • Hello,

    I tried some of the euroconverters. In fact in the bank-world if you have to transfer cash you need to use at "less as possible" banknotes and coins ... so something as 74 = 1x50  + 1x20 + 2x2  and not 3x20 + 1x10 + 4x1

    At the same time in the cash machines have to keep the total of the remaining banknotes and coins in the machine. Most machines stops functioning when there are no more banknotes of 50 and you are asking 60 ... the machine will not give 3x20 ... except if there a specific algorithm ! If you have to calculate individual cash salaries the bank have to deliver just enough banknotes and coins, and the employee need to follow this method in order to be able to pay even the last employee ... just imagine you have to pay the last one 80 euro and you still have 4 banknotes of 20 ... you made some mistakes with at least two employees  ... and if you have only 1 x50 euro you are in big trouble and perhaps there is a lucky employee. As student I had to prepare the enveloppes with the salaries by bundle of hundred employees - a lot of stress and finally a horror story. An idea to keep track of the conversions in the program and total of banknotes ans coins ? 


    now added autobill balance n switching on out of stock: NVX421

    Saturday, August 15, 2020 4:47 AM
  • Hello Tryhest,

    In line 73 there is a call to probably a « Fremy Company » extension.

    FCextensions.IsNumber(Text.GetSubtext(wl 1 1))

    First the delimiters are spaces in stead of comma’s – great to see it’s also working !

    At least I imagine FC means “Fremy Company” so I tried to download the extentions via

    https://social.technet.microsoft.com/wiki/contents/articles/21024.small-basic-fremy-extension.aspx

    and

    https://cid-201f3835d49587fe.skydrive.live.com/self.aspx/Public/Small%20Basic/Help%20archive.zip

    … there I am going in trouble receiving “ We encountered a problem !”

    So I tried a shortcut to verify if it’s a number

    if text.getlength(Text.GetSubtext(wl,1,1)) = text.getlength(Text.GetSubtext(wl,1,1)+0) then

    but somewhere the right window start flashing indicating an endless loop.

    To solve this I need to find out what the FCextensions.IsNumber is doing.

    Saturday, August 15, 2020 4:47 PM
  • u can replace it with nonki's sub lib project: GKR726

    another simple isnum sub

    sub isnum

    if args[1]*1=args[1] then

    return="true

    else

    return="false

    endsub

    usage:

    if ldcall.function("isnum" par) then

    ...

    endif

    Saturday, August 15, 2020 7:17 PM
  • added CHF: NVX421-1

    Saturday, August 15, 2020 7:52 PM
  • Thanks,

    To replace the FCExtensions.IsNumber at line 73  with the isnum function see program NVX421-2 

    as it is only used once 

    with   if/then SB see program NVX421-3. 

    I will try to contact François if he is still in Belgium to ask if the FC extensions are still available

    Concerning the timertick-interval to control the flashing of the money- available. Why not update this time-tickering screen immediately after last calculation ? I don't understand the reason ? If timerinterval is set to 0 then the program is going in trouble after some conversions. Is it to avoid problems with buttonclicked ? I couldn't find the place to control negative inventory of banknotes and coins to insert "Cash not available". The proposed banknotes disappears (it's a good idea) but only after being no more available. Asking a banknote of 200 you will get 2x100, And if there is not enough money the program crashes.  

    A great program-idea with a lot of hints to understand and learn !    



    • Edited by Eddy Abts Sunday, August 16, 2020 8:58 AM
    Sunday, August 16, 2020 8:48 AM
  • it is still demo, u can improve it as u like to.

    instead of timer interval u can add a button RECALC .

    min.timer interval mustn't be under 100ms

    instead of datagrid u can use ldfastarray to perform faster calcs

    (psst: sb arrays are catastrophic slow!)

    Try, explore and enjoy))


    • Edited by Tryhest Sunday, August 16, 2020 10:16 AM
    Sunday, August 16, 2020 10:12 AM
  • added 141 countries valute list: BND595

    Wednesday, August 26, 2020 6:58 AM
  • updt: to 201 countries listed:  BND595-1
    Wednesday, August 26, 2020 9:01 AM
  • now it displays xcng rate vs us$ when selected state from list:  BND595-4

    also updated to 228 countries!






    • Edited by Tryhest Thursday, August 27, 2020 7:28 AM
    Thursday, August 27, 2020 7:03 AM