Database structure

entities - here stored all customers, suppliers, users and manufactures. in short all active profiles.

customfields
- We create custom fields for custom used in entities table, the fields description are stored in “customfields” table.
Linkage is made by entities.CustomField'X'. Xcustomfields.FieldID.
The fields in entities table is created like that: CustomFIeld + customfields.FieldID

Customfields table:
FormID values are 0 = fields in entities table, 1 = fields in orders table, 2 = fields in Products & order_products table.

Custom Fields Types:
0 - text
1 - numeric
2 - Date
3 - Time
4 - DateTime
5 - Memo
6 - CheckBox
7 - Picture
8 - File
9 - Combobox
10 - ChecklistBox
13 - Grid
14 - Button
15 - EntityGrid
16 - WebPage

Telemarketing_outgoing - here all records of calls users should dial. When users set cal as completed the record will be deleted from this table.
Telemarketing_history - all calls history made by telemarketing are stored here. When flag isFinal=1 this is the last record.

 

Sales


Order Status:

0 = In process.
1 = Open.
2 = Closed.

Orders.Recurrence
0 = regular order.
1 = subscription.

Orders.RecurringStatus
0 =  Active
1 =  Not Active
2 =  Suspended
3 =  Insufficient Funds
4 =  Can't Charge Payment
5 =  Payment was Declined

Document Types
Invoice=2,
Invoice_Receipt=3,
Receipt=4,
Price quote=5,
Refund Invoice=6,
Shipping Label=7,
Return Label=8,
Receipt Cancel=9,
on_line_templates=10

  • Template names: (MessageName)
    entity_forgot_password
    entity_email_Verification
    stock_level_low_notification
    welcome_new_customer.
    restaurant_temporary_bill
    restaurant_preparation_bon

Purchase Order=11

Inventory logic:
If orders_products.purchase_productID<>0 then
Product came from purchased stock and linked to purchase_products.productID

Payment types
Cash - 0
Credit Card - Phone - 1
Cheque - 2
Credit Card - 3
Bank Clearing System - 4
eWallet - 5
Wire Transfer - 6

Products types
0=Unknown,
1=Physical,
2=Consumable,
3=Service,
4=Membership

Campaign types

0 : telemarketing
1 : voice broadcasting
2 : Fax
3 : Email
4 : SMS
5 : Printing
6 : WhatsApp

 

Add comment