Subversion Repositories SmartDukaan

Rev

Rev 6467 | Rev 6638 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6467 Rev 6630
Line 418... Line 418...
418
        """
418
        """
419
        try:
419
        try:
420
            return [i.to_thrift_object() for i in Invoice.query.filter(Invoice.date > to_py_date(date)).all()]
420
            return [i.to_thrift_object() for i in Invoice.query.filter(Invoice.date > to_py_date(date)).all()]
421
        finally:
421
        finally:
422
            self.close_session()
422
            self.close_session()
-
 
423
            
-
 
424
    def getInvoice(self, invoiceNumber, supplierId):
-
 
425
        """
-
 
426
        Fetches all invoices for  given invoiceNumber and supplierId 
423
 
427
 
-
 
428
        Parameters:
-
 
429
         - invoiceNumber, supplierId
-
 
430
        """
-
 
431
        try:
-
 
432
            return Invoice.query.filter_by(invoiceNumber = invoiceNumber, supplierId = supplierId).first().to_thrift_object()
-
 
433
        finally:
-
 
434
            self.close_session()
-
 
435
    
424
    def createInvoice(self, invoice):
436
    def createInvoice(self, invoice):
425
        """
437
        """
426
        Creates an invoice object
438
        Creates an invoice object
427
 
439
 
428
        Parameters:
440
        Parameters: