Set custom issue, delivery and due dates

Dates on invoices are more than just formalities—they are key to clear financial communication. The issue date, delivery date, and due date ensure all parties know when an order was made, delivered, and when payment is expected.

The following dates are available on invoices created by Sufio:

  • Issue date: By default, Sufio sets the issue date to the date when the order in your Shopify store was created.
  • Delivery date: By default, the delivery date is not displayed on invoices. The default value is the same as the invoice issue date.
  • Due date: By default, Sufio sets the due date to the date when the order in your Shopify is due, based on the payment terms of the order.

To hide or show the dates on your documents, in your Sufio account, go to the Design → Dates page and turn the toggles next to the three Date options on or off.

Payment terms in Shopify

With the introduction of Shopify payment terms, you can create various payment schedules for your customers, such as net 30, net 60, or even custom terms for B2B transactions, where larger orders and extended payment periods are common.

Shopify Plus users can set default payment terms for each company or company location of their B2B customers. This means that orders automatically follow the designated payment schedule.

Alternatively, you can assign payment terms manually when creating draft orders in Shopify.

Sufio integrates seamlessly with Shopify payment terms. Once you’ve set up your preferred payment terms, the due date will automatically appear on invoices created for orders in Sufio.

By default, Sufio uses the payment terms to determine the invoice due date. For example, if you created an order on November 11th, 2024, using the net 30 payment terms, the invoice due date will be set for December 11th, 2024.

You can also choose to display the name of the applied payment terms directly on your documents for added clarity. This can be done by customizing the template code and adding the order.payment_terms.payment_terms_name property to your Payments section.

Set custom dates manually

Sufio allows you to set custom issue date, delivery date, and due date on your invoices.

You can do so by adding unique cart attributes to your Shopify store. To add one or more of the following cart attributes to your cart page:

  1. In your Shopify admin, go to the Online Store → Themes page.
  2. Click the Actions (three dots icon) button, then click Edit code.
  3. Select cart.liquid in the left sidebar. You might use the upper search bar for a faster search.
  4. Insert one or more code snippets displayed below before the </form> tag.

Note

The code snippet may need to be added to a different file than cart.liquid, depending on the theme you use. Often, the file is named main-cart-footer.liquid.

If your store uses cart drawer (also called ajax cart), in most cases, the right file is ajax-cart-template.liquid file.

Issue date

If you want to set the issue date to a custom date, you can do so by adding a cart attribute Invoice Issue Date to the cart page. The date should be in the format YYYY-MM-DD.

For example, this cart attribute sets invoice issue date to April 24, 2024:

<input type="hidden" name="attributes[Invoice Issue Date]" id="invoice-issue-date" value="2024-04-24" />

Delivery date

If you want to set the delivery date to a custom date, you can do so by adding a cart attribute Invoice Delivery Date to the cart page. The date should be in the format YYYY-MM-DD.

For example, this cart attribute sets invoice delivery date to May 15, 2024:

<input type="hidden" name="attributes[Invoice Delivery Date]" id="invoice-delivery-date" value="2024-05-15" />

You can also set the delivery date to a custom number of days from the day an order has been created.

In the example below, the delivery date is set to 7 days from the day an order has been created.

<!-- Shopify cart page -- set custom invoice delivery date to 7 days (604800 seconds) from order creation date. Used by Sufio for Shopify (sufio.com/shopify). -->
<input type="hidden" name="attributes[Invoice Delivery Date]" id="invoice-delivery-date" value="{{ 'now' | date: "%s" | plus: 604800 | date: "%Y-%m-%d" }}" />

Due date

You can set a default due date for newly created invoices in your Sufio account in the Settings → Invoice Settings page, by adding a number in the Due in … days field.

If you want to set the due date for some orders to a custom date, you can do so by adding a cart attribute Invoice Due Date to the cart page. The date should be in the format YYYY-MM-DD.

For example, this cart attribute sets invoice due date to November 13, 2024:

<input type="hidden" name="attributes[Invoice Due Date]" id="invoice-due-date" value="2024-11-13" />

You can also set the due date to a custom number of days from the day an order has been created.

In the example below, the due date for customers tagged in Shopify as VIP is set to 30 days from the day an order has been created.

<!-- Shopify cart page -- set custom invoice due date to 30 days (2592000 seconds) from order creation date for certain customers. Used by Sufio for Shopify (sufio.com/shopify). -->
{% if customer.tags contains 'VIP' %}
  <input type="hidden" name="attributes[Invoice Due Date]" id="invoice-due-date" value="{{ 'now' | date: "%s" | plus:2592000| date: "%Y-%m-%d" }}" />
{% endif %}

Need help?

Do you need help with customizing your Shopify store theme? Please contact our experienced support team. We'll be happy to assist!