Subversion Repositories SmartDukaan

Rev

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

Rev 5545 Rev 5576
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)
27
        subject = date + ': ' + str(abs(unscannedCount))
28
        if unscannedCount > 0:
28
        if unscannedCount > 0:
29
            subject += ' items not scanned IN yet'
29
            subject += ' items not scanned IN yet'
30
        else:
30
        else:
31
            subject += ' extra items got scanned IN'
31
            subject += ' extra items got scanned IN'
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))
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))