It is currently Wed May 23, 2012 4:11 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Thu Mar 27, 2008 6:38 am 
Offline

Joined: Sat Aug 18, 2007 7:14 am
Posts: 746
Module: account_payment_check_us

I have made some progress on creating an early version of 'account_payment_check_us' check printing module for the US. Remember, the module does not (and never will) do the actual checkprinting itself. What it does is establishes a process that can manage the error-prone interactive process of checkprinting. The output is check and remittance data as XML that then must get fed into another third-party checkprint program. Something like CheckPlus perhaps.

The module currently sets up all the tables, table mods, sequences, triggers, etc. but the actual process itself runs as a command line script, checkrun.py. I started this project last year as just a hack on another script of mine and I just continued on with what I had until I had it running somewhat successfully.

I would like to receive some feedback from other users on the module even in its current primitive form. So if any of the US folks would like to try it out and test it, let me know and I'll post the module somewhere. I am using it with a test setup with some good results. But remember this is alpha software at this point. Don't get it near any production systems just yet.

Gerry


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 27, 2008 4:02 pm 
Offline

Joined: Sat Aug 18, 2007 7:14 am
Posts: 746
I posted the [ account_payment_check_us ] module here:

http://code.google.com/p/greno-misc/downloads/list

Basic instructions:

Install these modules in one of your tinyerp TEST databases:
account_payment
account_payment_check_us


Create some supplier invoices (usually 5 or 6 will do). Create a few supplier invoices that are from the same supplier if you want to see how multiple invoices per check works.

Set the limit_one_inv_per_check field in res_company (True | False).

Now open a terminal window.
cd to ..../addons/account_payment_check_us in your installation

Start the checkrun:
./checkrun.py --help # see options
./checkrun.py -h 192.168.x.y # example


The checkrun will prompt you for needed choices and then will output an XML file, check.xml, in the current directory, containing all the check and remittance data.

Please take a look at the source code for checkrun.py. I would like some feedback on whether I have all the field sources right for the data. I have not done anything with tax or currency fields since US is mostly single currency. If there needs to be something done there please let me know. And some feedback on the process as a whole would be appreciated.

Once you can generate good XML files then you have to locate a checkprint program that can map its fields to its own internal fields and print the actual checks for you. There are a number of checkprint programs that you can look at: CheckPlus and ChequeScribe 32 are two I have seen. Also you might want to investigate maybe something like GNUCash which last I saw had some really basic checkprint ability. Right now I am trying to take an old inhouse acctg app that could produce checks and see if I can have it read the XML file. If anyone else manages to get one of the checkprint apps working with the XML file please let me know.

Gerry


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 27, 2008 6:02 pm 
Offline
Site Admin

Joined: Tue Feb 08, 2005 9:48 am
Posts: 2121
Location: Grand-Rosiere, Belgium
Very good. Can you send it to the module section of this website ?

Thanks,


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 27, 2008 8:05 pm 
Offline

Joined: Sat Aug 18, 2007 7:14 am
Posts: 746
Done.

module is here:
Modules | Generic | Accounting & Finance
http://tinyerp.com/component/option,com_mtree/Itemid,111/task,viewlink/link_id,360/

to find it by search:
Search on [ checks ]


Gerry


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 26, 2009 1:41 am 
Offline

Joined: Fri Jun 26, 2009 1:24 am
Posts: 3
Hi This routine converts USD number amount to written strings.
Next I'll try to make PDF for pre-printed check from greno's XML.

Code:
dict_single = {'1':'One ','2':'Two ','3':'Three ',
                '4':'Four ','5':'Five ','6':'Six ',
                '7':'Seven ','8':'Eight ','9':'Nine '}

dict_teen =  {'10':'Ten ','11':'Eleven ','12':'Twelve ','13':'Thirteen ',
                '14':'Fourteen ','15':'Fifteen ','16':'Sixteen ',
                '17':'Seventeen ','18':'Eighteen ','19':'Nineteen '}

dict_xxxty = {'':'', '0':'', '2':'Twenty ','3':'Thirty ','4':'Forty ',
        '5':'Fifty ', '6':'Sixty ','7':'Seventy ','8':'Eighty ','9':'Ninety '}

dict_lion = {0:'', 1:'Thousand ',2:'Million ',3:'Billion ',4:'Trillion '}
#over 999 Trillion check amount will cause Key error. ...who does?

def DollarToCheckWrittenString(amount):
    """Print Check String from Dollar Amount. no negative input please."""
    writtenString = ''  # result.

    #step 1. convert to Decimal.
    dollarAmount = decimal.Decimal(repr(amount))
    onecent = decimal.Decimal('0.01')     #to specify cents format
    dollarAmount = dollarAmount.quantize(onecent, decimal.ROUND_HALF_UP)

    #step 2. convert cents.
    if dollarAmount < decimal.Decimal('1.00'):
        writtenString = 'ZERO and ' + str(dollarAmount)[-2:] + '/100'
    else:
        writtenString = 'and ' + str(dollarAmount)[-2:] + '/100'

    #step 3. dollar area.
    onedollar = decimal.Decimal('1') #to specify dollars, cents removed
    dollarAmount = dollarAmount.quantize(onedollar, decimal.ROUND_DOWN)

    DigitCount = 0  # , thousand, million, ...
    # I rely on Dictionary, and will process small to large
    while dollarAmount > decimal.Decimal('0'):
        tmpString = ''
        if str(dollarAmount)[-3:-2] in dict_single:
            tmpString = dict_single[str(dollarAmount)[-3:-2]] + 'Hundred '

        if str(dollarAmount)[-2:] in dict_teen:
            tmpString += dict_teen[str(dollarAmount)[-2:]]
        else:
            tmpString += dict_xxxty[str(dollarAmount)[-2:-1]]
            if str(dollarAmount)[-1:] in dict_single:
                tmpString += dict_single[str(dollarAmount)[-1:]]

        tmpString += dict_lion[DigitCount] #(none), thousand, million, ...
        writtenString = tmpString + writtenString
        DigitCount += 1
        #go to next (999,999,xxx) upper digits, by shift right 3
        dollarAmount = (dollarAmount / 1000).quantize(onedollar, decimal.ROUND_DOWN)

    return writtenString


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 27, 2009 2:36 am 
Offline

Joined: Fri Jun 26, 2009 1:24 am
Posts: 3
oh, I have to install account_payment_check_us.

I got this error at Module-install.
File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/account_payment_check_us/__init__.py", line 27, in <module>
import checkrun
ImportError: No module named checkrun

I tried to run checkrun.py only - (commented out many lines - )
got one xml. :)

=======edit=========
ashamed, I copied checkrun.py as root user.
I chmod and can be installed...


Last edited by bmk20398 on Wed Jul 01, 2009 12:16 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 30, 2009 3:16 am 
Offline

Joined: Fri Jun 26, 2009 1:24 am
Posts: 3
I got PDF for my company by code below.
Oh, this forum has no 'attachment' function?
if so I can post checks.xml, this code, result PDF...

Next I have to see what greno is doing and try to make wizard, and 'void check' function... it will be hard task... :(

Code:

from reportlab.pdfgen.canvas import Canvas
from reportlab.lib.pagesizes import letter
from reportlab.lib.units import mm

from xml.etree import ElementTree

def main():
    CheckXMLToMyPDF(open('checks.xml').read(),'check.pdf')

def CheckXMLToMyPDF(CheckXMLString, OutputPDFFile):
    #if you want A4, you don't have to specify pagesize.
    pdf = Canvas(OutputPDFFile, pagesize = letter)

    #This is monospaced, bold font.
    pdf.setFont("Courier-Bold", 12)
    #black pen.
    pdf.setStrokeColorRGB(1, 0, 0)

    #get values from XML
    root = ElementTree.parse('checks.xml')
    #main data, for Check itself
    bankname = root.findtext('////bankname').strip()
    checkDate = root.findtext('/////checkdate').strip()
    checkAmount = root.findtext('/////checkamount').strip()
    checkWritten = root.findtext('/////checkwritten').strip()
    if len(checkWritten) > 72 :
        #This if should be modified, to use smaller font, when very long
        checkWritten = checkWritten[:71]
    checkVendorName1 = root.findtext('/////checkvendorname1').strip()
    checkVendorAddr1 = root.findtext('/////checkvendoraddr1').strip()
    checkVendorAddr2 = root.findtext('/////checkvendoraddr2').strip()
    checkVendorcsz = root.findtext('/////checkvendorcsz').strip()

    #This format is for my company's pre-printed check.
    #Canvas origin is lower left corner.
    #drawString(left(x), top(y), text)
    pdf.drawString(175 * mm, 254 * mm, checkDate)
    pdf.drawString(25 * mm, 242 * mm, checkVendorName1)
    pdf.drawString(175 * mm, 242 * mm, checkAmount)
    pdf.drawString(9 * mm, 233 * mm, checkWritten)
    pdf.drawString(23 * mm, 225 * mm, checkVendorName1)
    pdf.drawString(23 * mm, 220 * mm, checkVendorAddr1 + checkVendorAddr2)
    pdf.drawString(23 * mm, 215 * mm, checkVendorcsz)

    #get each invoice value.
    invoices = root.findall('accountholder/account/check/invoice')

    #print stub area, which goes to Vendor.
    stubtitle = checkVendorName1.ljust(30) + checkDate.rjust(30)
    pdf.drawString(19 * mm, 178 * mm, stubtitle)
    eachline = 'Date'.ljust(18) + 'Reference'.ljust(18)
    eachline += 'Balance Due'.rjust(16) + 'Payment'.rjust(16)
    pdf.drawString(19 * mm, 173 * mm, eachline)

    x = 1
    for invoice in invoices:
        invdate = invoice.findtext('checkinvoicedate').strip()
        invnum = invoice.findtext('checkinvoicenum').strip()
        invgross = invoice.findtext('checkinvoicegrossamount').strip()
        invnet = invoice.findtext('checkinvoicenetamount').strip()
        eachline = invdate.ljust(18) + invnum.ljust(18)
        eachline += invgross.rjust(16) + invnet.rjust(16)
        pdf.drawString(19 * mm, (173 - x*5) * mm, eachline)
        x += 1

    #print end of invoices, total payment
    TotalPayment = 'Check Amount'.rjust(52) + checkAmount.rjust(16)
    pdf.drawString(19 * mm, (173 - x*5) * mm, TotalPayment)

    #print bank, total
    BankLine = bankname.ljust(52) + checkAmount.rjust(16)
    pdf.drawString(19 * mm, 107 * mm, BankLine)

    #Once Again, for our stub. at will duplicated to make different format.
    stubtitle = checkVendorName1.ljust(30) + checkDate.rjust(30)
    pdf.drawString(19 * mm, 90 * mm, stubtitle)
    eachline = 'Date'.ljust(18) + 'Reference'.ljust(18)
    eachline += 'Balance Due'.rjust(16) + 'Payment'.rjust(16)
    pdf.drawString(19 * mm, 85 * mm, eachline)

    x = 1
    for invoice in invoices:
        invdate = invoice.findtext('checkinvoicedate').strip()
        invnum = invoice.findtext('checkinvoicenum').strip()
        invgross = invoice.findtext('checkinvoicegrossamount').strip()
        invnet = invoice.findtext('checkinvoicenetamount').strip()
        eachline = invdate.ljust(18) + invnum.ljust(18)
        eachline += invgross.rjust(16) + invnet.rjust(16)
        pdf.drawString(19 * mm, (85 - x*5) * mm, eachline)
        x += 1

    #print end of invoices, total payment
    TotalPayment = 'Check Amount'.rjust(52) + checkAmount.rjust(16)
    pdf.drawString(19 * mm, (85 - x*5) * mm, TotalPayment)

    #print bank, total
    BankLine = bankname.ljust(52) + checkAmount.rjust(16)
    pdf.drawString(19 * mm, 18 * mm, BankLine)


    #generate page, and save to file.
    pdf.showPage()
    pdf.save()

if __name__ == "__main__":
    main()


Top
 Profile  
 
 Post subject: Re: Impression de ch/Check Writing US
PostPosted: Fri Feb 25, 2011 7:39 am 
Offline

Joined: Thu Sep 03, 2009 8:57 pm
Posts: 120
Location: Charlotte, NC
A new check writing module called account_check_writing is now available as part of lp:openerp-usa. It is designed to support both pre-printed checks and blank (no preprinted check number) check stock.

This new module also has a 17-20 page documentation guide/pdf and a sample printed check.

There is more information posted at http://www.novapointgroup.com/blog.

It will also be posted to extras shortly.

This works in v6 leveraging the account_voucher module.
Journals are specifically setup to support Check Printing.

Here is a summary list of capabilities:
OpenERP provides easy-to-use check writing capabilities starting with version 6. Users can manage their check writing process by installing the account_check_writing module. The module provides users a variety of useful check writing capabilities:

Ability to make supplier payments with checks
◦ Support paying a single and multiple outstanding supplier invoices with one check
Support printing checks in three formats: Top voucher check, middle voucher check, and bottom voucher check,
Support both pre-printed check (check # already printed), and blank check stock
Printing an individual check
Printing multiple checks in batch (printing multiple checks at one time)
Reprinting checks
Voiding checks
Tracking Stop Payment assignment on checks
Printing replacement checks
Manage errors that can occur during check printing
Tracking check status
Support US check format
And provide a foundation to support additional check formats in the future (e.g. Mexico, Canada, Europe)

Checks in US format for OpenERP are available at http://www.open-supplies.com at an affordable price. HaA new check writing module called account_check_writing is now available as part of lp:openerp-usa. It is designed to support both pre-printed checks and blank (no preprinted check number) check stock.

This new module also has a 17-20 page set of documentation and a sample printed check.

There is more information posted at http://www.novapointgroup.com/blog.

It will also be posted to extras shortly.

This works in v6 leveraging the account_voucher module.
Journals are specifically setup to support Check Printing.

Here is a summary list of capabilities:
OpenERP provides easy-to-use check writing capabilities starting with version 6. Users can manage their check writing
process by installing the account_check_writing module. The module provides users a variety of check writing capabilities:

Ability to make supplier payments with checks
◦ Support paying a single and multiple outstanding supplier invoices with one check
Support printing checks in three formats: Top voucher check, middle voucher check, and bottom voucher check,
Support both pre-printed check (check # already printed), and blank check stock
Printing an individual check
Printing multiple checks in batch (printing multiple checks at one time)
Reprinting checks
Voiding checks
Tracking Stop Payment assignment on checks
Printing replacement checks
Manage errors that can occur during check printing
Tracking check status
Support US check format
And provide a foundation to support additional check formats in the future (e.g. Mexico, Canada, Europe)

Checks in US format for OpenERP are available at http://www.open-supplies.com

_________________
ChiefPenguin
NovaPoint Group LLC
www.novapointgroup.com
OpenERP Services & Consulting


Top
 Profile  
 
 Post subject: Re:
PostPosted: Wed May 18, 2011 1:36 am 
Offline

Joined: Thu Mar 31, 2011 4:35 am
Posts: 118
cradford wrote:
If Tiny is going to be used in the US (and I'm determined to make that happen), it will need well developed check writing capabilities. I'm willing to do some work in this area. Do you have an outline of what you need as far as check printing is concerned?

My thoughts are as follows:

1. Cash requirements report. Check date and next check date as parameters. List all payables that would be overdue (based on due date or terms date) if not paid until the next check run.

2. Extract for payment. Create editable list of checks to be written. Print list. Edit list to add/change/delete as necessary.

3. Print checks. Enter starting number and assign sequentially. Allow reprint starting from a used number and assigning new numbers. Print separate 'remittance advice' for suppliers that have more invoices being paid than will fit on a standard check stub.

4. Post checks. Update supplier invoices as paid and record checks in cash journal.

Doesn't sound too hard, does it?


where can I find Remittance to print for each supplier?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP