Invoice that prints just the payment type

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • leeds
    Mivite Lite

    • Jun 2011
    • 7

    #1

    Invoice that prints just the payment type

    Well, for a while, I have been looking for a report that will just tell me who paid by Credit Card or Purchase order by Check.

    After reading through the forums, I came across the ORDER_INVOICE (Printale Invoice) PAGE. Now, this priunts out the Payment Type but all prints out way too much info about the credit card (to actually put on an invoice would be horrible).

    So, the code that does the magic is

    <mvt:foreach iterator="field" array="order:payment:fields">
    <table><tr><th>&mvt:field:label;</th><td>&mvt:field:value;</td></tr></table>


    Questions:
    a) Is there a way to modify the above code to loop just ONE time and exit? So far, from all the testing I have done, i seems like I just need the first entry in the array.

    b) Is there another way to print just the payment type like CC, PO or Check?

    Thanks,
    Bob
  • Keitho
    Mighty Mivite

    • Mar 2006
    • 634

    #2
    Re: Invoice that prints just the payment type

    You might find some ideas in this thread:



    Good hunting!
    Keith Oratz
    PrepareSmart, LLC - Emergency Preparedness Supplies and Professional Grade Search and Rescue Gear
    www.preparesmart.com

    Comment

    • leeds
      Mivite Lite

      • Jun 2011
      • 7

      #3
      Re: Invoice that prints just the payment type

      Thanks Keith.

      Well, &mvt:order:payment:descrip works for and not &mvt:order:payment:desc.

      Now, the problem is when it is a credit card, then, it prints the name of the Gateway. It works fine for POs.

      So, to resolve this issue, I need to write an "if and else" statement like

      <mvt:if expr="&mvt:order:payment:descrip EQ 'Authorize.Net'">
      Payment Method:CC
      <mvt:else>
      <table><tr><th>Payment Method:</th><td>&mvt:order:payment:descrip;</td></tr></table>
      </mvt:if>

      looks simple - right? But, can't make it work! get syntax error!

      Bob

      Comment

      • wcw
        Developer Partner

        • Mar 2006
        • 11329

        #4
        Re: Invoice that prints just the payment type

        You cannot use &mvt inside the mvt:if conditional. Use l.settings:order:payment:descrip instead.
        Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
        Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
        Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
        Facebook http://www.facebook.com/EmporiumPlus
        Twitter http://twitter.com/emporiumplus

        Comment

        • leeds
          Mivite Lite

          • Jun 2011
          • 7

          #5
          Re: Invoice that prints just the payment type

          Actually, I figured it out,

          When you have a conditionalk statement, you can't have &mvt.....
          In this case, l.settings.:order:payment:descrip

          So, this works like a charm
          <mvt:if expr="l.settings:order:payment:descrip EQ 'Authorize.Net'">
          <table><tr><th>Payment Method:</th><td> CC</td></tr></table>
          <mvt:else>
          <table><tr><th>Payment Method:</th><td>&mvt:order:payment:descrip;</td></tr></table>
          </mvt:if>

          Comment

          • leeds
            Mivite Lite

            • Jun 2011
            • 7

            #6
            Re: Invoice that prints just the payment type

            Thanks Bill. Yes, I figured out the same thing.

            Thanks everyone!

            Bob

            Comment

            • RayYates
              Developer Partner



              • Dec 2006
              • 1517

              #7
              Re: Invoice that prints just the payment type

              If it's always the first item in the array you can use this and skip the loop.

              &mvt:order:payment:fields[1]:value;
              Ray Yates
              "If I have seen further, it is by standing on the shoulders of giants."
              --- Sir Isaac Newton

              Comment

              • alphatect
                Mivite

                • May 2008
                • 241

                #8
                Re: Invoice that prints just the payment type

                This might sound like a silly question, but how do you invoke this page?

                Comment

                • leeds
                  Mivite Lite

                  • Jun 2011
                  • 7

                  #9
                  Re: Invoice that prints just the payment type

                  Thanks Ray! It worked as well to use the first array element!

                  Really appreciate the help.

                  Now, to answer alphatect:

                  You can invoke this page, when you go to Manage Orders, select few orders (by click on check box) and then click on Batch report (and select printable invoice and click run report)

                  So, now, you have invoices for al the orders you selected. Really cool!


                  the problem, I was facing was, it was printing out too much data about the payment type. Now, with the different 2 solutions above, I just print "CC" or PO or check payment.

                  Makes my life really simple in 2 ways - get quick invoices and ca quikly see who made payment by what mode.

                  Comment

                  • alphatect
                    Mivite

                    • May 2008
                    • 241

                    #10
                    Re: Invoice that prints just the payment type

                    Originally posted by leeds View Post
                    You can invoke this page, when you go to Manage Orders, select few orders (by click on check box) and then click on Batch report (and select printable invoice and click run report)
                    So, now, you have invoices for al the orders you selected. Really cool!
                    Thanks leeds. That must be a PR8 feature. I'm still on PR7, where the options are: Create Batch, Create Shipment, Back Order, Archive, and New Order. Oh well.

                    Comment

                    Working...
                    X