Configuration

Automatically Create Invoice Based on Order

  • If the customer always wants to create invoices from orders directly, set both the default value and readonly properties of the field order.create_invoice_from_order to True in LISA.
  • If the customer never wants to create invoices from orders, set the default value property of the field order.create_invoice_from_order to False in LISA and the readonly property to True.
  • If the customer wants to decide manually per order in Lime before it is sent over to the ERP system; set the readonly property of the field order.create_invoice_from_order to False in LISA, and set the default value property to the option that is best suited for the customer as the standard option.

Web Client

Order Guide

Use Lime Admin to configure the Runtime Config. Each config parameter is described in and validated by Lime Admin.

Below you can find an examaple config, that can be used as a starting point.

{
  "order": {
    "order_limetype": "order",
    "order_generate_order_from_deal": false,
    "order_prevent_default_from_limetypes": [
      "company",
      "deal"
    ],
    "order_open_after_creation": false,
    "default_currency": "SEK",
    "order_status_after_ready": "notready"
  },
  "orderdetails": [
    {
      "order_field": "customer_reference"
    },
    {
      "order_field": "currency"
    },
    {
      "order_field": "coworker"
    }
  ],
  "article": {
    "article_limetype": "article",
    "article_active_property": "active"
  },
  "articlerow": {
    "articlerow_fields": [
      {
        "articlerow_property": "description",
        "articlerow_isreadonly": false,
        "articlerow_inherit_value": "description"
      },
      {
        "articlerow_property": "quantity",
        "articlerow_isreadonly": false,
        "articlerow_inherit_value": "",
        "articlerow_showinsummary": true
      },
      {
        "articlerow_property": "unit",
        "articlerow_inherit_value": "unit",
        "articlerow_isreadonly": true,
        "articlerow_showinsummary": true
      },
      {
        "articlerow_property": "price_per_unit",
        "articlerow_inherit_value": "price",
        "articlerow_isreadonly": false,
        "articlerow_showinsummary": true
      },
      {
        "articlerow_property": "discount",
        "articlerow_isreadonly": false,
        "articlerow_showinsummary": true
      }
    ],
    "articlerow_limetype": "orderrow",
    "articlerow_article_property": "article",
    "articlerow_quantity_property": "quantity",
    "articlerow_price_property": "price_per_unit",
    "articlerow_discount_property": "discount",
    "articlerow_totalprice_property": "totalvalue"
  },
  "translations": {
    "custom_translations": {}
  }
}

Icon and Color

Under Miscellaneous -> Limetype Extensions, add (or update) to the following:

  "order": {
    "icon": "purchase_order",
    "color": "lime-green",
    "create": false
  },
  "orderrow": {
    "icon": "grid_3",
    "color": "lime-green",
    "create": false
  },
  "article": {
    "icon": "package",
    "color": "lime-dark-grey",
    "create": true
  },
  "articlegroup": {
    "icon": "tree_structure",
    "color": "lime-dark-grey",
    "create": true
  },
  "dealarticle": {
    "icon": "price_tag",
    "color": "lime-dark-grey",
    "create": false
  }

View Configuration

The following needs to be added to the views in the Web Client.

Existing Tables

On the following existing tables you must add the new relations in the Card view:

  • Deal: Add dealarticle and order.
  • Company: Add order.
  • Invoice: Add order.

Order

Card
{
  "header": [
    {
      "property": "order_number"
    },
    {
      "property": "orderstatus"
    }
  ],
  "sections": [
    {
      "title": null,
      "controls": [
        {
          "property": "order_number",
          "readonly": true
        },
        {
          "property": "invoice",
          "readonly": true
        },
        {
          "property": "company"
        },
        {
          "property": "deal"
        },
        {
          "property": "orderstatus"
        },
        {
          "property": "customer_reference"
        },
        {
          "property": "coworker"
        },
        {
          "property": "order_date",
          "format": "date"
        },
        {
          "property": "currency"
        },
        {
          "property": "create_invoice_from_order"
        }
      ]
    },
    {
      "title": "Value",
      "controls": [
        {
          "property": "order_sum",
          "readonly": true
        },
        {
          "property": "order_vat",
          "readonly": true
        },
        {
          "property": "order_total_sum",
          "readonly": true
        }
      ]
    },
    {
      "title": "Integration",
      "controls": [
        {
          "property": "error_message",
          "readonly": true
        }
      ]
    }
  ],
  "relations": [
    {
      "property": "orderrow"
    }
  ]
}
List
{
  "header": [
    {
      "property": "order_number"
    },
    {
      "property": "orderstatus"
    }
  ],
  "subheader": [
    {
      "property": "order_date"
    },
    {
      "property": "company"
    },
    {
      "property": "deal"
    }
  ]
}
{
  "header": [
    {
      "property": "order_number"
    },
    {
      "property": "orderstatus"
    }
  ],
  "subheader": [
    {
      "property": "order_date"
    },
    {
      "property": "company"
    },
    {
      "property": "deal"
    }
  ]
}
Table
{
  "columns": [
    {
      "property": "order_number",
      "isDefault": true
    },
    {
      "property": "orderstatus",
      "isDefault": true
    },
    {
      "property": "order_date",
      "isDefault": true
    },
    {
      "property": "company",
      "isDefault": true
    },
    {
      "property": "customerid",
      "isDefault": false
    },
    {
      "property": "deal",
      "isDefault": true
    },
    {
      "property": "invoice",
      "isDefault": true
    },
    {
      "property": "invoice_number",
      "isDefault": false
    },
    {
      "property": "erp_db",
      "isDefault": false
    },
    {
      "property": "customer_reference",
      "isDefault": true
    },
    {
      "property": "coworker",
      "isDefault": true
    },
    {
      "property": "order_sum",
      "isDefault": true
    },
    {
      "property": "order_vat",
      "isDefault": true
    },
    {
      "property": "order_total_sum",
      "isDefault": false
    },
    {
      "property": "currency",
      "isDefault": true
    },
    {
      "property": "error_message",
      "isDefault": false
    },
    {
      "property": "id",
      "isDefault": false
    },
    {
      "property": "createdtime",
      "isDefault": false
    },
    {
      "property": "timestamp",
      "isDefault": false
    }
  ],
  "enabled": true
}

Order Row

Card
{
  "header": [
    {
      "property": "item"
    },
    {
      "property": "description"
    }
  ],
  "sections": [
    {
      "title": null,
      "controls": [
        {
          "property": "order"
        },
        {
          "property": "row_id",
          "readonly": true
        },
        {
          "property": "articlegroup"
        },
        {
          "property": "article",
          "globalSearch": true,
          "query": {
            "limetype": "article",
            "filter": {
              "op": "AND",
              "exp": [
                {
                  "key": "active",
                  "op": "=",
                  "exp": true
                },
                {
                  "key": "articlegroup",
                  "op": "=",
                  "exp": "%activeObject%.articlegroup"
                }
              ]
            }
          }
        },
        {
          "property": "item",
          "readonly": true
        },
        {
          "property": "quantity"
        },
        {
          "property": "unit"
        },
        {
          "property": "vat",
          "readonly": true
        },
        {
          "property": "price_per_unit"
        },
        {
          "property": "discount"
        },
        {
          "property": "totalvalue",
          "readonly": true
        }
      ]
    },
    {
      "title": "Miscellaneous",
      "controls": [
        {
          "property": "vataccount"
        },
        {
          "property": "incomeaccount"
        }
      ]
    }
  ],
  "relations": []
}
List
{
  "header": [
    {
      "property": "item"
    },
    {
      "property": "description"
    }
  ],
  "subheader": [
    {
      "property": "quantity"
    },
    {
      "property": "unit"
    },
    {
      "property": "totalvalue"
    }
  ]
}
Search
{
  "header": [
    {
      "property": "item"
    },
    {
      "property": "description"
    }
  ],
  "subheader": [
    {
      "property": "quantity"
    },
    {
      "property": "unit"
    },
    {
      "property": "totalvalue"
    }
  ]
}
Table
{
  "columns": [
    {
      "property": "row_id",
      "isDefault": false
    },
    {
      "property": "item",
      "isDefault": true
    },
    {
      "property": "description",
      "isDefault": true
    },
    {
      "property": "quantity",
      "isDefault": true
    },
    {
      "property": "unit",
      "isDefault": true
    },
    {
      "property": "vat",
      "isDefault": true
    },
    {
      "property": "price_per_unit",
      "isDefault": true
    },
    {
      "property": "discount",
      "isDefault": true
    },
    {
      "property": "totalvalue",
      "isDefault": true
    },
    {
      "property": "vataccount",
      "isDefault": false
    },
    {
      "property": "incomeaccount",
      "isDefault": false
    },
    {
      "property": "id",
      "isDefault": false
    },
    {
      "property": "createdtime",
      "isDefault": false
    },
    {
      "property": "timestamp",
      "isDefault": false
    }
  ],
  "enabled": true
}

Deal Article

Card
{
  "header": [
    {
      "property": "article"
    }
  ],
  "sections": [
    {
      "title": null,
      "controls": [
        {
          "property": "deal"
        },
        {
          "property": "articlegroup"
        },
        {
          "property": "article",
          "globalSearch": true,
          "query": {
            "limetype": "article",
            "filter": {
              "op": "AND",
              "exp": [
                {
                  "key": "active",
                  "op": "=",
                  "exp": true
                },
                {
                  "key": "articlegroup",
                  "op": "=",
                  "exp": "%activeObject%.articlegroup"
                }
              ]
            }
          }
        },
        {
          "property": "quantity"
        },
        {
          "property": "unit",
          "readonly": true
        },
        {
          "property": "price_per_unit",
          "readonly": true
        },
        {
          "property": "discount"
        },
        {
          "property": "totalvalue",
          "readonly": true
        }
      ]
    }
  ],
  "relations": []
}
List
{
  "header": [
    {
      "property": "article"
    }
  ],
  "subheader": [
    {
      "property": "articlegroup"
    },
    {
      "property": "quantity"
    },
    {
      "property": "unit"
    },
    {
      "property": "totalvalue"
    }
  ]
}
Search
{
  "header": [
    {
      "property": "article"
    }
  ],
  "subheader": [
    {
      "property": "articlegroup"
    },
    {
      "property": "quantity"
    },
    {
      "property": "unit"
    },
    {
      "property": "totalvalue"
    }
  ]
}
Table
{
  "columns": [
    {
      "property": "deal",
      "isDefault": true
    },
    {
      "property": "quantity",
      "isDefault": true
    },
    {
      "property": "unit",
      "isDefault": true
    },
    {
      "property": "price_per_unit",
      "isDefault": true
    },
    {
      "property": "discount",
      "isDefault": true
    },
    {
      "property": "totalvalue",
      "isDefault": true
    },
    {
      "property": "id",
      "isDefault": false
    },
    {
      "property": "createdtime",
      "isDefault": false
    },
    {
      "property": "timestamp",
      "isDefault": false
    }
  ],
  "enabled": true
}

Article Group

Card
{
  "header": [
    {
      "property": "name"
    }
  ],
  "sections": [
    {
      "title": null,
      "controls": [
        {
          "property": "name"
        }
      ]
    }
  ],
  "relations": [
    {
      "property": "article"
    },
    {
      "property": "dealarticle"
    },
    {
      "property": "orderrow"
    }
  ]
}
List
{
  "header": [
    {
      "property": "name"
    }
  ],
  "subheader": []
}
Search
{
  "header": [
    {
      "property": "name"
    }
  ],
  "subheader": []
}
Table
{
  "columns": [
    {
      "property": "name",
      "isDefault": true
    },
    {
      "property": "id",
      "isDefault": false
    },
    {
      "property": "createdtime",
      "isDefault": false
    },
    {
      "property": "timestamp",
      "isDefault": false
    }
  ],
  "enabled": true
}

Article

Card
{
  "header": [
    {
      "property": "articleno"
    },
    {
      "property": "description"
    }
  ],
  "sections": [
    {
      "title": null,
      "controls": [
        {
          "property": "articlegroup"
        },
        {
          "property": "articleno"
        },
        {
          "property": "description"
        },
        {
          "property": "price"
        },
        {
          "property": "unit"
        },
        {
          "property": "vat"
        },
        {
          "property": "active"
        },
        {
          "property": "vataccount"
        },
        {
          "property": "incomeaccount"
        }
      ]
    }
  ],
  "relations": [
    {
      "property": "orderrow"
    },
    {
      "property": "dealarticle"
    }
  ]
}
List
{
  "header": [
    {
      "property": "articleno"
    },
    {
      "property": "description"
    }
  ],
  "subheader": [
    {
      "property": "articlegroup"
    },
    {
      "property": "price"
    },
    {
      "property": "unit"
    }
  ]
}
Search
{
  "header": [
    {
      "property": "articleno"
    },
    {
      "property": "description"
    }
  ],
  "subheader": [
    {
      "property": "articlegroup"
    },
    {
      "property": "price"
    },
    {
      "property": "unit"
    }
  ]
}
Table
{
  "columns": [
    {
      "property": "articleno",
      "isDefault": true
    },
    {
      "property": "description",
      "isDefault": true
    },
    {
      "property": "price",
      "isDefault": true
    },
    {
      "property": "unit",
      "isDefault": true
    },
    {
      "property": "vat",
      "isDefault": true
    },
    {
      "property": "active",
      "isDefault": true
    },
    {
      "property": "vataccount",
      "isDefault": false
    },
    {
      "property": "incomeaccount",
      "isDefault": false
    },
    {
      "property": "id",
      "isDefault": false
    },
    {
      "property": "createdtime",
      "isDefault": false
    },
    {
      "property": "timestamp",
      "isDefault": false
    }
  ],
  "enabled": true
}

VBA Module

This configuration is only needed if orders are to be created from another Limeobject through a customization.

In the VBA module AO_ERPConnector_Order, there is a const, m_ClassName at the top of the file for setting the Limeobject that an order should be created from.

Localizations

This configuration is only needed if orders are to be created from another Limeobject through a customization.

The localizations assume that the name of the Limeobject, which orders are created from, is contract. Change this in the localizations if this is not the case.