Hello all. I'm developing a simple rent management system. I have 4 tenants, each of who have started their tenure on a specific month of a specific year. Their current monthly rent is different for each tenant, and increments by 5% every year on the month they have started.

I have these tables:

tenants:
-name
-current monthly rent amt
-contact details
-current balance (SQL calculated field that is (sum(dues)-sum(received payments))


Dues:
-month
-tenantID
-amount


Payments
-tanantID
-date
-monthID
-amount
-paymentMode


Months
-monthName. (Jan-22, Feb22, Mar23, etc, I have manually addeda bunch of entries from Jan-2021 to Dec-2030)



Now, for example tenant A has rent 2000, and started on Jan 21.
Tenant B has rent 2300 and started on May 21.
I want a way to add a button that, when clicked, will auto add the current rent amount to the dues table with their ID. If a year has passed, the currentRent should be incremented by 5% and then saved in the tenants table, then added to the dues table.


So at the end of the month if I click the button, a new entry will be added for each of the tenants in the dues table, and their balance will get updated in the calculated field, which will get updated when each of them make a payment and I add payments entries for each of them. How do I achieve this?

I can post my project so far if needed.

Thank you for your help smile

2

(35 replies, posted in General)

Hello. What is the difference between Lazarus and MVD? In screenshots the interface looks very similar and it seems they're both based on something called Delphi? Can someone explain?

derek wrote:

Hi,
Try it like this (see the attachment). 
Click on the 'delete' button to see the message split over two lines.
Derek.


That works perfectly, thank you!

derek wrote:

The way that standard MVD works, if you enter 'bill' details and immediately continue to enter 'record' details relating to that bill, MVD will automatically save your 'bill' details (the logic being that the 'bill' must exist before any related 'record' details can be created). 
This still allows you the option to enter 'bill' details and manually 'save' them (for example, because you want to create a bill with no records).
Have a look at the attachment as one possible approach.
Derek.


Thank you for your response! I figured it out while checking the ready made invoice example database, and your response makes it clearer.
I have one additional question, can you show me how to add a newline to a Message Box?

I want to show a message like:

Hello
World!

in two separate lines.

Hello. I am making a program for my own use that has multiple parties, and each party will have multiple bills related to him. each bill will have multiple records, having quantity and weight details. My question is, how do I add and save a bill?

I can use forms to add records, and add parties., but this involves simultaneously creating a new BILL and simultaneously saving multiple records in that particular bill. When do I save the voucher, and when do I save the individual transactions in the bill?

Do I add a small form to save an empty voucher to the BILLS table, then create a new form to add RECORDS to the records table, and link to to the VOUCHERS table?

6

(1 replies, posted in General)

How do I print labels using my label printer using MVD? I'm creating an inventory management system and want to be able to create and print barcode labels.

7

(3 replies, posted in General)

Bump

8

(3 replies, posted in General)

Hi. I would love the ability to add a photo to a database straight from an attached web camera. I'm sure a lot of other users will appreciate this feature too!

Can something like this be implemented? or is there a workaround using some software?

Thank you for your help smile

Ah, the experience sure helped because i tried tracing the problem back and couldn't spot it lol. Thanks again!

brian.zaballa wrote:

Try changing the table for the query setting of the grid from newentry form and set it to customers


What a silly mistake on my part, thank you so much for the quick answer!

(Also, do you mind telling me how you figured out the solution? What degugging steps you took? Or did you just check everything until you found the problem?)

I'm getting this error https://imgur.com/zm7ZqI8 when I Go to the Main Screen>New Entry>Click on a Customer>Edit Customer Details.

I have attached my project, please help me out! Thank you!

(fantastic program, by the way, you've made us all developers! lol)

12

(2 replies, posted in General)

Hey, I have a table with the date the loan was taken and a column with number of months Interest was paid. I want a calculated field which shows me how many months are remaining. I can't even get past getting the current month number in a calculated field number using SELECT strftime('%m', pt_date)   (and pt_date is the name of the column in the table.)

I just need something like ((year(today) - year(pt_date)) * 12 ) + (month(today) - month(pt_date)) which will give me the total number of months, from which I can subtract the number of months it has been paid which is in another  column.

Thank you!

13

(2 replies, posted in General)

DriveSoft wrote:

Unfortunately you forgot attach the screenshot.

Seems like I forgot to click the Add File button, but I attached it now, please have a look!

14

(2 replies, posted in General)

Suggestion: A small GUI to rearrange taborder would be a godsend for large forms with many fields!

Something like this, taken from a StackOverflow answer about Delphi, I have attached a screenshot. Please consider this request as it's very helpful and has the potential to save loads of time.

Ok, wow that was real retarded of me not to realise, but if it's any excuse, I am very new to the program, so apologies!

I can work around this by just using a new form for creating a new record(with a search button) and this existing one to edit it, right?

Again, thanks, and apologies! Absolutely love the program, it's like nothing I've ever used in both ease of use and flexibility.

Anyone?

I have no other events or procedures scripted on the TableGrid, The only scripts I'm using are to resize columns when the form shows.

Here is my script:




procedure newentry_OnShow (Sender: TObject; Action: string);
begin

    newentry.TableGrid1.Columns[0].Width :=   120;
    newentry.TableGrid1.Columns[1].Width :=   120;
    newentry.TableGrid1.Columns[2].Width :=   100;
    newentry.TableGrid1.Columns[3].Width :=   315;

end;

procedure Form1_OnShow (Sender: string; Action: string);
begin
    Form1.TableGrid1.Columns[0].Width := 80;
    Form1.TableGrid1.Columns[1].Width := 90;
    Form1.TableGrid1.Columns[2].Width := 90;
    Form1.TableGrid1.Columns[3].Width := 130;
    Form1.TableGrid1.Columns[4].Width := 130;
    Form1.TableGrid1.Columns[5].Width := 74;
    Form1.TableGrid1.Columns[6].Width := 62;
end;

begin


end.

P.S. Now I get the message even when I click the edit record button.



EDIT: It seems like a bug in the program: The TableGrid I'm selecting the record from has only Name and Second Name fields. But I want to show complete details in the edit record form. But it isn't able to detect all the fields, but only the ones in the previous screen. SO column 3 doesn't exist, and hence can't be resized. So I get that error.

I have attached the project below.

I have a form with a TableGrid, double-clicking a record used to view the record in a different form. But now when I double-click, or click the Show Record button it shows the error message first, and when I close it, it opens the edit screen like normal. I haven't changed as far as I know.

Please see the screenshot: imgur. com/rmx5EpW

How do I fix this?

19

(4 replies, posted in General)

jean.brezhonek wrote:

Hello dhekabai

Welcome to MVD world !

MVD (My Visual Database) is based upon Delphi langage (Turbo Pascal)
RAD means Rapid Application Development.
The company embarcadero has developed the best RAD that is (in my humble opinion) which allows to create applications in Delphi, C ++, for Android, all this under the same environment, from which MVD was inspired.

About DateTimePicker and its various options, please have a look on menu Book (or Livre) from first page when you are going to create a project.
You will also have a description about DefaultCheck property

Good luck with MVD, really a good way to create simple or complex projects.

JB

Also, I could not find any documentation for DateTimePicker's DefaultCheck in the PDF ebook hmm

Every time I make a new entry, the field is populated with a weird date like this: imgur .com/C8YUP1V

EDIT: I added this to the script editor, today's date is 29-9-2020, but the dateTimePicker shows either 29-49-2020 or 29-52-2020. This is really frustrating lol

Final Edit: I deleted the DateTimePicker and readded it, and It seems to have been fixed (for now?)

20

(4 replies, posted in General)

jean.brezhonek wrote:

Hello dhekabai

Welcome to MVD world !

MVD (My Visual Database) is based upon Delphi langage (Turbo Pascal)
RAD means Rapid Application Development.
The company embarcadero has developed the best RAD that is (in my humble opinion) which allows to create applications in Delphi, C ++, for Android, all this under the same environment, from which MVD was inspired.

About DateTimePicker and its various options, please have a look on menu Book (or Livre) from first page when you are going to create a project.
You will also have a description about DefaultCheck property

Good luck with MVD, really a good way to create simple or complex projects.

JB


Thank you so much for your response, I understand now.

P.S. could you also look at the problem I've been facing with DateTimePicker? I've attached screenshots in the Original post.

21

(4 replies, posted in General)

Sorry for the noob question, but What is MyVisualDatabase based on? It looks exactly like RAD Studio? Is it a fork of it?
If that is the case, can anyone point me to a detailed documentation to DateTimePicker and the additional options?
I am encountering what seems to be a bug, when I double click a record in a TableGrid it opens my record in a form but the date is displayed wrong there. It's always an absurd date too, like 12-56-2020 or 10-00-19 or something. Also, clicking save doesn't save the updated record. the date remains the same.
please help.  I have attached screenshots:
imgur .com/a/Lgiw4m7


Also, what is the DefaultChecked property?