.
I have VIEW that displays the details of the foreign key.
e.g.
tables: Employee & Payroll_Transactions
-> Where Employee can have 1 or more transactions in 1 payroll schedule.
ex: Employee transactions : base pay, allowance, bonus and deductions like absences, advances etc...)
This happens when an employee has 2 or more allowances or bonuses added to his payroll schedule.
e.g. (view display)
ID | TransactionType | Amount | PayrollPeriod
Employee1 | Allowance | 200.00 | April 1-15
Employee1 | Allowance | 100.00 | April 1-15
Employee1 | Bonus | 50.00 | April 1-15
Employee1 | Bonus | 150.00 | April 1-15
PAYROLL table:
In ADD page I set the ff:
- Set the Edit tag to CHECKBOX in which I can select multiple TransactionType values.
- DISTINCT value to display on TransactionType field (Allowance & Bonus) w/c works very well.
Problem:
In List page, the values selected were duplicated just like on VIEW display of TransactionType (see the presentation).
e.g.
Allowance, Allowance, Bonus, Bonus
NOTE:
- Actual database stores it as comma separated values ( with NO duplication). Meaning its perfectly correct.
Where to fix this issue? If possible, I want to fix this in PHP NOT JS or some other way