home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / b / b410 / 1.ddi / DATA / XL.LIB / INVOICE.XLM (.txt) next >
Encoding:
Excel Spreadsheet  |  1992-03-03  |  15.2 KB  |  147 lines

  1. Sheet: 
  2. (0, 0)        InvoiceProgram
  3. (0, 1)        This program will allow the user to enter an invoice,
  4. (0, 2)        Names of variables
  5. (0, 3)        Variables
  6. (0, 4)        Subroutines
  7. (0, 5)        subroutine notes and info
  8. (0, 6)        subroutine info
  9. (0, 7)        subroutine info
  10. (0, 9)        Custom Menu
  11. (1, 1)        print it, and post it to Bookkeeping By Design.
  12. (2, 1)        hide this macro
  13. (2, 2)        InvoiceName
  14. (2, 3)        INVOICE.XLS
  15. (2, 4)        GetCompanyInfo
  16. (2, 5)        This routine gets the company name and address in one read.   Note that E5-H5 must be kept available for this information.  Copies info onto invoice when done.
  17. (2, 9)        &Invoice
  18. (3, 1)        open up special invoice spreadsheet, made particularly to
  19. (3, 2)        CompanyName
  20. (3, 3)        BCS
  21. (3, 9)        &Print
  22. (3, 10)        'INVOICE.XLM'!PrintInvoice
  23. (3, 12)        Prints invoice as shown
  24. (4, 1)           work with this macro.
  25. (4, 2)        MacroName
  26. (4, 3)        INVOICE.XLM
  27. (4, 9)        &P&ost
  28. (4, 10)        'INVOICE.XLM'!PostInvoice
  29. (4, 12)        Posts invoice as a Sales Journal Entry into PeachW
  30. (5, 1)        Unprotect the invoice so that we can change it at will.
  31. (5, 2)        SalesTaxID
  32. (5, 3)        2350
  33. (5, 5)        switch to this sheet
  34. (5, 9)        New &Customer...
  35. (5, 10)        'INVOICE.XLM'!NewCustomer
  36. (5, 12)        Enter new Customer ID
  37. (6, 2)        FreightID
  38. (6, 3)        5810
  39. (6, 5)        copy info to clipboard
  40. (6, 9)        &Clear
  41. (6, 10)        'INVOICE.XLM'!ClearInvoice
  42. (6, 12)        Clear to blank invoice (except Customer ID and Date)
  43. (7, 1)        This "tricks" Excel into opening PeachW for us.
  44. (7, 2)        InvoiceNumber
  45. (7, 9)        E&xit
  46. (7, 10)        'INVOICE.XLM'!ExitInvoice
  47. (7, 12)        Return to normal Excel operations
  48. (8, 1)        This clears the cell again, as we really don't want the answer.
  49. (8, 2)        InvoiceDate
  50. (8, 3)        33379
  51. (8, 5)        return to invoice sheet
  52. (9, 1)        If CompanyName is blank, it will ASK for the company name.
  53. (9, 2)        SaleAmount
  54. (9, 3)        160
  55. (9, 5)        and paste in, transposing row to column
  56. (10, 1)        Get company name and address onto invoice.
  57. (10, 2)        SalesTaxAmount
  58. (10, 3)        11.20
  59. (11, 1)        Set today's date as the invoice date
  60. (11, 2)        FreightAmount
  61. (12, 1)        Today's date
  62. (13, 1)        User enters customer key and we put name & addr on invoice
  63. (14, 1)        Old menu bar is saved here
  64. (14, 4)        GetCustomerInfo
  65. (14, 5)        This subroutine asks the user for a customer code, then looks up the customer to see if it is legal.  If not, it re-asks.  If so, it gets the name and address and other info and then transfers it to the invoice.
  66. (15, 1)        create new blank menu bar
  67. (16, 1)        Add new menu to new menu bar
  68. (17, 1)        32603
  69. (17, 5)        If OK, Goto ---\
  70. (18, 1)        Make sure user cannot change parts of invoice he shouldn't
  71. (18, 5)        <----------------  |  ----------------<--------------------------------\
  72. (19, 5)                                  |                                                                      |
  73. (20, 4)        CustomerOK
  74. (20, 5)        <-----------------/                                                                       |
  75. (21, 5)                                                                                                         ^
  76. (22, 5)        Look up the customer ID                                                  |
  77. (23, 5)        IF not a legal customer, Goto --------------->-------------/
  78. (26, 5)        Now, transfer the customer info onto the invoice.
  79. (34, 4)        ExitInvoice
  80. (34, 5)        Terminate the invoice macro.  return to normal operation.
  81. (36, 5)        restore original menu bar
  82. (37, 5)        Remove new menu
  83. (38, 5)        close the link to Bookkeeping by Design
  84. (39, 5)        close the invoice spreadsheet
  85. (40, 5)        re-activate this macro sheet.
  86. (41, 5)        and show it
  87. (42, 5)        move to upper-left corner of macro sheet
  88. (43, 5)        and halt
  89. (48, 4)        NewCustomer
  90. (50, 5)        so we can again make entries to it
  91. (51, 5)        select and clear old customer name and address
  92. (53, 5)        get the customer information and put into invoice
  93. (54, 5)        re-protect from user.
  94. (59, 4)        PrintInvoice
  95. (59, 5)        Print out the current invoice
  96. (61, 5)        otherwise, it prints lines under unprotected cells
  97. (63, 5)        re-protect from user.
  98. (69, 4)        PostInvoice
  99. (69, 5)        Post the current invoice to PeachW
  100. (71, 5)        First, we must transfer data from the Invoice to the macro
  101. (77, 5)        Invoice date
  102. (82, 5)        Sales amount (invoice sub-total)
  103. (88, 5)        Sales Tax Amount
  104. (94, 5)        Freight amount
  105. (99, 6)        PostingInfo ---v
  106. (99, 7)        below is the row of cells that will be poked into PeachW.
  107. (100, 5)        Now, move the info in the correct from to the Posting info block.
  108. (100, 6)        "5-21-91"
  109. (100, 8)        A001
  110. (100, 9)        3000
  111. (100, 10)        -160
  112. (100, 13)        310
  113. (100, 14)        -11.20
  114. (100, 17)        530
  115. (100, 18)        0
  116. (101, 6)        Invoice Date
  117. (101, 7)        Invoice Number
  118. (101, 8)        Customer ID
  119. (101, 9)        Sales Distribution
  120. (101, 10)        >--------^
  121. (101, 11)        >--------^
  122. (101, 12)        >--------^
  123. (101, 13)        Sales Tax  Distribution
  124. (101, 14)        >--------^
  125. (101, 15)        >--------^
  126. (101, 16)        >--------^
  127. (101, 17)        Freight Distribution
  128. (101, 18)        >--------^
  129. (101, 19)        >--------^
  130. (101, 20)        >--------^
  131. (102, 5)        put date into string form
  132. (103, 5)        move left one
  133. (104, 5)        only put invoice number in if there is one
  134. (110, 5)        positive sales amounts are credits, so we make them minus
  135. (111, 5)        skip item# and qty fields, as they are not needed
  136. (119, 5)        This command actually sends the information to PeachW.
  137. (120, 5)        re-activate the invoice sheet
  138. (121, 5)        if poke worked, clear the invoice
  139. (129, 4)        ClearInvoice
  140. (129, 5)        Clear all user-changable fields on the invoice
  141. (131, 5)        must unprotect document to use the CLEAR command
  142. (132, 5)        Invoice number
  143. (134, 5)        invoice detail area
  144. (136, 5)        invoice comment area
  145. (140, 5)        freight charge
  146. (143, 5)        re-protect from user.
  147.