How to model plots when you don’t know how many there are?

Asked

Viewed 305 times

5

Usually, when it comes to payments in instalments, comes the idea of 12 installments.

Then you soon create a table with 12 fields, one for each portion.

But I am faced with the situation that the customer is a consumer of continuous service provision: internet client via radio.

That is, there is no plot 1 of x.

In this case, what would be the logic of creating classes and tables?

  • 5

    you do not create 12 columns. Create another table, with id, date, and portion value etc. This information should be in rows and not columns. Have you ever wondered how to check unpaid installments in January? 11 comparisons?

  • 1

    "Then you soon create a table with 12 fields, one for each portion". I’ve never actually seen anyone do that hehehehe The simplest way is like @rray said.

  • @Caffé if it is in excel that is up to 'acceptable' :P

  • 1

    @rray so look... I think even in excel I would make a separate spreadsheet for the installments, with lookup for the contract :D

2 answers

6


It is very simple, the error already begins in the idea that there are fixed installments. The customer does not have a debt with 12 installments, he has 12 debts.

You can have a contract that originated these debts and you might want to link to this. If this is the case, just make the link through a field, as well as link the debt with the customer. If the link with a contract is mandatory, nor need to link with the customer, because the contract will already have this link.

Note that I am speculating here, you do not talk about contract or other details, it is more difficult to help without understanding the whole problem. In fact these problems in general happen because they lack the right conceptualization, and this we can not help much without a long conversation, which is not the purpose of the site.

But if you have to manage contracts, there’s a lot involved.

In any situation you must use a table with each invoice/billet/duplicate/promissory note/forecast/etc. Each document must have an entry in this table. So you can have as many as you want, you can have 1, 12 or thousands.

This is especially necessary when the quantity is undetermined. Each title (generic name given to what is being charged) is being entered into the system slowly. Probably by a generator. You may not post 3, 12, or 1000 titles to the customer unless there is a contract that says you have that amount. In open-ended contracts each security is generated month by month while the contract is not terminated.

The value can vary from one month to the next, whether by correction, change of package, accessory services, discounts for failures, promotions, adjustments of past charges, etc. If you do not know the value, you cannot launch automatic, especially with much anticipation. You can even automate the monthly launch.

There has to be a control over what will be generated if you want to automate this part, which is a part of the contract control I said before. Automation can launch a new title each month with base value. This value can be adjusted by contract management. It may consider manual launches that are made month by month or that are incidentally registered in the contract or contract addendum.

But it can be done manually with some control if it was generated title of the month for all customers. It is a simpler way and it gives less work to the programmer and more to the user.

There are several ways to implement this and we can help when you have more details.

Anyway, most systems are more complicated than they seem and it is not possible to pass all information in a single answer on any site.

Learn about normalization.

  • 1

    Said everything I was going to say and a little more +1

2

I believe that the most appropriate is to create a table with installments already paid, it depends a little on how your system is.

Paid installments must have the fields, id_installment, payment date, value, can have the contraction id (if there is an agreed amount that will be charged for 12 months, after that a new contract is made with a new value) or customer id.

  • I thought about that, too. But let’s see if the thoughts match: Instead of I launch the 'n' installments, because we do not have the value of 'n' because the contract is undetermined, just keep in the bank the fields, idClient, mes_ano_installment, dataPgtoParcela,!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.