Recent

Author Topic: accounting software fpc/Lazarus  (Read 1074 times)

Middlecope

  • Jr. Member
  • **
  • Posts: 76
accounting software fpc/Lazarus
« on: January 26, 2021, 08:20:18 pm »
On sourceforge.net I placed the source of an accounting program.
I used it for my business for 5 years. The program is a back end for communication with a MariaDB/MySQL server.
I hope to find pascal programmers, who like to advance the program.
Teunis
https://sourceforge.net/projects/money-talks

MarkMLl

  • Hero Member
  • *****
  • Posts: 2367
Re: accounting software fpc/Lazarus
« Reply #1 on: January 26, 2021, 10:43:12 pm »
That sounds pretty good and we are all very grateful for the contribution, but could you clarify one thing please: what jurisdiction are you in as far as tax etc. are concerned?

In the UK (Great Britain, England/Wales/Scotland etc.) there's increasing insistence from the government that companies /must/ use approved software; that doesn't apply just to accounting but also to things like vehicle inspection.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

nummer8

  • Jr. Member
  • **
  • Posts: 70
Re: accounting software fpc/Lazarus
« Reply #2 on: January 26, 2021, 11:13:17 pm »
Hi,

Thank you for sharing your program.
I managed to get it running under windows.
The main issue to get it working for me was a kind of ini file which is placed in the user directory.
That is what I changed to the program directory for testing purposes.
An example ini file is below

busy=biz
year=2021
working=bizz
book=MT_biz2021
bookpriv= MT_priv2021
bookbiz= MT_biz2021
income=0
// Change the next if necessay:
printerpath=c:\windows\temp
// the start date yyyymmdd
backup=2020102
//This one or a remote address
Serveraddres=127.0.0.1
MyUser=mtuser
password= mtpasswd
Company=Company Name
Priv_name=Youre name
TAX_company=????
TAX_private=???
//These rate values are to my currency Nafl
//Change them to yours. The currency symbol is not used in the program.
koers_USA=1,82
koers_Euro=2
CRIB_biz=Tax number
CRIB_priv=private Tax number

Further is it posible to get the structure of the missing tables like tax and other tables that can be used.


Middlecope

  • Jr. Member
  • **
  • Posts: 76
Re: accounting software fpc/Lazarus
« Reply #3 on: January 27, 2021, 03:00:39 pm »
I stopped using Windows for several reasons. The most important was the changing GUI with the different versions.
I don't know how to place the INI file in Windows. Another problem is Can you install CUPS-PDF printer under Windows. I guess so.
Please nummer8 can you place a comment on SF.net how to compile / install under Windows?

Tax is a regional problem. I made it for my country Curacao. But it has to be updated for different countries.
So $IFDEF Pakistan or another country should be used.
For the curious I attach the structure of the tax table that I use. The field names are in dutch.
No translation because it is very country specific.
Thanks for your attention.
Teunis

nummer8

  • Jr. Member
  • **
  • Posts: 70
Re: accounting software fpc/Lazarus
« Reply #4 on: January 27, 2021, 04:28:58 pm »
Hi,

Windows was just what I had available yesterday. To me it is more important that it is cross-platform and you already had it working on Linux.
Thanks for the Tax table structure.
The printing (in Windows) is another issue that I have not solved yet.
Work in progress.
The ini file is not a problem. In your version it will end up in c:\users\<user>\ if you ru it on Windows.
The problem was that is is missing in the zip and the program is unforgiving about that.
Other then that, no problem.
I will note my steps to get it running and add that to SF.net.

Groeten,
Jos

Middlecope

  • Jr. Member
  • **
  • Posts: 76
Re: accounting software fpc/Lazarus
« Reply #5 on: January 27, 2021, 08:02:16 pm »
Yes nummer8,
I added the .MoneyTalks_int to the zip
The print work should be possible:
In deprinter.pas you find:
Code: Pascal  [Select][+][-]
  1.  778 Printer.SetPrinter('CUPS-PDF');
  2. // Send text to the printer
  3.  
  4. 789 FileName:= '';
  5. 790 WHILE Pos('.pdf',Filename) = 0 DO FileName:= Pak_file;
  6. 791 SysUtils.ExecuteProcess(UTF8ToAnsi('/usr/bin/okular'),FileName, []);        
ExecuteProcess also works under Windows I think okular is not present in MSWin
Teunis

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 9205
  • FPC developer.
Re: accounting software fpc/Lazarus
« Reply #6 on: January 27, 2021, 08:41:20 pm »
Code: [Select]
[quote author=Middlecope link=topic=53052.msg392096#msg392096 date=1611774136]
SysUtils.ExecuteProcess(UTF8ToAnsi('/usr/bin/okular'),FileName, []);       
[/quote]

The UTF8toansi is a code smell, and signals code that hasn't been updated for FPC 3.0+

Middlecope

  • Jr. Member
  • **
  • Posts: 76
Re: accounting software fpc/Lazarus
« Reply #7 on: January 28, 2021, 01:47:24 pm »
Sorry Marcov,
My English is limited. The meaning of the phrase "code smell" is beyond my comprehension.
The source was compiled with FPC 3.2.0 without warning about ATF8toAnsi.
If the software can be made more efficient / secure. Please, give less cryptic hints!

lucamar

  • Hero Member
  • *****
  • Posts: 3763
Re: accounting software fpc/Lazarus
« Reply #8 on: January 28, 2021, 03:27:41 pm »
The meaning of the phrase "code smell" is beyond my comprehension.[/url]

Wikipedia to the rescue! Code smell. Basically, it's a "signal" that there's probably something (else) wrong or some avoidable obsolescence in the code.

In this particular case, what he means is that since FPC 3.0 there's usually little need of using UTF8ToAnsi() so the fact that it's still there probably means that the code hasn't been rechecked/updated for quite some time.

Note that it's not necessarily wrong and there might be some reason for its use (for example to keep compatibility with older compiler versions) but it's a signal that "all is not well in Denmark" (as Hamlet would say ;)).
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

 

TinyPortal © 2005-2018