linjunpop / riif

🏦 A DSL to generate QuickBooks IIF file.
MIT License
46 stars 30 forks source link

klass throws undefined method error #35

Closed wfknowles closed 6 years ago

wfknowles commented 6 years ago
iif.trns do           
        row do
            # print "rfield = #{r_field}"           
            # print "Addcolumn = #{addcolumns}"
            trnsid      ''          #B
            trnstype    "INVOICE"
            date        first_shift_date         #Date of First Shift within selected date range   D
            accnt       "Accounts Receivable"    #E
            name        "#{@city} "," #{@state}"        #Site’s City, State Abbreviation  F
            # klass       total_billed_hours
            amount      setting_invoice_val   #Invoice Number H
            docnum      ""          #I
            memo        "N"         #J
            clear       "Y"         #K
            toprint     "N"         #L
            addr1       site.hospital_name          #Site’s Hospital Name M
            addr2       @b_street         #Billing street address N
            addr3       "#{@city}"," #{@state}"," #{@zip}"          #Site’s City, State, Zip Code   O
            addr4       ""          #P
            addr5       ""          #Q
            saddr1      ""          #R
            saddr2      ""          #S
            saddr3      ""          #T
            saddr4      ""          #U
            saddr5      ""          #V            
            duedate     first_shift_date          #Date of First Shift within selected date range W
            terms       ""          #X
            paid        ""          #Y           
            paymeth     ""          #Z
            shipdate    ""          #AA            
            rep         ""          #AB              
        end
        ab.each do |addcolumns|
            @tim = addcolumns.end.to_time - addcolumns.start.to_time
            @total = @tim/3600
            spl do
                row do
                    splid       ''          #B
                    trnstype    "INVOICE"   #C
                    date        addcolumns.start.strftime("%d-%m-%Y")          #Shift’s start date  D
                    accnt       site.quickbooks_label          #Site’s QuickBooks Label E
                    name        ""          #F
                    # klass       @total          #-(Total # of hours billed for the specific shift) G
                    amount      ''          #Invoice Number H
                    docnum      addcolumns.title.split('-')[0]          #Provider’s Name I
                    memo        "N"         #J
                    clear       ((addcolumns.end - addcolumns.start) / 1.hour)          #Total # of shift hours K
                    qnty        addcolumns.custom_bill_rate          #Shift’s Bill Rate L
                    price       addcolumns.shift_type          #Shift’s Shift Type M
                    invitem     "N"         #N
                    paymeth     addcolumns.start.strftime("%I:%M%p")          #Shifts start time O
                    taxable     addcolumns.end.strftime("%I:%M%p")          #Shifts End Time P
                    reimbexp    addcolumns.start.strftime("%d-%m-%Y")          #Shifts Start Date,Q
                    extra       site.quickbooks_class          #Site’s Quickbooks Class R                    
                end
            end
        end

    end 

Also, I'm an idiot... so feel free to let me know if this is a dumb question.

klassror 1 1

linjunpop commented 6 years ago

Just released v0.7.0. this should be fixed.

wfknowles commented 6 years ago

Thanks! I'll give it a whirl!