Doubt of Concept when registering parcels in the database

1

Personal if I have a sale to be registered, with contract number, customer data and among others and I have fields of sale with parcels ... Al that comes my doubt, I must create a plot of plots interconnected by the number of the sale and each record of a sale generates several record of plots? For example I make a sale in 3x and register 3 records in my table of parcels interconnected by the same purchase ID? Even because I need to later inform the payment date of each one, if there was a discount and finally.

    
asked by anonymous 04.11.2014 / 20:07

1 answer

1

I am a commercial system developer and I suggest the following: Since you need to control the payment and discount of each one, the ideal is to create the table of the form that you described relating by ID. I also suggest that you create a routine not to exclude these installments in case of reversal, or cancellation of the sale. One way to do this is to put an "active" field in the parcel table, if true the parcel is active. A basic structure would be: Id, Sale ID, Parcel Date, Payment Date, Par Value, Amount Paid, Active

Other fields would be: status: in_coblection_tel, in_legal_college, agreement etc.

    
05.11.2014 / 19:42