umm i have to display the receipt in a box... and we have to display the value of what was ordered and, i cant seem to change the font and the spacing of the displayed ordered list...
umm how can i change the font size, style and the spacing in the receipt?
thanks :)
here's the code:
Quote:
quote://Vector for the order list
public Vector getOrderListToPrint(double cashAmount)
{
Vector orderVector = new Vector();
orderVector.addElement("STARBUCKS COFFEE");
orderVector.addElement("OPD BY : Rustan Coffee Corp");
orderVector.addElement("G/F Torre Lorenzo Bldg.");
orderVector.addElement("Taft Ave. corner Vito Cruz St.");
orderVector.addElement("Manila");
orderVector.addElement("TIN: 005-215-077-021 VAT");
orderVector.addElement("S/N: 41-GG849");
orderVector.addElement("MIN: 060053275");
orderVector.addElement(" ------------------------------------------------------------------------------------------- ");
orderVector.addElement("O.R. #: 00682529");
for (Iterator it = custOrders.iterator(); it.hasNext();){
orderVector.addElement(it.next()+"\n");
}
double vatSales = subTotal * 0.12;
orderVector.addElement("VAT SALES(12%) "+ formatDigit(vatSales));
double subTotalTemp = subTotal + vatSales;
orderVector.addElement("SUBTOTAL "+ formatDigit(subTotalTemp));
//will write if cashAMount > 0 from the total operation.
if ( cashAmount > 0 ){
orderVector.addElement("CASH "+ formatDigit(cashAmount));
double change = cashAmount - subTotalTemp;
orderVector.addElement("CHANGE "+ formatDigit(change));
}
orderVector.addElement("THIS IS AN OFFICIAL RECEIPT");
orderVector.addElement("ENJOY YOUR COFFEE...");
return orderVector;
}
|