@@ -214,6 +214,7 @@ public void produceTravelexXML() throws TCWebException, IOException {
214
214
date .setTime (new Date ());
215
215
216
216
try {
217
+ DecimalFormat df = new DecimalFormat ("0.00" , new DecimalFormatSymbols (Locale .US ));
217
218
DocumentBuilderFactory docFactory = DocumentBuilderFactory .newInstance ();
218
219
DocumentBuilder docBuilder = docFactory .newDocumentBuilder ();
219
220
@@ -244,16 +245,16 @@ public void produceTravelexXML() throws TCWebException, IOException {
244
245
245
246
Element paymentElement = doc .createElement ("Payment" );
246
247
paymentElement .setAttribute ("PaymentID" , "" + userPayments .get (0 ).getId ());
247
- paymentElement .setAttribute ("PaymentReference" , "TopCoder Member Payments" );
248
+ paymentElement .setAttribute ("PaymentReference" , "POP: Honorarium - TopCoder Member Payments" );
248
249
249
250
Element payFromElement = doc .createElement ("PayFrom" );
250
251
payFromElement .setAttribute ("PFPayerName" , "TopCoder, Inc." );
252
+ payFromElement .setAttribute ("PFAmount" , df .format (totalUserAmount ));
251
253
paymentElement .appendChild (payFromElement );
252
254
253
255
Element payToElement = doc .createElement ("PayTo" );
254
256
payToElement .setAttribute ("PTPayeeID" , user .getHandle ());
255
257
payToElement .setAttribute ("PTPayeeName" , user .getHandle ());
256
- payToElement .setAttribute ("PTAmount" , "" + totalUserAmount );
257
258
paymentElement .appendChild (payToElement );
258
259
259
260
Element remittanceElement = doc .createElement ("Remittance" );
@@ -266,7 +267,7 @@ public void produceTravelexXML() throws TCWebException, IOException {
266
267
remittanceRecordElement .setAttribute ("PayerDocumentDate" , new SimpleDateFormat ("MM/dd/yyyy" ).format (date .getTime ()));
267
268
remittanceRecordElement .setAttribute ("PayerDocumentType" , "PO" );
268
269
remittanceRecordElement .setAttribute ("PayerDocumentNumber" , "" + payment .getReferenceId ());
269
- remittanceRecordElement .setAttribute ("AmountPaid" , "" + payment .getRecentNetAmount ());
270
+ remittanceRecordElement .setAttribute ("AmountPaid" , df . format ( payment .getRecentNetAmount () ));
270
271
remittanceRecordElement .setAttribute ("Notes" , payment .getDescription ());
271
272
272
273
remittanceElement .appendChild (remittanceRecordElement );
@@ -278,7 +279,7 @@ public void produceTravelexXML() throws TCWebException, IOException {
278
279
remittanceRecordElement .setAttribute ("PayerDocumentDate" , new SimpleDateFormat ("MM/dd/yyyy" ).format (date .getTime ()));
279
280
remittanceRecordElement .setAttribute ("Notes" , "Adjustment for Wire Fee" );
280
281
remittanceRecordElement .setAttribute ("AmountPaid" , "0.0" );
281
- remittanceRecordElement .setAttribute ("AdjustmentAmount" , "-" + WIRE_FEE );
282
+ remittanceRecordElement .setAttribute ("AdjustmentAmount" , df . format (- WIRE_FEE ) );
282
283
remittanceRecordElement .setAttribute ("AdjustmentReason" , "Processing Fee" );
283
284
284
285
remittanceElement .appendChild (remittanceRecordElement );
0 commit comments