Re: [Gambas-user] Financial program

2009-12-14 Thread Doriano Blengino
nando ha scritto:
> My contribution to this conversation is..
> Always INT or LONG for money.
> Keep a global variable to divide by (for example 2 decimal places) 100
> when printing/displaying things to humans...
> -OR- to take the string and insert a period for cents (North America)
> Make a really nice SUB to return a formatted string is good.
> It is the utmost importance not to use FLOAT from the beginning
> because calculations will be wrong after a while and it will not balance.
> You will have headaches!!!
>   
You are perfectly true. It seems that floating point does not like base 
10 numbers... :-)

But here comes in place the power of a programming language; a good 
language is a wrapper around bad or annoying things. All we love gambas 
because it is easy to construct user interface. But there would be no 
necessity of its power - one can write external functions and interface 
to X11 directly...

So when you tell me "don't use floats for accounting" I agree. When you 
say "use a global variable to divide", "insert a decimal point" and so 
on, I think "100% of gambas users want to use graphical interfaces, 
while only 2% of them want to use financial capabilities. So, that 2% 
must live with a language not very suitable for accounting". "Use long 
integers, divide them, use format$()..." is the reply from Benoit. Does 
someone remember the Cobol? With a simple declaration "picture 99." 
it created a datatype and managed all the roundings and conversions on 
that datatype; this was the power of that language. I don't say that 
gambas should implement this, but it would not hurt... it is a matter of 
choice; I understand that this kind of things is difficult to implement 
(or, who knows... with OO programming... but the really hard part is the 
mixing of different types in the same expression).

The most important application I've written with gambas is something 
similar to a financial one. I faced problems with gridviews, tableviews, 
formats, roundings... all the things we are speaking about just now, and 
they are not yet fully solved. I think that the way you describe is a 
hard work, even if it is the only possible at the moment.

Regards,

-- 
Doriano Blengino

"Listen twice before you speak.
This is why we have two ears, but only one mouth."


--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread nando
My contribution to this conversation is..
Always INT or LONG for money.
Keep a global variable to divide by (for example 2 decimal places) 100
when printing/displaying things to humans...
-OR- to take the string and insert a period for cents (North America)
Make a really nice SUB to return a formatted string is good.
It is the utmost importance not to use FLOAT from the beginning
because calculations will be wrong after a while and it will not balance.
You will have headaches!!!

-Fernando


-- Original Message ---
From: "Ron_1st" 
To: gambas-user@lists.sourceforge.net
Sent: Tue, 15 Dec 2009 00:38:35 +0100
Subject: Re: [Gambas-user] Financial program

> On Tuesday 15 December 2009, Benoît Minisini wrote:
> > Again we are talking about currencies. What's the matter with telephony 
> > seconds? If you want to say that you have to store 1/1000th of cents, ro 
> > more, 
> > just choose a more precise format. With a Long datatype and using 
> > 1/100th 
> > of currency unit (!), you can store up to 4,6 x 10^12 units. That should be 
> > enough.
> >
> 
> Thanks for the calculation. I hope never have to pay that amount :) :)
> 
> Best regards,
> 
> Ron_1st
> 
> --
> 
> 111.11 x 111.11 = 12345.678987654321
> 
> --
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
--- End of Original Message ---

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Ron_1st
On Tuesday 15 December 2009, Benoît Minisini wrote:
> Again we are talking about currencies. What's the matter with telephony 
> seconds? If you want to say that you have to store 1/1000th of cents, ro 
> more, 
> just choose a more precise format. With a Long datatype and using 1/100th 
> of currency unit (!), you can store up to 4,6 x 10^12 units. That should be 
> enough.
> 

Thanks for the calculation. I hope never have to pay that amount :) :) 

Best regards,

Ron_1st

-- 

111.11 x 111.11 = 12345.678987654321


--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Ron_1st
On Monday 14 December 2009, Jean-Yves F. Barbier wrote:
> Benoît Minisini a écrit :
> ...
> > I think you are mixing a lot of different things:
> > 
> > - When storing a amount of money in memory, you store it in a Long integer 
> > in 
> > 1/10th of cents. For example, storing 1234,56€ will be stored as 123456
> 
> I'm gonna test that, but it implies more load of the DB server side to
> convert from one format to the other.

It is not a matter of the DB server to calculate.
Its the presentation only, the matter of the frontend program.
Adding integers a amount in 1/10th of cents stored is more quick then
adding floating point numbers that must be handled to and back from the 
co-processor. 

In fact your gambas program does not use that co-proc but a library to do
the job in software in most cases. 
Only special programs handle this arithmetic direct to the co-proc.


> 
> > - When displaying an amount of money, you use Format$(), or your own 
> > function.
> > 
> > - When getting an amount of money from the user, you have to convert a 
> > string 
> > into an amount of 1/10th of cents.
> > 
> > - When getting an amount of money from the outside, or exporting an amount 
> > of 
> > money to the outside, you must use an standard exchange format based on a 
> > string.
> 
> This is not acceptable: DB must be able to directly process numbers, 
> not to loose 95% of the time to convert a string to a number and
> vice versa (many of my process aren't done by GB but into stored 
> procedures)

A DB server is _just_ losing time if the numbers are in floats and not in 
integer.
It have to first normalize the numbers before it can do the arithmetics.
And I'm almost on safe that it also _just_ use a slow library instead of the 
co-proc.

> 
> > So I don't see any problem with that. Why are you talking about telephone 
> > seconds? We are talking about money, aren't we? Or there is something I 
> > didn't 
> > understand?
> 
> Yep, but some amounts can have many more decimals than others (in telephony,
> seconds are usually invoiced with @ least 6 decimals and sometimes 8), so 
> mixing that with other number of decimals isn't easy.

Almost every accounting program works with at least 8 decimals for the 
fractional part.
Only at the last step, the presentation the rounding to 2 decimals for currency 
is/should done.

> 
> This is why definable decimals numbers are so important.
> 
I do agree it can be handy to have but there is no absolute need. 
However if we talking about scientific calculations then it would/can 
be a complete different case.

In my view a database is for storage  of information/numbers. 
The handling/calculation of the stored data is the job for the end application.

In my good old times I made some floating point programs on a Z80 CPU.
No support for floats or co-procs available (or acceptable price).
I did just what Benoit suggest and worked with 1/100 of a cent and
at the last step the round to 2 decimals in Dutch Giuilder. 
Later I got a request to implement the co-proc and the customer 
was disapointed about the drop in speed as result.
The max bit size was 16 bit for add/subtract so I had to make
my own routines for 4 times 16 bit wide. Was interesting job to do.


Anyway I feel a bit with your for the request. 
It can make simple apps more ease to develop.

Best regards,

Ron_1st

-- 

111.11 x 111.11 = 12345.678987654321



--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Benoît Minisini
> Benoît Minisini a écrit :
> ...
> 
> > I think you are mixing a lot of different things:
> >
> > - When storing a amount of money in memory, you store it in a Long
> > integer in 1/10th of cents. For example, storing 1234,56€ will be stored
> > as 123456
> 
> I'm gonna test that, but it implies more load of the DB server side to
> convert from one format to the other.
> 
> > - When displaying an amount of money, you use Format$(), or your own
> > function.
> >
> > - When getting an amount of money from the user, you have to convert a
> > string into an amount of 1/10th of cents.
> >
> > - When getting an amount of money from the outside, or exporting an
> > amount of money to the outside, you must use an standard exchange format
> > based on a string.
> 
> This is not acceptable: DB must be able to directly process numbers,
> not to loose 95% of the time to convert a string to a number and
> vice versa (many of my process aren't done by GB but into stored
> procedures)
> 

"Outside" means "out of your control", or "out of the program internals". If 
it is a stored procedure you wrote, it will manipulate the integer values 
directly of course. But if you have to send or receive currencies from another 
program, you must use a standard exchange format.

> > So I don't see any problem with that. Why are you talking about telephone
> > seconds? We are talking about money, aren't we? Or there is something I
> > didn't understand?
> 
> Yep, but some amounts can have many more decimals than others (in
>  telephony, seconds are usually invoiced with @ least 6 decimals and
>  sometimes 8), so mixing that with other number of decimals isn't easy.
> 
> This is why definable decimals numbers are so important.
> 

Again we are talking about currencies. What's the matter with telephony 
seconds? If you want to say that you have to store 1/1000th of cents, ro more, 
just choose a more precise format. With a Long datatype and using 1/100th 
of currency unit (!), you can store up to 4,6 x 10^12 units. That should be 
enough.

-- 
Benoît Minisini

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
...
> I think you are mixing a lot of different things:
> 
> - When storing a amount of money in memory, you store it in a Long integer in 
> 1/10th of cents. For example, storing 1234,56€ will be stored as 123456

I'm gonna test that, but it implies more load of the DB server side to
convert from one format to the other.

> - When displaying an amount of money, you use Format$(), or your own function.
> 
> - When getting an amount of money from the user, you have to convert a string 
> into an amount of 1/10th of cents.
> 
> - When getting an amount of money from the outside, or exporting an amount of 
> money to the outside, you must use an standard exchange format based on a 
> string.

This is not acceptable: DB must be able to directly process numbers, 
not to loose 95% of the time to convert a string to a number and
vice versa (many of my process aren't done by GB but into stored 
procedures)

> So I don't see any problem with that. Why are you talking about telephone 
> seconds? We are talking about money, aren't we? Or there is something I 
> didn't 
> understand?

Yep, but some amounts can have many more decimals than others (in telephony,
seconds are usually invoiced with @ least 6 decimals and sometimes 8), so 
mixing that with other number of decimals isn't easy.

This is why definable decimals numbers are so important.

-- 
Q:  How do you keep a moron in suspense?

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial Program

2009-12-14 Thread Matti
1. "Accounting programs are very much underestimated."
That's true, indeed.
I know a lot of people who thought that accounting was a minor matter, bought
some program and did something not knowing what they did.
They all got big problems with the tax authorities.

2. Writing an accounting program is even worse.
In accounting, there are so many VAT and income tax questions involved (that
change almost daily). If you write an accounting program, you *really* have to
know all the tax backgrounds.
Which are different from country to country, of course.

Beware!

Matti

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Editor control

2009-12-14 Thread John
I thought that the Flags must have been on by default, with the 
highlight property set to none the background color changed when a line 
was modified. Thank you so much for straightening me out Benoît.

> As for the background color, the Editor actually does not use it, it uses the
> background color defined in the highlighting style.
>
> So: Editor1.Styles[Highlight.Background].Background = Color.Yellow
>
> As for the flags, there are all off by default, so I don't understand why you
> want to set them off again.
>
> Regards,
>
>


--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Editor control

2009-12-14 Thread Benoît Minisini
> > Do you use Gambas 3 ? Do you use the latest revision ?
> 
> That would have been useful information to add, sorry. I tried both
> Gambas 2.18 and Gambas 3 svn (updated today).
> 
> > Editor.Flags[Editor.ShowModifiedLines] = False
> > Editor.Flags[Editor.ShowCurrentLine] = False
> >
> > Regards,
> 
> That is what I was using, sorry if I am missing something basic.
> 
> Here is what I tried, FMain has an Editor control named Editor1 and in the
> Form_Open Sub ()
>Editor1.Text = File.Load("test.txt")
>Editor1.Flags[Editor.ShowModifiedLines] = False
>Editor1.Flags[Editor.ShowCurrentLine] = False
> End
> 
> I wasn't sure if I needed Editor1.Reset, but tried it.
> 
> Also I copied the Highlight example and tried to turn off
> ShowModifiedLines, still can't make it work. As soon as it loads a file
> the Editor1 background becomes white.
> 
> Thanks,
> John
> 

As for the background color, the Editor actually does not use it, it uses the 
background color defined in the highlighting style.

So: Editor1.Styles[Highlight.Background].Background = Color.Yellow

As for the flags, there are all off by default, so I don't understand why you 
want to set them off again.

Regards,

-- 
Benoît Minisini

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Editor control

2009-12-14 Thread John

> Do you use Gambas 3 ? Do you use the latest revision ?
>
>
That would have been useful information to add, sorry. I tried both 
Gambas 2.18 and Gambas 3 svn (updated today).
> Editor.Flags[Editor.ShowModifiedLines] = False
> Editor.Flags[Editor.ShowCurrentLine] = False
>
> Regards,
>
>
That is what I was using, sorry if I am missing something basic.

Here is what I tried, FMain has an Editor control named Editor1 and in the
Form_Open Sub ()
   Editor1.Text = File.Load("test.txt")
   Editor1.Flags[Editor.ShowModifiedLines] = False
   Editor1.Flags[Editor.ShowCurrentLine] = False
End

I wasn't sure if I needed Editor1.Reset, but tried it.

Also I copied the Highlight example and tried to turn off 
ShowModifiedLines, still can't make it work. As soon as it loads a file 
the Editor1 background becomes white.

Thanks,
John


--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Benoît Minisini
> Benoît Minisini a écrit :
> >> Benoît Minisini a écrit :
>  Fabien Bodard a écrit :
> > you have Laurux at http://laurux.fr/
> >
> > but the code is not perfect has it was on the start a code learning
> > programme.. but at the end it's a true accounting program... in
> > french (Gb2)
> 
>  BTW, do you plan to have an equivalent of postgresql or python
>  decimal(n,n) into GB3?
>  It would be *very* interesting (otherwise you have to filter every
>  line through Format$)
> 
>  JY
> >>>
> >>> You mean a fixed-point decimal datatype? Or a currency datatype?
> >>
> >> A fixed-point decimal
> >>
> >>> It cannot be done in Gambas 3. So, in Gambas 4 ?
> >>
> >> Hu?
> >> That's too bad because it is needed to ease accounting purposes.
> >
> > Why not storing currencies in cents, or fraction of cents, with a Long
> > datatype?
> 
> No, this is the best way to make mistakes (ie: invoice hardware with
> 2 decimals, but invoice telephone seconds with 8 & connections w/ 3 or 4
> on the same invoice, oeuf corse).
> 
> Format$ is not very useful because of conversions it involves.
> 
> Using integer arithmetics is muuuch tooo slooow.
> 
> So the less worse is still Format$.
> 

I think you are mixing a lot of different things:

- When storing a amount of money in memory, you store it in a Long integer in 
1/10th of cents. For example, storing 1234,56€ will be stored as 1234560.

- When displaying an amount of money, you use Format$(), or your own function.

- When getting an amount of money from the user, you have to convert a string 
into an amount of 1/10th of cents.

- When getting an amount of money from the outside, or exporting an amount of 
money to the outside, you must use an standard exchange format based on a 
string.

So I don't see any problem with that. Why are you talking about telephone 
seconds? We are talking about money, aren't we? Or there is something I didn't 
understand?

-- 
Benoît Minisini

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
>> Benoît Minisini a écrit :
 Fabien Bodard a écrit :
> you have Laurux at http://laurux.fr/
>
> but the code is not perfect has it was on the start a code learning
> programme.. but at the end it's a true accounting program... in french
> (Gb2)
 BTW, do you plan to have an equivalent of postgresql or python
 decimal(n,n) into GB3?
 It would be *very* interesting (otherwise you have to filter every line
 through Format$)

 JY
>>> You mean a fixed-point decimal datatype? Or a currency datatype?
>> A fixed-point decimal
>>
>>> It cannot be done in Gambas 3. So, in Gambas 4 ?
>> Hu?
>> That's too bad because it is needed to ease accounting purposes.
>>
> 
> Why not storing currencies in cents, or fraction of cents, with a Long 
> datatype?
 
No, this is the best way to make mistakes (ie: invoice hardware with
2 decimals, but invoice telephone seconds with 8 & connections w/ 3 or 4
on the same invoice, oeuf corse).

Format$ is not very useful because of conversions it involves.

Using integer arithmetics is muuuch tooo slooow.

So the less worse is still Format$.

-- 
Mieux vaut tard que jamais!
[ Better late than never ]

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Tony
Kari Laine wrote:
> Hi,
>
> I have already done little billing program for my parents little firm.
> It was a learning exercise. It would make a big help to get little
> companies to move to Linux if there was a financial program that run
> on Linux and would be free. There comes in Gambas.
>
> Is there already an GPLed financial program made with Gambas?
> If not is someone having different parts of a system willing to donate
> source code under GPL?
>
> My billing program is so horrible that in it's condition I don't want
> to show it's sources to anyone... it was my first Gambas program...
>
> Why Gambas would be extra value for this kind of a project.? Gambas is
> easy language and integrated editor makes it very easy to implement
> user interface. Speed and other things which are good in C or C++ are
> not so important. Naturally someone says Python would be way to go but
> I find it more difficult than Gambas. Idea is that regular Joe with
> little experimenting could change the program.
>
> Best Regards
> Kari
>
>   
Hi,

Whilst obviously not written in Gambas, I've been using GnuCash for 
personal accounting for some time. The double entry bit and UI are a 
little clunky for my basic needs, but in the end it works. I'm think you 
can use it for billing and you can tailor reports etc in guile, so it 
may be worth a look. Source code should be available since it is GPL.

Tony..

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Benoît Minisini
> Benoît Minisini a écrit :
> >> Fabien Bodard a écrit :
> >>> you have Laurux at http://laurux.fr/
> >>>
> >>> but the code is not perfect has it was on the start a code learning
> >>> programme.. but at the end it's a true accounting program... in french
> >>> (Gb2)
> >>
> >> BTW, do you plan to have an equivalent of postgresql or python
> >> decimal(n,n) into GB3?
> >> It would be *very* interesting (otherwise you have to filter every line
> >> through Format$)
> >>
> >> JY
> >
> > You mean a fixed-point decimal datatype? Or a currency datatype?
> 
> A fixed-point decimal
> 
> > It cannot be done in Gambas 3. So, in Gambas 4 ?
> 
> Hu?
> That's too bad because it is needed to ease accounting purposes.
> 

Why not storing currencies in cents, or fraction of cents, with a Long 
datatype?

-- 
Benoît Minisini

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread girardhenri
You have the wonderfull accounting programm www.laurus.fr
Here you have some :

http://gambas.sourceforge.net/en/main.html

enjoy :)
Henri
--
From: "Kari Laine" 
Sent: Monday, December 14, 2009 4:32 PM
To: 
Subject: [Gambas-user] Financial program

> Hi,
>
> I have already done little billing program for my parents little firm.
> It was a learning exercise. It would make a big help to get little
> companies to move to Linux if there was a financial program that run
> on Linux and would be free. There comes in Gambas.
>
> Is there already an GPLed financial program made with Gambas?
> If not is someone having different parts of a system willing to donate
> source code under GPL?
>
> My billing program is so horrible that in it's condition I don't want
> to show it's sources to anyone... it was my first Gambas program...
>
> Why Gambas would be extra value for this kind of a project.? Gambas is
> easy language and integrated editor makes it very easy to implement
> user interface. Speed and other things which are good in C or C++ are
> not so important. Naturally someone says Python would be way to go but
> I find it more difficult than Gambas. Idea is that regular Joe with
> little experimenting could change the program.
>
> Best Regards
> Kari
>
> -- 
> PIC - ARM - Microcontrollers - I2C - SPI
> Keypads - USB-RS232 - USB-I2C - Accessories
> http://www.byvac.com
> I am just a happy customer
>
> --
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Werner
On 15/12/09 01:22, Kari Laine wrote:
> Hi,
>   
>> There is Quasar from Linux Canada. It is very similar to MYOB. Their
>> last GPL version is 1.4.7, I think.
>> 
> Do you have the source for the GPL version. I visited their site and
> couldn't find it.
>
>
>   
>> If you think you can write a decent accounting program in 3 man months
>> you don't know what the task is.
>> If you think you can write a decent accounting program in 3 man years
>> you may have something fairly basic to show but only if you got your
>> priorities right.
>> 
> I always have my priorities wrong ... I am right now swamped. But
> I was more on the line what exists and could be modified for Finnish market.
> And idea was also that I wouldn't have to do everything myself.
>
>   
>> Accounting programs are very much underestimated.
>> 
> I agree.
>
> Best Regards
> Kari
>
> It's here:
>   
ftp://www.linuxcanada.com/pub/Quasar/1.4.7/
I hope to have conveyed: They are very decent people and it is brilliant
software.

Regards
Werner


--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Jean-Yves F. Barbier
Kari Laine a écrit :
> Hi,
> 
> thanks
> 
> On Mon, Dec 14, 2009 at 6:03 PM, Fabien Bodard  wrote:
>> you have Laurux at http://laurux.fr/
>>
>> but the code is not perfect has it was on the start a code learning
>> programme.. but at the end it's a true accounting program... in french
>> (Gb2)
>>
> 
> I don't read a single word French so I have to pass. It would be too
> difficult for me to adapt.

You can take a look at sql-ledger that implements a double-entry
accounting with many accounting plans (but it is written in perl...)

-- 
A man without a woman is like a fish without gills.

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
>> Fabien Bodard a écrit :
>>> you have Laurux at http://laurux.fr/
>>>
>>> but the code is not perfect has it was on the start a code learning
>>> programme.. but at the end it's a true accounting program... in french
>>> (Gb2)
>> BTW, do you plan to have an equivalent of postgresql or python decimal(n,n)
>> into GB3?
>> It would be *very* interesting (otherwise you have to filter every line
>> through Format$)
>>
>> JY
>>
> 
> You mean a fixed-point decimal datatype? Or a currency datatype?

A fixed-point decimal
 
> It cannot be done in Gambas 3. So, in Gambas 4 ?

Hu?
That's too bad because it is needed to ease accounting purposes.

-- 
Antique fairy tale: Little Red Riding Hood.
Modern fairy tale: Oswald, acting alone, shot Kennedy.

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Editor control

2009-12-14 Thread Benoît Minisini
> I have a problem with the editor control, I set it to have a grey
> background, but if I load a file it becomes white. Is there a way that I
> can change the background color for modified lines and the current line?

Do you use Gambas 3 ? Do you use the latest revision ?

> 
> If not how can I turn off ShowModifiedLines and ShowCurrentLine?

Editor.Flags[Editor.ShowModifiedLines] = False
Editor.Flags[Editor.ShowCurrentLine] = False

Regards,

-- 
Benoît Minisini

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Kari Laine
Hi,

thanks

On Mon, Dec 14, 2009 at 6:03 PM, Fabien Bodard  wrote:
> you have Laurux at http://laurux.fr/
>
> but the code is not perfect has it was on the start a code learning
> programme.. but at the end it's a true accounting program... in french
> (Gb2)
>

I don't read a single word French so I have to pass. It would be too
difficult for me to adapt.


Best Regards
Kari

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Kari Laine
Hi,
> There is Quasar from Linux Canada. It is very similar to MYOB. Their
> last GPL version is 1.4.7, I think.

Do you have the source for the GPL version. I visited their site and
couldn't find it.


> If you think you can write a decent accounting program in 3 man months
> you don't know what the task is.
> If you think you can write a decent accounting program in 3 man years
> you may have something fairly basic to show but only if you got your
> priorities right.
I always have my priorities wrong ... I am right now swamped. But
I was more on the line what exists and could be modified for Finnish market.
And idea was also that I wouldn't have to do everything myself.

> Accounting programs are very much underestimated.
I agree.

Best Regards
Kari











-- 
PIC - ARM - Microcontrollers - I2C - SPI
Keypads - USB-RS232 - USB-I2C - Accessories
http://www.byvac.com
I am just a happy customer

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Benoît Minisini
> Fabien Bodard a écrit :
> > you have Laurux at http://laurux.fr/
> >
> > but the code is not perfect has it was on the start a code learning
> > programme.. but at the end it's a true accounting program... in french
> > (Gb2)
> 
> BTW, do you plan to have an equivalent of postgresql or python decimal(n,n)
> into GB3?
> It would be *very* interesting (otherwise you have to filter every line
> through Format$)
> 
> JY
> 

You mean a fixed-point decimal datatype? Or a currency datatype?

It cannot be done in Gambas 3. So, in Gambas 4 ?

-- 
Benoît Minisini

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Werner
On 14/12/09 23:32, Kari Laine wrote:
> Hi,
>
> I have already done little billing program for my parents little firm.
> It was a learning exercise. It would make a big help to get little
> companies to move to Linux if there was a financial program that run
> on Linux and would be free. There comes in Gambas.
>
> Is there already an GPLed financial program made with Gambas?
> If not is someone having different parts of a system willing to donate
> source code under GPL?
>
> My billing program is so horrible that in it's condition I don't want
> to show it's sources to anyone... it was my first Gambas program...
>
> Why Gambas would be extra value for this kind of a project.? Gambas is
> easy language and integrated editor makes it very easy to implement
> user interface. Speed and other things which are good in C or C++ are
> not so important. Naturally someone says Python would be way to go but
> I find it more difficult than Gambas. Idea is that regular Joe with
> little experimenting could change the program.
>
> Best Regards
> Kari
>
>   
There is Quasar from Linux Canada. It is very similar to MYOB. Their
last GPL version is 1.4.7, I think. After that they went sort of
proprietary(Note1) but the documentation of how to hook into the new
version database is exemplary. We use 1.4.7, mostly the inventory
control part which is excellent. In this version the reporting bits are
suboptimal but the rest is fine.
We use  it since around 2002, using mostly the inventory control part.
The mailing list support is excellent. I had studied their source code.
It is extremely well written, I learned a lot from it.

If you think you can write a decent accounting program in 3 man months
you don't know what the task is.
If you think you can write a decent accounting program in 3 man years
you may have something fairly basic to show but only if you got your
priorities right.
Accounting programs are very much underestimated.

You might just want to hook into what's there and be efficient. The
interface is well documented.

Regards

Werner

Note 1: If I recall it properly it was after someone claimed their
software was actually his

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Fabien Bodard
i've bookmarked the pyton page ... this is an interesting thing but
... always the time problem ...



2009/12/14 Jean-Yves F. Barbier <12u...@gmail.com>:
> Fabien Bodard a écrit :
>> you have Laurux at http://laurux.fr/
>>
>> but the code is not perfect has it was on the start a code learning
>> programme.. but at the end it's a true accounting program... in french
>> (Gb2)
>
> BTW, do you plan to have an equivalent of postgresql or python decimal(n,n)
> into GB3?
> It would be *very* interesting (otherwise you have to filter every line
> through Format$)
>
> JY
> --
> My rackets are run on strictly American lines, and they're going to
> stay that way.
>                -- Al Capone
>
> --
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Jean-Yves F. Barbier
Fabien Bodard a écrit :
> you have Laurux at http://laurux.fr/
> 
> but the code is not perfect has it was on the start a code learning
> programme.. but at the end it's a true accounting program... in french
> (Gb2)

BTW, do you plan to have an equivalent of postgresql or python decimal(n,n)
into GB3?
It would be *very* interesting (otherwise you have to filter every line 
through Format$)

JY
-- 
My rackets are run on strictly American lines, and they're going to
stay that way.
-- Al Capone

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Editor control

2009-12-14 Thread John
I have a problem with the editor control, I set it to have a grey 
background, but if I load a file it becomes white. Is there a way that I 
can change the background color for modified lines and the current line?

If not how can I turn off ShowModifiedLines and ShowCurrentLine?

Thanks,
John

Note: I sent this same message yesterday to the list, I am only 
resending it  because the date was wrong on my computer which would bury 
that message on most email clients.
--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Financial program

2009-12-14 Thread Fabien Bodard
you have Laurux at http://laurux.fr/

but the code is not perfect has it was on the start a code learning
programme.. but at the end it's a true accounting program... in french
(Gb2)




2009/12/14 Kari Laine :
> Hi,
>
> I have already done little billing program for my parents little firm.
> It was a learning exercise. It would make a big help to get little
> companies to move to Linux if there was a financial program that run
> on Linux and would be free. There comes in Gambas.
>
> Is there already an GPLed financial program made with Gambas?
> If not is someone having different parts of a system willing to donate
> source code under GPL?
>
> My billing program is so horrible that in it's condition I don't want
> to show it's sources to anyone... it was my first Gambas program...
>
> Why Gambas would be extra value for this kind of a project.? Gambas is
> easy language and integrated editor makes it very easy to implement
> user interface. Speed and other things which are good in C or C++ are
> not so important. Naturally someone says Python would be way to go but
> I find it more difficult than Gambas. Idea is that regular Joe with
> little experimenting could change the program.
>
> Best Regards
> Kari
>
> --
> PIC - ARM - Microcontrollers - I2C - SPI
> Keypads - USB-RS232 - USB-I2C - Accessories
> http://www.byvac.com
> I am just a happy customer
>
> --
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Financial program

2009-12-14 Thread Kari Laine
Hi,

I have already done little billing program for my parents little firm.
It was a learning exercise. It would make a big help to get little
companies to move to Linux if there was a financial program that run
on Linux and would be free. There comes in Gambas.

Is there already an GPLed financial program made with Gambas?
If not is someone having different parts of a system willing to donate
source code under GPL?

My billing program is so horrible that in it's condition I don't want
to show it's sources to anyone... it was my first Gambas program...

Why Gambas would be extra value for this kind of a project.? Gambas is
easy language and integrated editor makes it very easy to implement
user interface. Speed and other things which are good in C or C++ are
not so important. Naturally someone says Python would be way to go but
I find it more difficult than Gambas. Idea is that regular Joe with
little experimenting could change the program.

Best Regards
Kari

-- 
PIC - ARM - Microcontrollers - I2C - SPI
Keypads - USB-RS232 - USB-I2C - Accessories
http://www.byvac.com
I am just a happy customer

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] signal SIGSEGV, Segmentation fault when using database example with ODDBC to a MSSQL Database

2009-12-14 Thread Franklin Solutions Limited
Problem #11 when using ODBC to connect to a remote database running on MS
SQL Server 2000.

 

I can connect to the database and run queries using tsql from a terminal and
isql from a root terminal and I can connect using odbc in Gambas2 if the ide
is started from a root terminal but not if started from the programme
shortcut.

 

I have a small utility to run queries on a SQL server, display the results
and optionally export them as a csv file. As soon as the programme gets to
the line where the query is assigned to a Result the programme crashes with
a #11.  This behaviour is identical if running the Database Sample. The
connection is opened. connection.opened is True when tested in debug mode.
The line where the error occurs in the sample is:-

 

  rData = $hConn.Exec(txtRequest.Text)

 

which is the same as the one in my application where the programme crashes

 

PUBLIC SUB FillGrid(ctl AS Control, cnn AS Connection, sqlstr AS String)

  DIM datout AS Result, i AS Integer, j AS Integer

  

  datout = cnn.Exec(sqlstr)   The line the crash occurs

 

The version of gambas2 is 2.18.0

The kernel is Linux 2.6.31.5-127/fc12.x86_64

System is

  Memory 3.8 GiB

  Proc 0 AMD Athlon(tm) X2 Dual Core processor 5200+

  Proc 1 AMD Athlon(tm) X2 Dual Core processor 5200+

 

The query is executed as can be seen from the output from Wireshark included
after the debug output.

 

Thanks

 

Tony 

 

Debug data and Wireshark output from running the Database Sample Programme.

 

[r...@fslserver Database]# cd /usr/share/gambas2/examples/Database/Database

[r...@fslserver Database]# gbc2 -agt

OK

[r...@fslserver Database]# gdb gbx2

GNU gdb (GDB) Fedora (7.0-8.fc12)

Copyright (C) 2009 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later


This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "x86_64-redhat-linux-gnu".

For bug reporting instructions, please see:

...

Reading symbols from /usr/bin/gbx2...(no debugging symbols found)...done.

Missing separate debuginfos, use: debuginfo-install
gambas2-runtime-2.18.0-1.fc12.x86_64

(gdb) set args -p

(gdb) run

Starting program: /usr/bin/gbx2 -p

[Thread debugging using libthread_db enabled]

 

Program received signal SIGSEGV, Segmentation fault.

0x003b3a27978c in free () from /lib64/libc.so.6

(gdb) bt

#0  0x003b3a27978c in free () from /lib64/libc.so.6

#1  0x004050f1 in sinh ()

#2  0x7fffefe013aa in SQLDisconnect ()

   from /usr/lib64/gambas2/gb.db.odbc.so

#3  0x7fffefe03a28 in ?? () from /usr/lib64/gambas2/gb.db.odbc.so

#4  0x77408da2 in ?? () from /usr/lib64/gambas2/gb.db.so

#5  0x7740975f in ?? () from /usr/lib64/gambas2/gb.db.so

#6  0x774063c7 in ?? () from /usr/lib64/gambas2/gb.db.so

#7  0x00408b32 in sinh ()

#8  0x0040952f in sinh ()

#9  0x0042eea5 in sinh ()

#10 0x00409cf5 in sinh ()

#11 0x00409fac in sinh ()

#12 0x0041c4c9 in sinh ()

#13 0x0041ce79 in sinh ()

#14 0x7797edca in g_io_channel_unref ()

   from /usr/lib64/gambas2/gb.gtk.so

#15 0x00324020ba8e in g_closure_invoke () from
/lib64/libgobject-2.0.so.0

#16 0x003240220ec3 in ?? () from /lib64/libgobject-2.0.so.0

#17 0x00324059 in g_signal_emit_valist ()

   from /lib64/libgobject-2.0.so.0

#18 0x0032402227a3 in g_signal_emit () from /lib64/libgobject-2.0.so.0

#19 0x00324468d615 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0

---Type  to continue, or q  to quit---

#20 0x00324020ba8e in g_closure_invoke () from
/lib64/libgobject-2.0.so.0

#21 0x0032402207dc in ?? () from /lib64/libgobject-2.0.so.0

#22 0x00324059 in g_signal_emit_valist ()

   from /lib64/libgobject-2.0.so.0

#23 0x0032402227a3 in g_signal_emit () from /lib64/libgobject-2.0.so.0

#24 0x00324468be77 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0

#25 0x003244753903 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0

#26 0x00324020ba8e in g_closure_invoke () from
/lib64/libgobject-2.0.so.0

#27 0x003240220b8d in ?? () from /lib64/libgobject-2.0.so.0

#28 0x0032402220ec in g_signal_emit_valist ()

   from /lib64/libgobject-2.0.so.0

#29 0x0032402227a3 in g_signal_emit () from /lib64/libgobject-2.0.so.0

#30 0x003244875a9f in ?? () from /usr/lib64/libgtk-x11-2.0.so.0

#31 0x00324474a664 in gtk_propagate_event ()

   from /usr/lib64/libgtk-x11-2.0.so.0

#32 0x00324474b7a3 in gtk_main_do_event ()

   from /usr/lib64/libgtk-x11-2.0.so.0

#33 0x7798c627 in ?? () from /usr/lib64/gambas2/gb.gtk.so

#34 0x00324625f7fc in ?? () from /usr/lib64/libgdk-x11-2.0.so.0

#35 0x00323fe3922e in g_main_context_dispatch ()

   from /lib64/libglib-2.0.so.0

#36 0x00323fe3cc18 in