594 | | def writeBillingCodeDescription(self, code) : |
595 | | """Sets the new description for a billing code.""" |
596 | | self.doModify("UPDATE billingcodes SET description=%s WHERE id=%s" % (self.doQuote(self.userCharsetToDatabase(code.Description or "")), self.doQuote(code.ident))) |
597 | | |
598 | | def setBillingCodeValues(self, code, newpagecounter, newbalance) : |
599 | | """Sets the new page counter and balance for a billing code.""" |
600 | | self.doModify("UPDATE billingcodes SET balance=%s, pagecounter=%s WHERE id=%s" % (self.doQuote(newbalance), self.doQuote(newpagecounter), self.doQuote(code.ident))) |
| 594 | def saveBillingCode(self, code) : |
| 595 | """Saves the billing code to the database.""" |
| 596 | self.doModify("UPDATE billingcodes SET balance=%s, pagecounter=%s, description=%s WHERE id=%s" \ |
| 597 | % (self.doQuote(code.Balance), \ |
| 598 | self.doQuote(code.PageCounter), \ |
| 599 | self.doQuote(self.userCharsetToDatabase(code.Description)), \ |
| 600 | self.doQuote(code.ident))) |