Furthermore, this issue doesn't happen just on the duplication process. If you re-edit a quote, the same issue occurs, which I believe is even more of an issue, because the same quote will have different values before and after an edit. I would definitely consider that a bug, and the fix is below.
Change the $add_row .= statement on line 251 of modules/Quotes/views/view.edit.php to PHP Code:
$add_row .= "addRow('$line_item->id','" . format_number($line_item->quantity, 0, 0) . "','$line_item->product_template_id','$encoded_name'"
. ", '".format_number($line_item->cost_price, $significantDigits, $significantDigits, array('convert' => false, 'currency_id' => $curid)) . "'"
. ", '".format_number($line_item->list_price, $significantDigits, $significantDigits, array('convert' => false, 'currency_id' => $curid)) ."'"
. ", '".format_number($line_item->discount_price, $significantDigits, $significantDigits, array('convert' => false, 'currency_id' => $curid)) . "'"
. ", '', '', '$line_item->pricing_factor', '$line_item->tax_class', '$tax_class_name', '$line_item->mft_part_num', '$product_bundle->id', '$product_bundle->bundle_stage', '$product_bundle->name', '"
. format_number($product_bundle->shipping)."', '".js_escape(br2nl($line_item->description))."', '". $line_item->type_id."'"
. ", '".format_number($line_item->discount_amount, $significantDigits, $significantDigits, array('convert' => !$line_item->discount_select, 'currency_id' => $curid))."'"
. ", ".($line_item->discount_select?1:0)
. ", ".($line_item->deal_calc?1:0)
. ", '".$line_item->status."');\n";
and the $add_row .= statements starting on line 292 of the same file to PHP Code:
$add_row .= "addRow('','$line_item->quantity','$line_item->product_template_id','$line_item->name'"
. ", '".format_number($line_item->cost_price, $significantDigits, $significantDigits, array('convert' => false, 'currency_id' => $curid)) . "'"
. ", '".format_number($line_item->list_price, $significantDigits, $significantDigits, array('convert' => false, 'currency_id' => $curid)) ."'"
. ", '".format_number($line_item->discount_price, $significantDigits, $significantDigits, array('convert' => false, 'currency_id' => $curid)) . "'";
$add_row .= ", '', '', '$line_item->pricing_factor', '$line_item->tax_class', '$tax_class_name',
'$line_item->mft_part_num', 'group_$product_bundle->id', '$product_bundle->bundle_stage', '$product_bundle->name', '".format_money($product_bundle->shipping,FALSE)
."', '".js_escape(br2nl($line_item->description))."', '"
. $line_item->type_id ."','"
. $line_item->discount_amount."',".($line_item->discount_select?1:0)
. ",0, '". $line_item->status."');\n";
Bookmarks