Management of reverse logistics processes with Microsoft Dynamics NAV

Abstract Appropriate management of waste streams is a very important part of business operations as it is reflected in the reduction in the flow and use of materials. It also minimizes negative impact on the environment. The article discusses the capabilities of Microsoft Dynamics NAV in the management of reverse logistics processes. We also developed a system supporting reverse logistics as a module for Microsoft Dynamics NAV. It automatically counts waste dividing them into appropriate groups. At the time of writing there was no direct support for waste management in the Dynamics NAV system.


Introduction
Industrial production and sales are associated with generation of waste and returns. Waste management is the collection, processing, disposal of unwanted materials generated in production and consumption processes. It aims to reduce the negative impact of waste on health, environment and aesthetics. Returns management consists in minimizing the cost of doing business and maximizing satisfaction of customers and business partners. Problems associated with waste management are becoming more common for logistics processes, which contributed to the emergence of reverse logistics. Reverse logistics is significantly different from the logistics understood in the traditional way; different primarily in terms of the direction of flow of goods and their destination. Reverse logistics is often pushed into the background. However, more and more enterprises are highlighting the benefits of reverse logistics.
Initially, the term reverse logistics was used in relation to the role of logistics in the recovery, disposal and management of hazardous materials; broader view also recognizes all aspects of logistics activities carried out to reduce the consumption of resources, recovery, search for substitutes, re-using materials and recycling (STOCK J.R. 1992). Relying on the definition proposed by Szołtysek and Twaróg, reverse logistics is shaping the flows of waste and related information from the place of their origin to their place of management, involving the recovery of value (through re-use, recycling or reclaiming) or to the proper disposal or longterm storage to economizing the environment (SZOŁTYSEK J., TWARÓG S. 2017). Regardless of the used term for environmentally oriented logistics concept, it emphasizes the need to reduce the negative impact of economic activity on the environment. Objectives and tasks of reverse logistics are focused on waste, which, after appropriate processing may return to the logistics system as a valuable products or recyclable materials. The main objective is to reduce waste generation, in particular, those that end up in landfills. Increasingly, attention is being drawn to the limited capacity of the environment. The aim should be to maximize the amount of recyclable materials in production and consumption, which will reduce the amount of raw materials consumed (GRABARA J., ET AL. 2014). Owing to lengthening product life cycle, which is cost-effective and pro-environmental, reverse logistics promotes another usage of resources (GRABARA J. 2013). Moreover, the minimization of costs related to the acquisition of secondary raw materials have to be taken into account and they must be put back into the economic system. Sometimes the energy and material circulation is so large that the re-use of the product or part becomes unprofitable. Therefore, optimization of the reverse flow should include both pro-environmental goals, as well as economical. One way to control waste management is to monitor the flow of materials. It allows the detection of various irregularities in the creation and accumulation of waste.
For several years, the information revolution could be witnessed. The introduction of new information technologies and the effective use of human resources play a key role in the functioning of enterprises. One of them are ERP (Enterprise Resource Planning) systems, used for collecting, storing, managing and interpreting data from all areas of business operations with a set of subsystems integrated with each other. The data come from common sources, usually from relational database management systems (MESJASZ-LECH A. 2014). The key benefits of the ERP systems implementation is to improve the organization of the company's activities, information flow, facilitate the data entry and access, increase data security, effective management of sales and production planning, tracking and analysis of business processes and cash flows. The activities of all departments are synchronized with one another, and the data is stored in a single, integrated system. An important feature of ERP systems is the ability to flexibly adapt to the requirements and specific of companies. They may be extended with additional modules or new functions to existing modules. Therefore, the scale of the use of these systems is becoming wider.
In the context of reverse logistics it is worth to mention advantages such as easy control of inventory, monitoring purchases of materials, the ability to reduce the cost of storing inventory, production and operating costs, improve the timeliness of deliveries. In addition, the implementation of the ERP system clearly defines the division of power and responsibilities of employees. All of these factors significantly affect the profit maximization of the company. In 2014 twenty percent of companies implemented ERP or CRM systems on a regular bases (SROKA M. 2015). In 2015 the percentage of companies using ERP systems was 20.9%. Depending on the size of a business, these indicators are as follows: the highest percentage is found in large enterprises -83.2%, medium size -46.5% and in small ones -14.2% (GUS, 2017). In each of these classes there was an increased implementation of ERP systems in comparison with the previous year. However, the number of enterprises using ERP systems in Poland in comparison with other EU countries remains low.
The functions of reverse logistics are rarely implemented in computer systems. To effectively manage waste streams in the enterprise, they must be adequately controlled. One way to control waste management in the context of reverse logistics is to monitor the flow of materials. This allows the detection of various irregularities in the creation and accumulation of waste. In the absence of solutions in the field of reverse logistics, monitoring, and, thus, the management of waste streams, it is very difficult. This article is an attempt to create solutions to support reverse logistics. For this purpose, we implemented reverse logistics module to the existing ERP system to enable the monitoring of waste streams in the enterprise.
Microsoft Dynamics NAV (formerly known as Navision) is a product existing more than two decades. Microsoft Dynamics NAV has been implemented in more than 117 000 companies in over 42 countries (MICROSOFT DYNAMICS NAV, 2017). It allows to handle common ERP systems tasks. Moreover, it is customizable by authorized Microsoft partners to meet the needs of the company and the requirements of the industry. All modules of the system, associated with the different areas of business (financial management, sales and marketing, purchasing, warehouse, resource planning, manufacturing, service management, human resources, administration), use the common database, which forms the core of the system. Microsoft Dynamics NAV offers a complete service of production, but does not support all industries. It is estimated that the standard package provides about 80% of common needs of the industry, while the remaining 20% has to be developed by business application programmers. Some industries have close to 100% fit out of the box, while others require the creation of up to 80% of functionality (BRUMMEL M. 2010).
A certain functionality associated with returns and reverse logistics is already built into the Dynamics NAV system. It allows to increase customer satisfaction and optimize the flow of production sale streams by managing repairs, returns, inventory and receiving compensation. It includes the issuance of item replacement, control of returned goods, sending returns for repair, adjustment of balances, adjustment of the inventory and accounting costs associated with handling returns. Many employees of different departments may be involved in these activities. As the costs associated with returns are usually high, their optimization is important. It is supported in Dynamics NAV by quick response to return requests, flexibility to perform multiple actions at the same time, monitoring of documents related to the process of return, handling the entire flow of return, including the generation of documents. In the case of returns handled by customers, the system allows to record compensation arrangements, issue of substitute goods, price reduction, giving out repaired goods and to be repaired, answers to queries. In the case of returns to vendors, the system allows to determine the compensation issue inventory, create purchase orders relating to trade in goods.
One way to control waste management is to monitor the flow of materials. This allows to detect various irregularities in the creation and accumulation of waste. In addition, companies are obliged to monitor and report on waste in accordance with the classification (  As aforementioned, Microsoft Dynamics NAV does not support directly waste management, thus in the paper we propose in the next section a novel module for Dynamics NAV system that helps to manage waste streams and aggregates them in groups according to the regulations.

Waste Monitoring System
Dynamics NAV provides support for production with the ability to define bills of materials (BOMs), routings, to create production orders and forecasts, material requirements, subcontracting and workloads. Creating new features of Microsoft Dynamics NAV is carried out in a C/SIDE (Client/Server Integrated Development Environment) with the C/AL programming language. The most important object is BOM that defines the list of materials needed for manufacturing and materials management is done using the route. New functions are created by tables in the database, which is usually handled by Microsoft SQL Server. Next, the function code is created with the necessary forms.
While many issues related to the production are predefined in Dynamics NAV, monitoring of the waste had to be added to the system. For this purpose, a database table called "WasteTypes" was defined, containing a catalog of waste (DZ.U. 2001 NO. 112, ITEM. 1206).
In order to count the amount of waste of each type, WasteQuantity table was defined (Fig. 1) and the primary key was established.
It is a field which values cannot duplicate in a table. the primary key in the table WasteQuantity on the field Item No. and the foreign key field is WasteQuantity from the table WasteTypes were set.
Database is logically consistent set of related data (ELMASRI R., NAVATHE S. 2015). In the paper only relational databases are considered where data are stored in the form of two-dimensional relations (Tables). Records are stored in tables in any order, and are identified by one or more columns forming a unique primary key. In order to create alogical connections between tables, relationships are used.
If the records in one table have logical connections with in other tables realized by fields being their counterparts (e.g. the type of waste in the table "WasteTypes" and the type of waste in the table "WasteQuantity"), then by using primary and foreign keys create relationships between tables can be created. The primary key in the table "WasteTypes" is a foreign key in the table "WasteQuantity". Unique identification of records eliminates random errors. With relationships we can simultaneously process data from different tables. There are three types of relationships; one-to-one (each record in Table 1 can be matched to only one record in Table 2), one-to-many (a record in Table 1 can be matched to multiple records in Table 2, but a record in the Table 2 may have only one corresponding record in Table 1) and many-tomany (one record in Table 1 may have many matching records in Table 2 and vice versa). Tables "WasteTypes" and "WasteQuantity" were connected with each other by one-tomany relationship. One record from the table "WasteTypes" can have many matched records from the table "WasteQuantity" and record in the table "WasteQuantity" can have only one matched record in table "WasteTypes". When creating relationships, referential integrity is set to be observed when adding or deleting records in the tables. As a result, it is not allowed to enter other types of data than are defined for a field, or to leave blank space in the field with the primary key. (BEYNON-DAVIES P. 2000) To convert waste we defined functions in C/AL called CountWaste (Fig. 2). As a result, waste is automatically aggregated within this category. The procedure CountWaste is defined inside the Navision NAV table named WasteQuantity that stores information about waste in the company. The filter of the table for the relevant waste codes is set by using setRange function of the C/AL language. If the FindFirst function finds the record in a table of the searched type of waste, the amount of the current record is added to the variable. Loop retrieving waste at the table works until it reaches the last record in a filtered set of records. The flexibility of Microsoft Dynamics NAV is one of the main advantages of this system. Almost always there is the possibility of adding functionality to meet the demands of the enterprise. In this article, features supporting business processes of reverse logistics were added. By implementing the appropriate code and creating new tables, users can perform operations associated with production waste. The newly added functions of the system enable accurate monitoring of generated waste. These waste amounts are immediately assigned to a group, in accordance with Regulation of the Minister of the Environment, Natural Resources and Forestry, which enables rapid and efficient reporting.

Summary and conclusion
Companies are constantly looking for ways to increase profits, customer satisfaction, and gain advantage in the environment. Profit maximization requires the management of the flow of the product and the logistics of feedback from the very beginning. Waste management in medium and large enterprises is usually a very complex process consisting of personnel, storage, containers, vehicles, etc. ERP systems can provide a good basis for logistics management feedback, but achieving the maximum of their capabilities requires to design a system specifically for the given supply and production chain. Microsoft Dynamics NAV is a very efficient and flexible solution to handle every aspect of reverse logistics by adding appropriate functionality. The system is based on mutually related modules whose scope intermingle. An important element of the system is its integration with other business applications. The article describes the use of a system to manage the elements of reverse logistics and is an example of the creation of a new function counting categories of waste for the purposes of statutory reporting.
Application of the developed module that supports an area of reverse logistics provides many benefits to a company. By implementing the appropriate code, creating new tables and functions users can perform operations associated with production waste. By defining the types of waste in the manufacturing BOM, we achieve automatic identification of data concerning waste generated in the production process. Data related to waste management is updated in real time. This allows full monitoring of waste, which greatly facilitates their control. Since the presented module automatically generates the waste database, managers can perform analyses to properly manage waste produced in the enterprise. These analyses can be performed on both the current data and the historical data stored in the database. The required statutory reporting is also performed automatically, because the same system classifies waste belonging to a group defined in the Regulation of the Minister of the Environment of 9 December 2014. on waste list. This allows to save time and avoid errors in the report. To date, usually obligatory reports of waste were created by hand, which takes time and is prone to errors.