When I sent the variable data through ajax loading_add.php page an error is displayed:
Uncaught ReferenceError: profit is not defined.
What I tried so far is attached below.
var profit = (
Number($("#pro_price").val() - retail_price)
);
$.ajax({
type: "POST",
url: '../php/product/loading_add.php',
dataType: 'JSON',
data: {
profit: profit
};