Subversion Repositories SmartDukaan

Rev

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

Rev 5540 Rev 5545
Line 22... Line 22...
22
    for invoiceScan in mismatches:
22
    for invoiceScan in mismatches:
23
        body.append("\t".join([date, invoiceScan.invoiceNumber, invoiceScan.supplierName, str(invoiceScan.numItems), str(invoiceScan.scannedQuantity)]))
23
        body.append("\t".join([date, invoiceScan.invoiceNumber, invoiceScan.supplierName, str(invoiceScan.numItems), str(invoiceScan.scannedQuantity)]))
24
        unscannedCount += invoiceScan.numItems - invoiceScan.scannedQuantity
24
        unscannedCount += invoiceScan.numItems - invoiceScan.scannedQuantity
25
    subject = date + ': All items scanned IN!'
25
    subject = date + ': All items scanned IN!'
26
    if body.__len__() > 1:
26
    if body.__len__() > 1:
27
        subject = date + ': ' + str(unscannedCount) + ' items not scanned IN yet'
27
        subject = date + ': ' + str(unscannedCount)
-
 
28
        if unscannedCount > 0:
-
 
29
            subject += ' items not scanned IN yet'
-
 
30
        else:
-
 
31
            subject += ' extra items got scanned IN'
28
    EmailAttachmentSender.mail('cnc.center@shop2020.in', '5h0p2o2o', ['mandeep.dhir@shop2020.in', 'amit.kumar@shop2020.in', 'ashutosh.saxena@shop2020.in', 'sandeep.sachdeva@shop2020.in'], subject, "\n".join(body))
32
    EmailAttachmentSender.mail('cnc.center@shop2020.in', '5h0p2o2o', ['mandeep.dhir@shop2020.in', 'amit.kumar@shop2020.in', 'ashutosh.saxena@shop2020.in', 'sandeep.sachdeva@shop2020.in'], subject, "\n".join(body))
29
 
33
 
30
def generateAndReportScanMismatches(date):
34
def generateAndReportScanMismatches(date):
31
    reportMismatches(generateScanMismatches(date), date)
35
    reportMismatches(generateScanMismatches(date), date)
32
 
36