A Database Error Occurred Error Number: 1054 Champ 'ip_quotes.commande_id' inconnu dans on clause

A Database Error Occurred
Error Number: 1054
Champ ‘ip_quotes.commande_id’ inconnu dans on clause

I jsute try to copy and paste “invoices” module than make some changes to create new module “commandes”

under application/modules/

1- After change all the files in this module (controllers, models and views of “invoices” module) to the one i need to get as new model “commandes”
i did change files name and code in it just word “invoice” by the word “commande”

2- Clone the tables in database and changes names
ip_invoices, ip_invoices_recurring, ip_invoices_amounts, ip_invoices_custom, ip_invoices_groups, ip_invoices_items, ip_invoices_item_amounts, ip_invoices_sumex, ip_invoices_tax_rates

to

ip_commandes, ip_commandes_recurring, ip_commandes_amounts, ip_commandes_custom, ip_commandes_groups, ip_commandes_items, ip_commandes_item_amounts, ip_commandess_sumex, ip_commandes_tax_rates

3- Clone the “invoice_groups” module and change it to “commande_groups” also files in this folder too

4- I did clone the

  • in navbar file in layout model also to make it appear in the navigator

    so everything is normaly going to be good but as result i got :
    1- the popup to add new commande not working

    2- View commandes page can’t be open it show me error
    "A Database Error Occurred
    Error Number: 1054
    Champ ‘ip_quotes.commande_id’ inconnu dans on clause
    SELECT SQL_CALC_FOUND_ROWS ip_quotes., ip_users., ip_clients., ip_commande_sumex., ip_commande_amounts.commande_amount_id, IFnull(ip_commande_amounts.commande_item_subtotal, ‘0.00’) AS commande_item_subtotal, IFnull(ip_commande_amounts.commande_item_tax_total, ‘0.00’) AS commande_item_tax_total, IFnull(ip_commande_amounts.commande_tax_total, ‘0.00’) AS commande_tax_total, IFnull(ip_commande_amounts.commande_total, ‘0.00’) AS commande_total, IFnull(ip_commande_amounts.commande_paid, ‘0.00’) AS commande_paid, IFnull(ip_commande_amounts.commande_balance, ‘0.00’) AS commande_balance, ip_commande_amounts.commande_sign AS commande_sign, (CASE WHEN ip_commandes.commande_status_id NOT IN (1, 4) AND DATEDIFF(NOW(), commande_date_due) > 0 THEN 1 ELSE 0 END) is_overdue, DATEDIFF(NOW(), commande_date_due) AS days_overdue, (CASE (SELECT COUNT() FROM ip_commandes_recurring WHERE ip_commandes_recurring.commande_id = ip_commandes.commande_id and ip_commandes_recurring.recur_next_date <> ‘0000-00-00’) WHEN 0 THEN 0 ELSE 1 END) AS commande_is_recurring, ip_commandes. FROM ip_commandes JOIN ip_clients ON ip_clients.client_id = ip_commandes.client_id JOIN ip_users ON ip_users.user_id = ip_commandes.user_id LEFT JOIN ip_commande_amounts ON ip_commande_amounts.commande_id = ip_commandes.commande_id LEFT JOIN ip_commande_sumex ON sumex_commande = ip_commandes.commande_id LEFT JOIN ip_quotes ON ip_quotes.commande_id = ip_commandes.commande_id ORDER BY ip_commandes.commande_id DESC LIMIT 15

    Filename: C:/wamp64/www/facture/vendor/codeigniter/framework/system/database/DB_driver.php

    Line Number: 691"

    in page with red background

    3- View commandes recurring link work and i can have the page but nothing inside and no btp to create new commande

    any ideas what should i change else ??

  • this is how it appear in the nav bar

    this is when i click on vew commandes

    and this is when i click vew commande recurring

    New correction for the view commandes

    I jus fix the “ip_quotes” table by add new one with “ip_quotes_commandes” name

    still now my problem is i can’t add new commande

    You probably renamed some things in the files.
    There is no field ‘commande_id’ in the entire database.
    It’s a strange issue.
    What happens if you re-download 1.5.11 and start from the beginning?

    Hi,
    I did solve the proble with that commande_id

    problem now is that i can"t create commande the popup not working and even when i am in the view commande page the button also not working