I'm facing an issue while transferring a project from local to server. The project works fine locally but not on the server, specifically when I try to edit products. The database is not displaying the correct information, as it shows two crucial numbers as 0 even though they are not supposed to be 0 in the database. These numbers are essential for calculating the price.
Here is the information being displayed for a product:
[ { "country": { "id": 1, "name": "COSTA RICA", "currency_symbol": "CRC" }, "country_id": 1, "margin": 0, "fi": 0 },
{ "country": { "id": 2, "name": "NICARAGUA", "currency_symbol": "COR" }, "country_id": 2, "margin": 0, "fi": 0 },
{ "country": { "id": 3, "name": "HONDURAS", "currency_symbol": "HNL" }, "country_id": 3, "margin": 0, "fi": 0 } ]
However, in the database, the product should have the following margin and fi values:
product_id: 1
country_id: 1
margin: 0.65
fi: 0.50
product_id: 1
country_id: 2
margin: 0.65
fi: 0.50
product_id: 1
country_id: 3
margin: 0.65
fi: 0.50
The edit product function is supposed to mirror the create model, but for some reason, it is not displaying the correct information.
Below is the function responsible for opening the create and edit dialogs:
showDialog(model) {
// Function code here
}
What could be causing this discrepancy between the local environment and the server?