You are a developer working on a new customized form and are troubleshooting a defect
on the form.
The form displays a summary for each line. The defect report says that the form shows the
incorrect
summary for return order lines.
A display method provides the summary, and the method calls the following:
public str salesLineSummary(
SalesType _type,
str _orderNum,
ItemId _itemId,
Qty _lineQty,
Question No : 28
Microsoft MB6-894 : Practice Test
20
Amount _lineAmount
)
{
Amount baseAmount = _lineAmount > 0 ? _lineAmount : -1 * _lineAmount;
str formattedAmount = num2Str(baseAmount, 10, 2, DecimalSeparator::Dot,
ThousandSeparator::Comma);
str summary;
switch (_type)
{
case SalesType::Sales:
summary = strFmt('Order %1 ordered %2 of %3 [Subtotal: %4]',
_orderNum, _lineQty, _itemId, formattedAmount);
break;
case SalesType::ReturnItem:
summary = strFmt('RMA %1 expecting %2 of %3 for %4 credit',
_orderNum, _lineQty, _itemId, formattedAmount);
default:
summary = strFmt('Journal %1: %2 of %3', _orderNum, _lineQty,
_itemId);
}
return summary;
}
You need to fix the defect in the most efficient way possible.
Which modification should you make?
Selecciona una de las siguientes respuestas posibles: