1 Conceptual Map of Scripts



2 Script Structure

Menu path:
[SOAPException: faultCode=SOAP-ENV:Client; msg=Deployment error in SOAP service 'urn:SOAPDOCServer': class name 'deister.webstudio.core.services.soap.serializers.ElementSerializer' could not be resolved as a serializer: deister.webstudio.core.services.soap.serializers.ElementSerializer] at deister.axional.docs.xsl.CMSSOAPClient.__doSOAPCall(CMSSOAPClient.java:102) at deister.axional.docs.xsl.CMSSOAPClient.getDictionaryObjectData(CMSSOAPClient.java:197) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:343) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:440) at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:222) at org.apache.xalan.transformer.TransformerImpl.extFunction(TransformerImpl.java:475) at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:208) at org.apache.xpath.objects.XRTreeFragSelectWrapper.execute(XRTreeFragSelectWrapper.java:69) at org.apache.xpath.XPath.execute(XPath.java:337) at org.apache.xalan.templates.ElemVariable.getValue(ElemVariable.java:280) at org.apache.xalan.templates.ElemVariable.execute(ElemVariable.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394) at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:711) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253) at deister.axional.server.lang.xsl.XSLProcessor.__execute(XSLProcessor.java:862) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:699) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:691) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
[SOAPException: faultCode=SOAP-ENV:Client; msg=Deployment error in SOAP service 'urn:SOAPDOCServer': class name 'deister.webstudio.core.services.soap.serializers.ElementSerializer' could not be resolved as a serializer: deister.webstudio.core.services.soap.serializers.ElementSerializer] at deister.axional.docs.xsl.CMSSOAPClient.__doSOAPCall(CMSSOAPClient.java:102) at deister.axional.docs.xsl.CMSSOAPClient.getDictionaryObjectData(CMSSOAPClient.java:197) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:300) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:440) at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:222) at org.apache.xalan.transformer.TransformerImpl.extFunction(TransformerImpl.java:475) at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:208) at org.apache.xpath.objects.XRTreeFragSelectWrapper.execute(XRTreeFragSelectWrapper.java:69) at org.apache.xpath.XPath.execute(XPath.java:337) at org.apache.xalan.templates.ElemVariable.getValue(ElemVariable.java:280) at org.apache.xalan.templates.ElemVariable.execute(ElemVariable.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394) at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:711) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253) at deister.axional.server.lang.xsl.XSLProcessor.__execute(XSLProcessor.java:862) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:699) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:691) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
[SOAPException: faultCode=SOAP-ENV:Client; msg=Deployment error in SOAP service 'urn:SOAPDOCServer': class name 'deister.webstudio.core.services.soap.serializers.ElementSerializer' could not be resolved as a serializer: deister.webstudio.core.services.soap.serializers.ElementSerializer] at deister.axional.docs.xsl.CMSSOAPClient.__doSOAPCall(CMSSOAPClient.java:102) at deister.axional.docs.xsl.CMSSOAPClient.getDictionaryObjectData(CMSSOAPClient.java:197) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:300) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:440) at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:222) at org.apache.xalan.transformer.TransformerImpl.extFunction(TransformerImpl.java:475) at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:208) at org.apache.xpath.objects.XRTreeFragSelectWrapper.execute(XRTreeFragSelectWrapper.java:69) at org.apache.xpath.XPath.execute(XPath.java:337) at org.apache.xalan.templates.ElemVariable.getValue(ElemVariable.java:280) at org.apache.xalan.templates.ElemVariable.execute(ElemVariable.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394) at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:711) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253) at deister.axional.server.lang.xsl.XSLProcessor.__execute(XSLProcessor.java:862) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:699) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:691) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
[SOAPException: faultCode=SOAP-ENV:Client; msg=Deployment error in SOAP service 'urn:SOAPDOCServer': class name 'deister.webstudio.core.services.soap.serializers.ElementSerializer' could not be resolved as a serializer: deister.webstudio.core.services.soap.serializers.ElementSerializer] at deister.axional.docs.xsl.CMSSOAPClient.__doSOAPCall(CMSSOAPClient.java:102) at deister.axional.docs.xsl.CMSSOAPClient.getDictionaryObjectData(CMSSOAPClient.java:197) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:300) at org.apache.xalan.extensions.ExtensionHandlerJavaPackage.callFunction(ExtensionHandlerJavaPackage.java:440) at org.apache.xalan.extensions.ExtensionsTable.extFunction(ExtensionsTable.java:222) at org.apache.xalan.transformer.TransformerImpl.extFunction(TransformerImpl.java:475) at org.apache.xpath.functions.FuncExtFunction.execute(FuncExtFunction.java:208) at org.apache.xpath.objects.XRTreeFragSelectWrapper.execute(XRTreeFragSelectWrapper.java:69) at org.apache.xpath.XPath.execute(XPath.java:337) at org.apache.xalan.templates.ElemVariable.getValue(ElemVariable.java:280) at org.apache.xalan.templates.ElemVariable.execute(ElemVariable.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:394) at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:248) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:128) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2402) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2272) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1358) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:711) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1275) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1253) at deister.axional.server.lang.xsl.XSLProcessor.__execute(XSLProcessor.java:862) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:699) at deister.axional.server.lang.xsl.XSLProcessor$4.call(XSLProcessor.java:691) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)

3 Movement Scripts

3.1 apps_pos_moveh.commit

The script with the apps_pos_moveh.commit code is executed by pressing the 'OK' button in the movement registration editor. The program must return a [true/false] boolean value. There is a set of functions intrinsic to the script which can be used:

Example
Copy
/**
* Get the source bean of this edit form
*/
SQLBean      moveh     = caller.getBean();
 
/**
* From Constants
*/
    public static final Uri             TABLE_MOVEH                     = Uri.parse(CONTENT_URI +  "apps_pos_moveh");
    public static final String          COLUMN_MOVEH_TERMID                 = "terminal_id";
    public static final String          COLUMN_MOVEH_TYPE               = "moveh_type";
    public static final String          COLUMN_MOVEH_NUMBER                 = "moveh_number";
    public static final String          COLUMN_MOVEH_TIPDOC                 = "moveh_tipdoc";
    public static final String          COLUMN_MOVEH_CUENTA                 = "moveh_cuenta";
    public static final String          COLUMN_MOVEH_ORIGIN                 = "moveh_origin";
    public static final String          COLUMN_MOVEH_DOCORI                 = "moveh_docori";   
    public static final String          COLUMN_MOVEH_CARRIER                = "moveh_carrier";
    public static final String          COLUMN_MOVEH_DATE               = "moveh_date";
    public static final String          COLUMN_MOVEH_NOTE                   = "moveh_note";
    public static final String          COLUMN_MOVEH_STATE              = "moveh_state";
 
 
EditText ed_tipdoc  = caller.get(Constants.COLUMN_MOVEH_TIPDOC).getEditText();

Example: Manual delivery recounts on the device are not permitted.

Copy
import android.widget.Toast;
 
/**
* Get the source bean of this edit form
*/
SQLBean      moveh     = caller.getBean();
 
// Get the editor of the tipdoc movement (in,out,recount,inventory...)
EditText ed_tipdoc  = caller.get(Constants.COLUMN_MOVEH_TIPDOC).getEditText();
String m_moveh_tipdoc      = ed_tipdoc.getText().toString();
 
// Do not permit manual recounts
if (m_moveh_tipdoc.equals("REC")) {
  Toast.makeText(context, "Recount not permitted!!!", Toast.LENGTH_LONG).show();
  return false;
}
return true;

New Movement Editor

The Recount movement type is not permitted.

3.2 apps_pos_moveh.validate

The script with the apps_pos_moveh.validate code will be executed when a movement is closed. The program must return a [true/false] boolean value. There is a set of functions intrinsic to the script which can be used:

Example
Copy
/**
* Get the source bean of this edit form
*/
SQLBean      moveh     = caller.getBean();
 
/**
* From Constants
*/
    public static final Uri             TABLE_MOVEH                     = Uri.parse(CONTENT_URI +  "apps_pos_moveh");
    public static final String          COLUMN_MOVEH_TERMID                 = "terminal_id";
    public static final String          COLUMN_MOVEH_TYPE               = "moveh_type";
    public static final String          COLUMN_MOVEH_NUMBER                 = "moveh_number";
    public static final String          COLUMN_MOVEH_TIPDOC                 = "moveh_tipdoc";
    public static final String          COLUMN_MOVEH_CUENTA                 = "moveh_cuenta";
    public static final String          COLUMN_MOVEH_ORIGIN                 = "moveh_origin";
    public static final String          COLUMN_MOVEH_DOCORI                 = "moveh_docori";   
    public static final String          COLUMN_MOVEH_CARRIER                = "moveh_carrier";
    public static final String          COLUMN_MOVEH_DATE               = "moveh_date";
    public static final String          COLUMN_MOVEH_NOTE                   = "moveh_note";
    public static final String          COLUMN_MOVEH_STATE              = "moveh_state";

Example: Close a generated stock movement.

Copy
import android.net.Uri;
import deister.android.apps.R;
import java.util.regex;



 
// Get the source bean of this edit form
SQLBean      moveh = context.getMoveBean();

String       m_terminal_id      = moveh.getString(Constants.COLUMN_MOVEL_TERMID);
String       m_type             = moveh.getString(Constants.COLUMN_MOVEL_TYPE);
String       m_numero           = moveh.getString(Constants.COLUMN_MOVEL_NUMBER);


SQLBean     m_movel = new SQLBean(Constants.TABLE_MOVEL);
 
   Cursor cur_movel = context.getContentResolver().query(
            Constants.TABLE_MOVEL,
            new String[] {"rowid, *"},
            Constants.TABLE_MOVEL_ITEM_MATCH,
            new String[] {m_terminal_id,m_numero,m_type},
            null
       );

     while (cur_movel.moveToNext()) {
           
         int    rowid         = cur_movel.getInt(0);
         String m_codean = (cur_movel.getString(cur_movel.getColumnIndexOrThrow(Constants.COLUMN_MOVEL_CODEAN)));         
        
         // Replace non ASCII Characters
         String m_new_codean= m_codean.replaceAll("[^\\x00-\\x7F]", "");
        
         // Replace unicode 0x 1d
         m_new_codean =  m_new_codean.replaceAll("\\p{C}", "/");
             
         SQLBean m_l = new SQLBean(m_movel, rowid);
         
         m_l.updateString(Constants.COLUMN_MOVEL_CODEAN, m_new_codean);
                 
     }

    cur_movel.close();

  return true;

To convert ASCII characters:

Copy
String m_new_codean= m_codean.replaceAll("[^\\x00-\\x7F]", "");

To convert Unicode 0x 1d characters:

Copy
m_new_codean =  m_new_codean.replaceAll("\\p{C}", "/");

3.3 apps_pos_movement.print

The script with the apps_pos_movement.print code is executed when the user wishes to print a movement. The printing job will be performed by the default printer configured, if one exists. There is a set of functions intrinsic to the script which can be used:

Example
Copy
/**
* Get the source bean of this edit form
*/
SQLBean      moveh     = caller.getBean();
 
// Obtain PK to get info from header
 
String      term_id         = moveh.getString(Constants.COLUMN_MOVEH_TERMID);
int         type            = moveh.getInt(Constants.COLUMN_MOVEH_TYPE);
int         number          = moveh.getInt(Constants.COLUMN_MOVEH_NUMBER);
 
/**
* From Constants
*/
    public static final Uri             TABLE_MOVEH                 = Uri.parse(CONTENT_URI +  "apps_pos_moveh");
    public static final String          COLUMN_MOVEH_TERMID         = "terminal_id";
    public static final String          COLUMN_MOVEH_TYPE           = "moveh_type";
    public static final String          COLUMN_MOVEH_NUMBER         = "moveh_number";
    public static final String          COLUMN_MOVEH_TIPDOC         = "moveh_tipdoc";
    public static final String          COLUMN_MOVEH_CUENTA         = "moveh_cuenta";
    public static final String          COLUMN_MOVEH_ORIGIN         = "moveh_origin";
    public static final String          COLUMN_MOVEH_DOCORI         = "moveh_docori";   
    public static final String          COLUMN_MOVEH_CARRIER        = "moveh_carrier";
    public static final String          COLUMN_MOVEH_DATE           = "moveh_date";
    public static final String          COLUMN_MOVEH_NOTE           = "moveh_note";
    public static final String          COLUMN_MOVEH_STATE          = "moveh_state";
 
 
 /**
    * String    getAppUser()            
    * String    getLoginCode()()
    * SQLBean   getMoveBean()
    * void      print(char c)
    * void      print(String s)
    * void      println(String s)   
    * void      println(int gravity, String s)
    * void      println(String left, String right)      
    * void      println(int gravity, String[] data) 
    * void      println(String[] left, String[] center, String[] right)         
    * void      printLine(int type)
    * void      printData(String[] data)
    * void      printHead(String caption)
    * void      printFoot(String left, String right)
    * void      print(String text)
    */