Difference between revisions of "Main Page"

From BlisWiki
Jump to navigation Jump to search
 
(15 intermediate revisions by the same user not shown)
Line 16: Line 16:
 
; The following processes take place
 
; The following processes take place
 
Connect to the API and save the XML file, if there are errors stop the processing.  
 
Connect to the API and save the XML file, if there are errors stop the processing.  
 +
 
Set the importing flag and start reading the local saved XML file.  
 
Set the importing flag and start reading the local saved XML file.  
 +
 
Find the Customer's default warehouse.  
 
Find the Customer's default warehouse.  
 +
 
Check if order exists:
 
Check if order exists:
; Yes:
+
; Yes: Delete the order items and update the header.  
Delete the order items and update the header.  
+
; No: Create the new order and set the status to 0 (import).
; No:
+
 
Create the new order and set the status to 1 (new)
 
 
Get the costs and calculate item costs
 
Get the costs and calculate item costs
Insert order items
+
 
Update the Order header
+
Insert the order items.
 +
 
 +
Update the Order header.
 +
 
 
Flag Exceptions
 
Flag Exceptions
-- TEST --
+
 
 +
- Set the order status to 1 where all the warehouses are NW or BW and the status is 0 (imported)
 +
 
 +
- Set the order status to 1 where the status is 0 and the total cost > own cost
 +
 
 +
Auto release orders
 +
 
 +
- Send WHConfirm for all the orders left on status 0
 +
 
 +
Flag Complete
 +
 
 +
- Set the status for all the auto released orders (status is 0) to 2
 +
 
 +
=== Customer Master Import ===
 +
Imports the Customer information
 +
 
 +
:* <strong>Script:</strong> crons/import_xml_cust.php
 +
:* <strong>API:</strong> BlisCustomerMaster
 +
:* <strong>Runtime:</strong> 1,4,7,10,13,16,19,22 hours, 00 minutes
 +
 
 +
; The following processes take place
 +
Connect to the API and save the XML file, if there are errors stop the processing.
 +
 
 +
If the customer exists we update the details else we create a new record.
 +
 
 +
=== Item Master Import ===
 +
Imports the Stock item list
 +
 
 +
:* <strong>Script:</strong> crons/import_xml_prod.php
 +
:* <strong>API:</strong> BlisItemMaster
 +
:* <strong>Runtime:</strong> 0,3,6,9,12,15,18,21 hours, 30 minutes
 +
 
 +
; The following processes take place
 +
Connect to the API and save the XML file, if there are errors stop the processing.
 +
 
 +
If the customer exists we update the details else we create a new record.
 +
 
 +
=== Schedule Import ===
 +
Imports the schedule
 +
 
 +
:* <strong>Script:</strong> crons/import_xml_schedule.php
 +
:* <strong>API:</strong> BlisSalesOrder
 +
:* <strong>Runtime:</strong> 3,8,13,18,23,28,33,38,43,48,53,58 minutes
 +
 
 +
; The following processes take place
 +
Connect to the API and save the XML file, if there are errors stop the processing.
 +
 
 +
Set the importing flag and start reading the local saved XML file.
 +
 
 +
Set the delete flag for all current records to 1.
 +
 
 +
If the order exists we delete the order items and update the order header and we set the delete flag to 0, else we Create a new order header and set the delete flag to 0.
 +
 
 +
Get the costs and calculate item costs.
 +
 
 +
Update all the order header calculated totals.
 +
 
 +
Set the delete field to the delete flag for all records.
 +
 
 +
Set the Order status to 9 (delivered) for all SJ, SP, SD, SB, SC, TJ warehouses where the orders have been set to deleted.
 +
 
 +
Set the Order status to 1 (new) for all SJ, SP, SD, SB, SC, TJ warehouses where the orders are not set to deleted.
 +
 
 +
Set the importing flag to complete.

Latest revision as of 09:30, 31 October 2019

Blis2 - Developed by J3 Systems www.j3systems.co.za.

Scheduled Cron Jobs

Scheduled tasks on a linux operating system are called cron jobs. The cron jobs are managed through the ISPConfig 3 hosting panel.

In Blis2 there are the following cron jobs:

Order Import

The Order Import cron imports all current open orders.

  • Script: crons/import_xml_orders.php
  • API: BlisCost
  • Runtime: 2,7,12,17,22,27,32,37,42,47,52,57 minutes
The following processes take place

Connect to the API and save the XML file, if there are errors stop the processing.

Set the importing flag and start reading the local saved XML file.

Find the Customer's default warehouse.

Check if order exists:

Yes
Delete the order items and update the header.
No
Create the new order and set the status to 0 (import).

Get the costs and calculate item costs

Insert the order items.

Update the Order header.

Flag Exceptions

- Set the order status to 1 where all the warehouses are NW or BW and the status is 0 (imported)

- Set the order status to 1 where the status is 0 and the total cost > own cost

Auto release orders

- Send WHConfirm for all the orders left on status 0

Flag Complete

- Set the status for all the auto released orders (status is 0) to 2

Customer Master Import

Imports the Customer information

  • Script: crons/import_xml_cust.php
  • API: BlisCustomerMaster
  • Runtime: 1,4,7,10,13,16,19,22 hours, 00 minutes
The following processes take place

Connect to the API and save the XML file, if there are errors stop the processing.

If the customer exists we update the details else we create a new record.

Item Master Import

Imports the Stock item list

  • Script: crons/import_xml_prod.php
  • API: BlisItemMaster
  • Runtime: 0,3,6,9,12,15,18,21 hours, 30 minutes
The following processes take place

Connect to the API and save the XML file, if there are errors stop the processing.

If the customer exists we update the details else we create a new record.

Schedule Import

Imports the schedule

  • Script: crons/import_xml_schedule.php
  • API: BlisSalesOrder
  • Runtime: 3,8,13,18,23,28,33,38,43,48,53,58 minutes
The following processes take place

Connect to the API and save the XML file, if there are errors stop the processing.

Set the importing flag and start reading the local saved XML file.

Set the delete flag for all current records to 1.

If the order exists we delete the order items and update the order header and we set the delete flag to 0, else we Create a new order header and set the delete flag to 0.

Get the costs and calculate item costs.

Update all the order header calculated totals.

Set the delete field to the delete flag for all records.

Set the Order status to 9 (delivered) for all SJ, SP, SD, SB, SC, TJ warehouses where the orders have been set to deleted.

Set the Order status to 1 (new) for all SJ, SP, SD, SB, SC, TJ warehouses where the orders are not set to deleted.

Set the importing flag to complete.