Transfer positions from higher-level operation with a "reset" to the position advance
var work$ACitems = parent$parentACitems;
// (accounting items work end) will copy all items of parent and sets (completed = false; charged = false, degree of completion = 0%, assigned to count = 0, work in progess = 0, work done = 0, work in pogress people =0) e.g. after split from offer to invoice
Delivery of items: quantity transfer into a delivery note
var work$ACitems = parent$parentACitemsLOT;
// will copy all LOT items of parent and sets (completed = false; charged = false, degree of completion = 0%, assigned to count = 0, work in progess = 0, work done = 0, work in pogress people =0) e.g. after split from sales confirmation to delivery note
Loading time items: Quantity transfer in from hours to a project
var work$ACitems = parent$parentACitemsTIME;
// will copy all TIME items of parent and sets (completed = false; charged = false, degree of completion = 0%, assigned to count = 0, work in progess = 0, work done = 0, work in pogress people =0) e.g. after split from sales confirmation to project
Generate collective invoice: Transfer of all items from invoice drafts
var work$ACitems = work$ACitemsUnite;
// (accounting unite unfinished items) will e.g. build a collective bill, all others found and without number are removed
Project budget release: Transfer to team assignment or directly to team members for processing
var work$ACitems = work$ACitemsBudgetRelease;
// (accounting items budget release) project only: run release budget to team planning or directly to people.
Project Budget Update: Transfers spent time records to the project status
var work$ACitems = work$ACitemsBudgetUpdate;
// (accounting items budget update) project only: update budget from consumend time.
End of Project: Ends budget approval and removes all work from the time recording
var work$ACitems = work$ACitemsWorkEnd;
// (accounting items work end) project only: ends all work. Removes work slots from project team.
Invoice for the project: Billing of the times
var work$ACitems = work$ACitemsTimeTrackBill;
// (accounting items time tracking bill) invoice with 'itemReferenceID' set to project id (after split to invoice set from 'parentID' (parent item id) will be billed ... all booked hours will be collected.
Delivery note Delivery: Goods movements are posted.
var work$ACitems = work$ACitemsWarehouseOut;
// delivery note: automaticly finds & assigns warehouse stock for delivery
var summeStd = work$HOURS_ACitems; // Calculates the sum of hours from all positions.
To determine the total for a specific product, set the context to a product ID as follows:
var CONTEXTproductid = "5728534915973120"; //filters this product ID within work$HOURS_ACitems.
Activate free hours on a support account: During the billing, the sums could be drawn to add them to the one field in the contact until the total reaches a time budget. The free lessons are recorded as an additional hourly position with a negative time value in order not to calculate the share:
var forfree = 2.00; // 2 Deduct free time
var work$ACadditem = CONTEXTproductid+"; "+(forfree*-1.0)+";Free lessons from service agreement;0" // 5 Values separated by ; "productid; amount; text; note; free" (free = 0 for false and 1 for true)
Summation of the transaction items: gross, net, VAT totals are calculated.
var work$ACtotalGrossAmount = 'do:recalcTotal';
The basis for accessing the positions is a JSON string of the parent$parentACitemlist from the parent, e.g. an order is read:
For conversion, all ' are replaced by ".
var items = JSON.parse(parent$parentACitemlist.replace(/'/g, '"')); // JSON ARRAY of all positions
Then you read the positions line by line:
for(var i = 0; i< items.length; i++) {
var item = items[i]; // JSON OBJECT einer Position
var produktname = item['name'];
var produktgruppen = item['groups'];
}