Exemplo n.º 1
0
    def _setSalesTotal(self, salesTotal):
        """
	Add sales total to account class
		"""
        salesTotal = s.removeSpaces(salesTotal)
        salesTotal = s.removeCommas(salesTotal)
        salesTotal = s.removeReturns(salesTotal)
        self.postedTotalSales = float(salesTotal)
        self._setCalculatedTotal()
Exemplo n.º 2
0
    def __init__(self, orderNo, date, PO, shipTo=None):
        """
	Initializes the Order class.  Requires the order number, the date of the
	order, and the PO number to be inputted.
		"""
        self.order = s.removeSpaces(orderNo)
        self.date = s.removeSpaces(date)
        self.PO = s.removeReturns(s.removeSpaces(PO))
        if shipTo is not None:
            self.shipTo = self.setShipTo(shipTo)
        self.items = []
        self.totalSales = 0
        self.building = True