• Hello!

    Within the [wcj_order_items_table] the partial refunds of orders are not considered, it only shows the original quantity, not the actual one if a partial refund has been made. Could you help with this?

    Kind regards,
    Annaika

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @annaika,

    Yes, you are correct, [wcj_order_items_table] shortcode doesn’t include refunds. As we had numerous requests to fix this – we’ve already did it in our development version. If you wish to check it out, the development version here – https://booster.io/dev/.

    First of all we’ve added new [wcj_order_refunds_table] shortcode. We are still developing it, so if you have any feedback – please let us know:

    [wcj_order_refunds_table
        table_class="pdf_invoice_items_table"
        price_prefix="-"
        columns="refund_number|refund_title|refund_reason|refund_items|refund_amount"
        columns_titles="#|Title|Reason|Items|Amount"
        columns_styles="width:10%;|width:25%;|width:25%;|width:25%;|width:15%;text-align:right;"]

    We’ve also added new “create on” triggers (to the “WooCommerce > Settings > Booster > PDF Invoicing & Packing Slips > General”), so documents could be created automatically on partial refunds. New triggers are:
    “Create on Order Partially Refunded” and
    “Create on Order Status Refunded and/or Order Partially Refunded”.

    And there are a couple more refunds related shortcodes, that can be used in your documents:

    [wcj_order_total_refunded]
    [wcj_order_total_tax_refunded]
    [wcj_order_total_shipping_refunded]
    [wcj_order_remaining_refund_amount]

    As mentioned, any feedback is highly appreciated.

    Best regards,
    Tom

    Thread Starter annaika

    (@annaika)

    Hello @algoritmika

    thanks for your quick reply!
    This does not really solve my problem.
    The item_quantity of wcj_order_items_table still shows the amount before the refund. Is it possible to create a “item_quantity_after_refund” or something like that for the wcj_order_items_table?

    Thanks a lot!
    Annaika

    Hi @annaika,

    Ok, please redownload the dev version (https://booster.io/dev/), I’ve just added 3 new columns to the [wcj_order_items_table] shortcode:

    • item_quantity_refunded
    • item_quantity_excl_refunded
    • item_total_refunded

    Please let me know if that helped.

    P.S. If you like Booster, please leave us a rating.

    Best regards,
    Tom

    Hi Tom,

    I need two more short codes.
    1) New Sub Total after refund (no tax)
    2) New Tax total (after refund)

    Also, is there a way to turn off the table to not appear on pdf when there is No partial refunds?

    Also if the order is long, lots of products etc. The refund table got split onto the 2nd page and is hard to read. Is there a way to make sure that if limited space for entire table, that it goes onto 2nd page only.

    Thanks you!

    Ross

    • This reply was modified 7 years, 6 months ago by wekekaha. Reason: add more information

    Hi @wekekaha,

    I’ve made some changes to the plugin. Please download the development version here – https://booster.io/dev/. You will need to uninstall the old plugin version first (don’t worry your saved settings won’t disappear).

    1. I’ve added [wcj_order_total_tax_after_refund] shortcode.

    2. I’ve added [wcj_order_total_after_refund] shortcode. This shortcode has excl_tax attribute, so if you want to display it without taxes:

    [wcj_order_total_after_refund excl_tax="yes" before="Total after refund: "]

    3. Regarding “… is there a way to turn off the table to not appear on pdf when there is No partial refunds…” – for [wcj_order_items_table] shortcode it’s done since v3.1.0. For [wcj_order_refunds_table] should be working from the start. Please let me know if it’s still not working for you.

    4. Regarding “… is there a way to make sure that if limited space for entire table, that it goes onto 2nd page only…” – for [wcj_order_items_table] shortcode this option was available earlier, and for [wcj_order_refunds_table] – I’ve just added it to the dev version. There is insert_page_break attribute, which helps splitting long tables. It defines where to put page break. For example, you can define that pagebreak is set after each 20 table rows (i.e. items):

    [wcj_order_refunds_table table_class="pdf_invoice_items_table"
    	insert_page_break="20"
    	columns="refund_number|refund_title|refund_reason|refund_amount"
    	columns_titles="#|Title|Reason|Amount"
    	columns_styles="width:5%;|width:50%;|width:20%;|width:25%;text-align:right;"]

    Also you can define, that pagebreak should be set after first 10 items, then after each 20 items:

    [wcj_order_refunds_table table_class="pdf_invoice_items_table"
    	insert_page_break="10|20"
    	columns="refund_number|refund_title|refund_reason|refund_amount"
    	columns_titles="#|Title|Reason|Amount"
    	columns_styles="width:5%;|width:50%;|width:20%;|width:25%;text-align:right;"]

    Also you can add [wcj_tcpdf_pagebreak] shortcode (https://booster.io/shortcodes/wcj_tcpdf_pagebreak/) to the template – for example you can put it right before the [wcj_order_refunds_table] shortcode, so table always starts on new page.

    Please let me know if it’s working correctly of if you have any questions.

    Best regards,
    Tom

    • This reply was modified 7 years, 6 months ago by Algoritmika.

    Hi Tom,

    Thank you.

    1)yes, the refund table is not appearing when there are no refunds.

    2) I installed the new dev version and tried editing inv template this morning. I would like to have the New Total after refund included in the refunds table. So customer knows what to pay. I tried a couple of different ways but could not get it to work.

    <p>[wcj_order_refunds_table
        table_class="pdf_invoice_items_table"
        price_prefix="-"
        columns="refund_number|refund_title|refund_reason|refund_amount|remaining_refund_amount"
        columns_titles="#|Title|Reason|Amount|New Total After Refund"
        columns_styles="width:10%;|width:25%;|width:25%;|width:25%;|width:15%;text-align:left;"]</p>

    Hi @wekekaha,

    1. Regarding “…refund table is not appearing when there are no refunds …” – so is it ok now, or I misunderstood you and you want the opposite result? That is show table even if there are no items in it?

    2. remaining_refund_amount can’t be used as column in [wcj_order_refunds_table] shortcode (you can see full columns list here). Instead you need to use it as [wcj_order_remaining_refund_amount] shortcode. That is something like this:

    
    [wcj_order_refunds_table
        table_class="pdf_invoice_items_table"
        price_prefix="-"
        columns="refund_number|refund_title|refund_reason|refund_amount"
        columns_titles="#|Title|Reason|Amount"
        columns_styles="width:10%;|width:50%;|width:25%;|width:15%;text-align:left;"]
    <table class="pdf_invoice_totals_table">
    <tbody>
    	<tr><th>Remaining refund amount</th><td>[wcj_order_remaining_refund_amount]</td></tr>
    </tbody>
    </table>
    

    3. Since Booster version 3.1.0 there is one more way to display refunded items – you can use [wcj_order_items_table] shortcode with refunded_items_table attribute set to yes, something like this:

    
    [wcj_order_items_table
        table_class="pdf_invoice_items_table"
        price_prefix="-"
        refunded_items_table="yes"
        columns="item_number|item_name|item_quantity|line_total_tax_excl"
        columns_titles="#|Product|Qty|Total"
        columns_styles="width:5%;|width:75%;|width:5%;|width:15%;text-align:right;"]
    

    Please let me know if you have any questions.

    Best regards,
    Tom

    Hi Tom,

    1) Sorry for my bad spelling. Yes it is working correctly as you have described above.

    1b) I have noticed something new today, the “shipping fee” is not being displayed on its own row in the table. Its being added to the sub total behind the scenes but it should be itemized in the table for the customer to view.

    Thanks,

    Ross

    Hi Tom,

    I checked a invoice for a order with no refunds and this is showing, single row table by itself. I used the above code you supplied above.
    “Remaining refund amount 38.0” same total as the actual total.

    2) also the page break is not working “# Title Reason Amount” titles where all right at the botton of the first page and the refund info on the top of the second page. I haven’t added anything, but I got the feeling that it was already supposed to add one.

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[wcj_order_items_table] – Refunds not considered’ is closed to new replies.