diff --git a/.gitignore b/.gitignore
index 45f81bdd..e1ed922b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -66,4 +66,6 @@ www/admin/_V4/**
www/csv/**
www/admin/_sounds/**
www/mp3/**
-faceai/logs/**
\ No newline at end of file
+faceai/logs/**
+local-jsp-docker/runtime/
+/db/
\ No newline at end of file
diff --git a/LOCAL_DEV_JSP_DOCKER_ANALYSIS.md b/LOCAL_DEV_JSP_DOCKER_ANALYSIS.md
new file mode 100644
index 00000000..40c95fe4
--- /dev/null
+++ b/LOCAL_DEV_JSP_DOCKER_ANALYSIS.md
@@ -0,0 +1,402 @@
+# Local JSP Docker Analysis
+
+## Goal
+
+Turn the public `www` site plus the legacy `rus` admin menu/runtime into a Docker-based local development environment with:
+
+- full JSP and servlet execution
+- enough filesystem layout to satisfy docbase-based file lookups
+- a mocked MySQL-compatible database that lets the app boot and the admin menu render
+- a workflow that supports editing JSPs and restarting quickly during local development
+
+This document is an implementation analysis, not a finished deployment recipe.
+
+## What The Live System Actually Looks Like
+
+Read-only checks on `83.149.164.4` show the production site is not running from a packaged WAR. It is running from an exploded Tomcat webapp:
+
+- OS: FreeBSD 14.2
+- Java: OpenJDK 11.0.25
+- Tomcat: 9.0.102
+- `catalina.home` and `catalina.base`: `/usr/local/apache-tomcat-9.0`
+- Tomcat `server.xml` contains a dedicated host for `www.regalamiunsorriso.it`
+- The live context for `/` points at `/home/sites/regalamiunsorriso/www/`
+- Tomcat AJP is enabled on port `8009`
+
+Important nuance:
+
+- `/home/sites/regalamiunsorriso/www/WEB-INF` is a real directory
+- `/home/sites/regalamiunsorriso/rus/WEB-INF` is also a real directory
+- the live `www/WEB-INF/lib` is much larger than `rus/WEB-INF/lib`
+- the live `rus/WEB-INF/classes` contains the DB property files
+- the live `www/WEB-INF/classes` appears minimal
+- Tomcat `server.xml` maps the live public host only to `/home/sites/regalamiunsorriso/www/`
+- no live Tomcat `Context` for `/home/sites/regalamiunsorriso/rus/` was visible in `server.xml`
+
+That means the runtime is split across two legacy trees, but the currently mapped live webapp is `www`. For local Docker work, assuming `www` alone is sufficient would still be unsafe, because the older `rus` tree remains the clearest source of legacy admin code, schema SQL, and bootstrap logic.
+
+## What The Repo Shows
+
+### `www`
+
+The `www` tree is the public web root and already includes:
+
+- JSP pages
+- `WEB-INF/web.xml`
+- taglibs such as `acxent.tld`, `pg.tld`, `news.tld`, `cc.tld`
+- a large `WEB-INF/lib` with modernized `it.acxent.*` jars
+- an `admin/menu` tree with JSP admin UI
+
+Evidence of the rename/migration is strong in `www`:
+
+- JSPs import `it.acxent.*`
+- `www/WEB-INF/web.xml` maps servlets under `it.acxent.*`
+- `www/WEB-INF/lib` contains `acxent-core`, `acxent-common`, `acxent-face`, and related jars
+
+The current `www/WEB-INF/web.xml` shows:
+
+- servlet/filter mappings for JSP and rewritten `.html` URLs
+- admin menu servlet mappings under `/admin/menu/*`
+- startup servlets that update DB structures on boot
+- DB config pointing to MySQL-compatible settings
+- direct dependence on application parameters and filesystem-backed assets
+
+### `rus`
+
+The `rus` tree contains the older admin/runtime stack and still matters for local development:
+
+- `rus/WEB-INF/web.xml` is another full Java webapp descriptor
+- `rus/admin/menu` contains the older admin dashboard JSPs
+- `rus/WEB-INF/lib/*_src` contains source code for key servlet, DB, and parameter logic
+- `rus/admin/_alterTable/pg2rus.sql` contains a large schema for the application domain, including `GARA`, `TIPO_GARA`, `PUNTO_FOTO`, `ACCESS`, `USER_ACCESS`, and `LOG_FOTO`
+- `rus/WEB-INF/classes/dbcomuni.properties` sets `USE_PARM_HT=true`
+
+Evidence that `rus` is the older lineage is equally strong:
+
+- `rus/admin/menu` JSPs import `com.ablia.*`
+- `rus/WEB-INF/web.xml` maps servlets under `com.ablia.*`
+- `rus/WEB-INF/lib` contains `ablia.jar`, `abliaDbCom.jar`, and multiple `*_src` trees
+- `rus/WEB-INF/lib/decomp.bat` suggests this tree has already been treated as a reverse-engineering or recovery surface rather than a clean source distribution
+
+This is also where the clearest bootstrap logic lives. `Parm.java` seeds defaults for some records such as:
+
+- `SINGLE_SIGN_ON=false`
+- `LOGO_MENU=Titolo Applicazione`
+- `PATH_TMP=_tmp/`
+- `MAIL_MSG_PATH_MAILER=mailMessage/`
+- `REWRITE_URL_FILE_PATH=/admin/_alterTable/`
+
+That helps, but it does not remove the need for a real schema or baseline user/access data.
+
+## Migration Interpretation
+
+The evidence supports this interpretation of the `ablia` to `acxent` transition:
+
+- the active public runtime has moved to the `acxent` namespace and libraries under `www`
+- the `rus` tree is still valuable, but it is a legacy `ablia` runtime/reference tree rather than the clean current implementation
+- the live host mapping reinforces that shift, because Tomcat serves `www` and does not visibly publish `rus` as its own live host context
+
+That means the safest handling is:
+
+- keep the current `rus` tree as a legacy backup/reference
+- do not treat the existing `rus` tree as the current canonical codebase
+- if you want a fresh, updated `rus`-equivalent admin/runtime tree, obtain it separately and preserve it as a new artifact rather than overwriting this legacy one
+- if the fresh artifact is delivered only as jars or compiled classes, decompiling those classes into a browsable source mirror is reasonable for local analysis and maintenance
+
+What the current evidence does not prove:
+
+- that such a fresh downloadable `rus` tree is already present in this repo
+- that the live server still executes `rus` directly for public requests
+
+So the evidence supports the preservation and decompilation strategy, but not a claim that this repository already contains the fresh replacement.
+
+### The Admin Boundary
+
+There are effectively two admin surfaces in the repo:
+
+- `www/admin/menu`, using the newer `it.acxent.*` stack
+- `rus/admin/menu`, using the older `com.ablia.*` stack
+
+The `www` admin menu already contains compatibility links such as `/admin/pg_RUS/Gara`, which is a strong sign that the public app has been carrying forward legacy admin functionality instead of replacing it cleanly.
+
+For Docker, that means there are two viable targets:
+
+1. boot only the `www` webapp and bring over enough `rus` data/assets to satisfy the legacy admin links
+2. boot both `www` and `rus` as separate Tomcat contexts and keep the boundary explicit
+
+The second option is safer for analysis and migration because it matches the repository reality better.
+
+## What “Full JSP Support” Actually Requires
+
+To satisfy the request, a local container must support more than static JSP rendering.
+
+It needs:
+
+- Tomcat 9 with JSP compilation enabled
+- Java 11 first, because that is what production is currently running
+- exploded webapp deployment so JSP edits are visible without rebuilding a WAR each time
+- both taglib trees and both `WEB-INF/lib` trees available at runtime
+- a writable temp/work area for Tomcat compiled JSPs
+- a writable app docbase for uploads, generated files, CSV imports, image lookups, and mail templates
+- a MySQL-compatible database reachable by the app at startup
+
+It also needs to tolerate the app's legacy assumptions:
+
+- path concatenation against `DOCBASE`
+- direct filesystem existence checks inside taglibs and servlets
+- startup DB mutation via `InitUpdateDbSvlt`
+- servlet code that chooses JSP pages dynamically based on `ACCESS`, request params, and file existence
+
+## Data Strategy
+
+The application does not just query a few content tables. It uses the database as runtime configuration.
+
+For this codebase, the most practical local-development strategy is not to handcraft mock rows first. It is to start from a dump of the real production-shaped database and trim or sanitize later if needed.
+
+This is now directly supported by the local workspace state. The following dumps already exist under `db/`:
+
+- `dump-pg-202604211927.sql`
+- `dump-pg_log-202604211930.sql`
+- `dump-mysql-202604211926.sql`
+- `dump-performance_schema-202604211926.sql`
+- `dump-sys-202604211930.sql`
+
+For local development, `dump-pg-202604211927.sql` should be treated as the primary seed source.
+
+At minimum, local boot for useful development will require:
+
+- `PARM`
+- `USERS`
+- `USER_PROFILE`
+- `ACCESS`
+- `USER_ACCESS`
+- `TABLE_DESC`
+- photo/event tables such as `GARA`, `TIPO_GARA`, `PUNTO_FOTO`, and likely additional related tables referenced by the servlets
+
+The admin menu depends on both authentication and metadata-driven routing. A DB with only schema and no seed data will not be enough.
+
+There are some useful seed hints already in the repo:
+
+- old user/profile bootstrap SQL under `www/admin/_alterTable/_old`
+- schema SQL under `rus/admin/_alterTable/pg2rus.sql`
+- parameter defaults embedded in `rus/WEB-INF/lib/ablia_src/com/ablia/common/Parm.java`
+
+What is missing from the repo is not raw data, but a curated minimal subset and a documented import procedure for local use.
+
+If you use the real dump as the starting point, the first local milestone becomes:
+
+- import the real `pg` dump locally
+- override the environment-sensitive values after import, especially `PARM.DOCBASE` and any mailer or file-path settings
+- document one admin login and one public sample flow that are known to work against the imported snapshot
+
+This is materially easier and more faithful than trying to synthesize a coherent mock dataset from schema alone.
+
+## Recommended Docker Shape
+
+### Recommendation
+
+Build a multi-service local stack with one shared source volume and one MySQL service.
+
+Suggested services:
+
+- `tomcat-www`: Tomcat 9 serving `www` as the ROOT webapp
+- `tomcat-rus`: Tomcat 9 serving `rus` at `/rus` or `/admin-rus`
+- `mysql`: MySQL 8 or MariaDB 10.11 used only for local development
+
+Optional but useful:
+
+- `nginx`: reverse proxy that exposes one friendly local hostname and routes `/` to `tomcat-www` and `/rus` to `tomcat-rus`
+
+Why this is the best first step:
+
+- it preserves both legacy runtimes instead of prematurely merging them
+- it allows JSP edits against exploded directories
+- it gives you a clean place to prove which admin flows still belong to `rus`
+- it minimizes risky assumptions about the live cross-tree wiring
+
+### Alternative
+
+Run only one Tomcat container with `www` as ROOT and manually overlay selected `rus` assets into it.
+
+This is possible, but I would not start there because:
+
+- it bakes in guesses about a split runtime that is already unclear
+- it makes failures look like classpath bugs even when the problem is missing legacy assets
+- it is harder to reason about during early local bring-up
+
+## Filesystem Layout Needed Inside Docker
+
+A working local setup should not rely only on the web roots. It should create an application docbase volume as well.
+
+Suggested mounted paths:
+
+- `/workspace/www` -> repo `www`
+- `/workspace/rus` -> repo `rus`
+- `/data/docbase` -> local writable application docbase
+- `/data/docbase/_tmp` -> temp uploads and generated files
+- `/data/docbase/admin/csv` -> CSV import/export location used by admin code
+- `/usr/local/tomcat/work` -> writable JSP compilation cache
+
+Then seed `PARM.DOCBASE` in local DB to `/data/docbase/`.
+
+Without that, a large amount of JSP and servlet code will fail on file existence checks even if the JSP compiler itself works.
+
+## DB Strategy
+
+### Practical Target
+
+Use MySQL-compatible SQL, not H2.
+
+Reasons:
+
+- production points to MySQL-compatible configuration
+- legacy SQL and update scripts are written for that family
+- dynamic SQL and driver assumptions are unlikely to be portable to H2 without patches
+
+### Preferred Seed Plan
+
+The local DB should be assembled in layers, but the first layer should now be the real dump rather than repo SQL alone:
+
+1. import `db/dump-pg-202604211927.sql` into the local MySQL-compatible container
+2. apply local-only overrides for environment-sensitive `PARM` values
+3. import optional auxiliary dumps only if the chosen local workflows need them
+4. document one known-good login and one known-good public sample flow
+5. only then consider trimming or anonymizing for a lighter-weight developer dataset
+
+This shifts the main implementation work item from “invent a stable dataset” to “stabilize a production-shaped snapshot for local use.”
+
+### Required Local Overrides After Import
+
+Even with the real dump, local development still needs a few post-import adjustments.
+
+At minimum, review or override:
+
+- `DOCBASE=/data/docbase/`
+- `PATH_TMP=_tmp/`
+- `MAIL_MSG_PATH_MAILER` if local mail-template resolution should stay inside the repo/docbase
+- any path-oriented `PARM` values that point at production-only filesystem locations
+- any credentials or integration flags that should not target live services from a developer machine
+
+The important change is that users, profiles, access metadata, and most domain rows should come from the real dump first, not from a hand-built minimal seed.
+
+## What Will Probably Break First
+
+These are the highest-probability local bring-up failures.
+
+### 1. Incomplete DB Seed
+
+Most likely symptom:
+
+- menu renders partially or login works but navigation fails
+- JSPs throw nulls around `Parm`, `Access`, or user profile resolution
+
+### 2. Missing Filesystem Assets Under `DOCBASE`
+
+Most likely symptom:
+
+- image checks fail
+- CSV import/export paths fail
+- mail template lookups fail
+- servlet code throws `FileNotFoundException` or silently renders degraded UI
+
+### 3. Mixed Legacy Classpaths
+
+Most likely symptom:
+
+- one context starts while the other fails on missing classes, conflicting libs, or older APIs
+
+Running two Tomcat contexts is the easiest way to isolate this.
+
+### 4. Rewrite And Context Path Assumptions
+
+Most likely symptom:
+
+- `.html` routes or menu links resolve incorrectly when not hosted exactly like production
+
+This is manageable, but local routing should be explicit.
+
+## Estimated Work Breakdown
+
+### Phase 1: Container Bring-Up
+
+Expected effort: low to medium.
+
+Deliverables:
+
+- Docker Compose file
+- Tomcat Dockerfile or runtime image selection
+- exploded mounting of `www` and `rus`
+- MySQL service
+- baseline local environment variables and startup scripts
+
+### Phase 2: Local DB Import And Stabilization
+
+Expected effort: medium to high.
+
+Deliverables:
+
+- repeatable import of `db/dump-pg-202604211927.sql`
+- local override script for environment-sensitive `PARM` rows
+- one documented admin test login
+- one documented public sample race/photo flow
+
+This is the real critical path.
+
+### Phase 3: Runtime Stabilization
+
+Expected effort: medium.
+
+Deliverables:
+
+- working `DOCBASE` directory layout
+- local rewrite compatibility
+- sample assets so photo/event pages can render without production storage
+- a short smoke-test checklist
+
+## The Smallest Sensible First Implementation
+
+If the goal is a usable development environment quickly, the best first slice is:
+
+1. one Tomcat 9 container for `www`
+2. one MySQL container
+3. import the real `pg` dump and apply a small set of local `PARM` overrides
+4. expose the `www/admin/menu` dashboard first
+5. add a second `rus` context only when a missing admin flow proves it is still needed
+
+If the goal is completeness and fewer hidden assumptions, start with both contexts immediately.
+
+Given the current repo and the server findings, I would still design the Docker setup so a second `rus` context can be added without reworking the stack.
+
+## Recommendation Summary
+
+This is feasible, but the hard part is not Docker.
+
+The hard part is stabilizing a production-shaped local runtime contract across:
+
+- two legacy web trees
+- a metadata-driven admin UI
+- filesystem-backed application behavior
+- a DB that acts as both content store and runtime config store
+
+### What It Would Take
+
+- Tomcat 9 on Java 11
+- exploded deployment of `www`, and probably `rus` as well
+- a writable local docbase mounted outside the web roots
+- a MySQL-compatible local database
+- import of the real `pg` dump plus a deliberate set of local overrides for environment-sensitive rows
+- a short compatibility pass on rewrite behavior and admin links
+
+### Overall Assessment
+
+Containerizing the JSP runtime is straightforward.
+
+Making it genuinely useful for local development is still a moderate migration task, but the existence of the real local DB dump changes the shape of the work. The cleanest path is to import the real `pg` snapshot, override the environment-sensitive parts, treat `www` as the active `acxent` runtime, and retain `rus` as a legacy `ablia` reference tree unless and until a fresh updated replacement is obtained and decompiled.
+
+## Suggested Next Deliverables
+
+If this analysis is accepted, the next implementation docs should be:
+
+1. a concrete `docker-compose.yml` design
+2. a `local-db-import-plan.md` covering dump import plus local `PARM` overrides
+3. a `local-smoke-test.md` covering login, admin dashboard, one public event page, and one file-backed operation
\ No newline at end of file
diff --git a/analyze_dump.py b/analyze_dump.py
new file mode 100644
index 00000000..ff667f5d
--- /dev/null
+++ b/analyze_dump.py
@@ -0,0 +1,64 @@
+import sys
+import re
+import os
+
+filepath = r"db/dump-pg-202604211927.sql"
+filesize = os.path.getsize(filepath)
+
+# Pattern for MySQL-style INSERT INTO `table`
+pattern = re.compile(rb"^INSERT INTO `([^`]+)`", re.IGNORECASE)
+
+stats = {}
+
+with open(filepath, "rb") as f:
+ for line in f:
+ line_len = len(line)
+ match = pattern.search(line)
+ if match:
+ table_name = match.group(1).decode("utf-8", errors="ignore")
+ if table_name not in stats:
+ stats[table_name] = {"bytes": 0, "count": 0}
+ stats[table_name]["bytes"] += line_len
+ stats[table_name]["count"] += 1
+
+results = []
+for table, data in stats.items():
+ results.append({
+ "table": table,
+ "payload_mb": round(data["bytes"] / (1024 * 1024), 2),
+ "payload_pct": round((data["bytes"] / filesize) * 100, 2),
+ "insert_statements": data["count"],
+ "bytes": data["bytes"]
+ })
+
+results.sort(key=lambda x: x["bytes"], reverse=True)
+
+top_20 = results[:20]
+top_20_names = {r["table"] for r in top_20}
+
+special_names = {"log_foto", "clifor", "users", "news_users", "coda_messaggi", "clifor_log", "banner_stats", "access_log"}
+special_substrings = ["log", "queue", "messaggi", "session", "temp", "stats", "foto"]
+
+def is_special(name):
+ if name in special_names: return True
+ name_lower = name.lower()
+ for sub in special_substrings:
+ if sub in name_lower: return True
+ return False
+
+# Collect all that match special criteria
+special_rows = [r for r in results if is_special(r["table"])]
+special_names_found = {r["table"] for r in special_rows}
+
+# Combine top 20 and special rows
+output_rows_set = {r["table"]: r for r in top_20}
+for r in special_rows:
+ output_rows_set[r["table"]] = r
+
+output_rows = list(output_rows_set.values())
+output_rows.sort(key=lambda x: x["bytes"], reverse=True)
+
+print(f"{'table':<30} | {'payload_mb':>10} | {'payload_pct':>11} | {'insert_statements':>17}")
+print("-" * 75)
+for r in output_rows:
+ print(f"{r['table']:<30} | {r['payload_mb']:>10.2f} | {r['payload_pct']:>10.2f}% | {r['insert_statements']:>17}")
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/META-INF/MANIFEST.MF b/decompiled-libs/www/acxent-bank-1.0.1/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..e6558cdf
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Archiver-Version: Plexus Archiver
+Created-By: Apache Maven 3.8.7
+Built-By: jenkins
+Build-Jdk: 17.0.16
+
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/META-INF/maven/it.acxent/acxent-bank/pom.properties b/decompiled-libs/www/acxent-bank-1.0.1/META-INF/maven/it.acxent/acxent-bank/pom.properties
new file mode 100644
index 00000000..25ccf4bc
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/META-INF/maven/it.acxent/acxent-bank/pom.properties
@@ -0,0 +1,3 @@
+artifactId=acxent-bank
+groupId=it.acxent
+version=1.0.1
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/META-INF/maven/it.acxent/acxent-bank/pom.xml b/decompiled-libs/www/acxent-bank-1.0.1/META-INF/maven/it.acxent/acxent-bank/pom.xml
new file mode 100644
index 00000000..cc905cf1
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/META-INF/maven/it.acxent/acxent-bank/pom.xml
@@ -0,0 +1,86 @@
+
+ 4.0.0
+ it.acxent
+ acxent-bank
+ 1.0.1
+ Acxent Banche
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.13.0
+
+ 11
+ 11
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ 3.7.0
+
+
+ org.apache.maven.plugins
+ maven-toolchains-plugin
+ 3.1.0
+
+
+
+ toolchain
+
+
+
+
+
+
+ 11
+
+
+
+
+
+
+
+
+ github-repo
+ GitHub acolzi Apache Maven Packages
+ https://maven.pkg.github.com/acolzi/repo
+
+
+
+
+ github-repo
+ GitHub Repository
+ https://maven.pkg.github.com/acolzi/repo
+
+
+
+
+ com.stripe
+ stripe-java
+ 22.29.0
+
+
+ com.paypal.sdk
+ checkout-sdk
+ 2.0.0
+
+
+ it.acxent
+ acxent-core
+ 1.0.1
+
+
+
+
\ No newline at end of file
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/AuthorizeIntentExamples/AuthorizeOrder.java b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/AuthorizeIntentExamples/AuthorizeOrder.java
new file mode 100644
index 00000000..51ca7777
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/AuthorizeIntentExamples/AuthorizeOrder.java
@@ -0,0 +1,48 @@
+package com.paypal.AuthorizeIntentExamples;
+
+import com.paypal.PayPalClient;
+import com.paypal.http.HttpRequest;
+import com.paypal.http.HttpResponse;
+import com.paypal.http.serializer.Json;
+import com.paypal.orders.Authorization;
+import com.paypal.orders.LinkDescription;
+import com.paypal.orders.Order;
+import com.paypal.orders.OrderRequest;
+import com.paypal.orders.OrdersAuthorizeRequest;
+import com.paypal.orders.PurchaseUnit;
+import java.io.IOException;
+import java.util.Objects;
+import org.json.JSONObject;
+
+public class AuthorizeOrder extends PayPalClient {
+ private OrderRequest buildRequestBody() {
+ return new OrderRequest();
+ }
+
+ public HttpResponse authorizeOrder(String orderId, boolean debug) throws IOException {
+ OrdersAuthorizeRequest request = new OrdersAuthorizeRequest(orderId);
+ request.requestBody(buildRequestBody());
+ HttpResponse response = client().execute((HttpRequest)request);
+ if (debug) {
+ System.out.println("Authorization Ids:");
+ ((Order)response.result()).purchaseUnits().forEach(purchaseUnit -> {
+ Objects.requireNonNull(System.out);
+ purchaseUnit.payments().authorizations().stream().map(authorization -> authorization.id()).forEach(System.out::println);
+ });
+ System.out.println("Link Descriptions: ");
+ for (LinkDescription link : (Iterable)((Order)response.result()).links())
+ System.out.println("\t" + link.rel() + ": " + link.href());
+ System.out.println("Full response body:");
+ System.out.println(new JSONObject(new Json().serialize(response.result())).toString(4));
+ }
+ return response;
+ }
+
+ public static void main(String[] args) {
+ try {
+ new AuthorizeOrder().authorizeOrder("<>", true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/AuthorizeIntentExamples/CaptureOrder.java b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/AuthorizeIntentExamples/CaptureOrder.java
new file mode 100644
index 00000000..96b70168
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/AuthorizeIntentExamples/CaptureOrder.java
@@ -0,0 +1,43 @@
+package com.paypal.AuthorizeIntentExamples;
+
+import com.paypal.PayPalClient;
+import com.paypal.http.HttpRequest;
+import com.paypal.http.HttpResponse;
+import com.paypal.http.serializer.Json;
+import com.paypal.orders.OrderRequest;
+import com.paypal.payments.AuthorizationsCaptureRequest;
+import com.paypal.payments.Capture;
+import com.paypal.payments.LinkDescription;
+import java.io.IOException;
+import org.json.JSONObject;
+
+public class CaptureOrder extends PayPalClient {
+ public OrderRequest buildRequestBody() {
+ return new OrderRequest();
+ }
+
+ public HttpResponse captureOrder(String authId, boolean debug) throws IOException {
+ AuthorizationsCaptureRequest request = new AuthorizationsCaptureRequest(authId);
+ request.requestBody(buildRequestBody());
+ HttpResponse response = client().execute((HttpRequest)request);
+ if (debug) {
+ System.out.println("Status Code: " + response.statusCode());
+ System.out.println("Status: " + ((Capture)response.result()).status());
+ System.out.println("Capture ID: " + ((Capture)response.result()).id());
+ System.out.println("Links: ");
+ for (LinkDescription link : (Iterable)((Capture)response.result()).links())
+ System.out.println("\t" + link.rel() + ": " + link.href() + "\tCall Type: " + link.method());
+ System.out.println("Full response body:");
+ System.out.println(new JSONObject(new Json().serialize(response.result())).toString(4));
+ }
+ return response;
+ }
+
+ public static void main(String[] args) {
+ try {
+ new CaptureOrder().captureOrder("<>", true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/AuthorizeIntentExamples/CreateOrder.java b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/AuthorizeIntentExamples/CreateOrder.java
new file mode 100644
index 00000000..df7fabbd
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/AuthorizeIntentExamples/CreateOrder.java
@@ -0,0 +1,132 @@
+package com.paypal.AuthorizeIntentExamples;
+
+import com.paypal.PayPalClient;
+import com.paypal.http.HttpRequest;
+import com.paypal.http.HttpResponse;
+import com.paypal.http.exceptions.HttpException;
+import com.paypal.http.serializer.Json;
+import com.paypal.orders.AddressPortable;
+import com.paypal.orders.AmountBreakdown;
+import com.paypal.orders.AmountWithBreakdown;
+import com.paypal.orders.ApplicationContext;
+import com.paypal.orders.Item;
+import com.paypal.orders.LinkDescription;
+import com.paypal.orders.Money;
+import com.paypal.orders.Name;
+import com.paypal.orders.Order;
+import com.paypal.orders.OrderRequest;
+import com.paypal.orders.OrdersCreateRequest;
+import com.paypal.orders.PurchaseUnitRequest;
+import com.paypal.orders.ShippingDetail;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import org.json.JSONObject;
+
+public class CreateOrder extends PayPalClient {
+ private OrderRequest buildCompleteRequestBody() {
+ OrderRequest orderRequest = new OrderRequest();
+ orderRequest.checkoutPaymentIntent("AUTHORIZE");
+ ApplicationContext applicationContext = new ApplicationContext().brandName("EXAMPLE INC").landingPage("BILLING")
+ .cancelUrl("https://www.example.com").returnUrl("https://www.example.com").userAction("CONTINUE")
+ .shippingPreference("SET_PROVIDED_ADDRESS");
+ orderRequest.applicationContext(applicationContext);
+ List purchaseUnitRequests = new ArrayList<>();
+ PurchaseUnitRequest purchaseUnitRequest = new PurchaseUnitRequest().referenceId("PUHF")
+ .description("Sporting Goods").customId("CUST-HighFashions").softDescriptor("HighFashions")
+ .amountWithBreakdown(new AmountWithBreakdown().currencyCode("USD").value("220.00")
+ .amountBreakdown(new AmountBreakdown().itemTotal(new Money().currencyCode("USD").value("180.00"))
+ .shipping(new Money().currencyCode("USD").value("20.00"))
+ .handling(new Money().currencyCode("USD").value("10.00"))
+ .taxTotal(new Money().currencyCode("USD").value("20.00"))
+ .shippingDiscount(new Money().currencyCode("USD").value("10.00"))))
+ .items(new ArrayList<>() {
+ {
+ add(new Item().name("T-shirt").description("Green XL").sku("sku01")
+ .unitAmount(new Money().currencyCode("USD").value("90.00"))
+ .tax(new Money().currencyCode("USD").value("10.00")).quantity("1")
+ .category("PHYSICAL_GOODS"));
+ add(new Item().name("Shoes").description("Running, Size 10.5").sku("sku02")
+ .unitAmount(new Money().currencyCode("USD").value("45.00"))
+ .tax(new Money().currencyCode("USD").value("5.00")).quantity("2")
+ .category("PHYSICAL_GOODS"));
+ }
+ }).shippingDetail(new ShippingDetail().name(new Name().fullName("John Doe"))
+ .addressPortable(new AddressPortable().addressLine1("123 Townsend St").addressLine2("Floor 6")
+ .adminArea2("San Francisco").adminArea1("CA").postalCode("94107").countryCode("US")));
+ purchaseUnitRequests.add(purchaseUnitRequest);
+ orderRequest.purchaseUnits(purchaseUnitRequests);
+ return orderRequest;
+ }
+
+ private OrderRequest buildMinimumRequestBody() {
+ OrderRequest orderRequest = new OrderRequest();
+ orderRequest.checkoutPaymentIntent("AUTHORIZE");
+ ApplicationContext applicationContext = new ApplicationContext()
+ .cancelUrl("https://www.example.com").returnUrl("https://www.example.com");
+ orderRequest.applicationContext(applicationContext);
+ List purchaseUnitRequests = new ArrayList<>();
+ PurchaseUnitRequest purchaseUnitRequest = new PurchaseUnitRequest()
+ .amountWithBreakdown(new AmountWithBreakdown().currencyCode("USD").value("220.00"));
+ purchaseUnitRequests.add(purchaseUnitRequest);
+ orderRequest.purchaseUnits(purchaseUnitRequests);
+ return orderRequest;
+ }
+
+ public HttpResponse createOrder(boolean debug) throws IOException {
+ OrdersCreateRequest request = new OrdersCreateRequest();
+ request.header("prefer", "return=representation");
+ request.requestBody(buildCompleteRequestBody());
+ HttpResponse response = client().execute((HttpRequest)request);
+ if (debug &&
+ response.statusCode() == 201) {
+ System.out.println("Order with Complete Payload: ");
+ System.out.println("Status Code: " + response.statusCode());
+ System.out.println("Status: " + ((Order)response.result()).status());
+ System.out.println("Order ID: " + ((Order)response.result()).id());
+ System.out.println("Intent: " + ((Order)response.result()).checkoutPaymentIntent());
+ System.out.println("Links: ");
+ for (LinkDescription link : (Iterable)((Order)response.result()).links())
+ System.out.println("\t" + link.rel() + ": " + link.href() + "\tCall Type: " + link.method());
+ System.out.println("Total Amount: " + ((Order)response.result()).purchaseUnits().get(0).amountWithBreakdown().currencyCode() + " " + ((Order)
+ response.result()).purchaseUnits().get(0).amountWithBreakdown().value());
+ System.out.println("Full response body:");
+ System.out.println(new JSONObject(new Json().serialize(response.result())).toString(4));
+ }
+ return response;
+ }
+
+ public HttpResponse createOrderWithMinimumPayload(boolean debug) throws IOException {
+ OrdersCreateRequest request = new OrdersCreateRequest();
+ request.header("prefer", "return=representation");
+ request.requestBody(buildMinimumRequestBody());
+ HttpResponse response = client().execute((HttpRequest)request);
+ if (debug &&
+ response.statusCode() == 201) {
+ System.out.println("Order with Minimum Payload: ");
+ System.out.println("Status Code: " + response.statusCode());
+ System.out.println("Status: " + ((Order)response.result()).status());
+ System.out.println("Order ID: " + ((Order)response.result()).id());
+ System.out.println("Intent: " + ((Order)response.result()).checkoutPaymentIntent());
+ System.out.println("Links: ");
+ for (LinkDescription link : (Iterable)((Order)response.result()).links())
+ System.out.println("\t" + link.rel() + ": " + link.href() + "\tCall Type: " + link.method());
+ System.out.println("Total Amount: " + ((Order)response.result()).purchaseUnits().get(0).amountWithBreakdown().currencyCode() + " " + ((Order)
+ response.result()).purchaseUnits().get(0).amountWithBreakdown().value());
+ System.out.println("Full response body:");
+ System.out.println(new JSONObject(new Json().serialize(response.result())).toString(4));
+ }
+ return response;
+ }
+
+ public static void main(String[] args) {
+ try {
+ new CreateOrder().createOrder(true);
+ new CreateOrder().createOrderWithMinimumPayload(true);
+ } catch (HttpException e) {
+ System.out.println(e.getLocalizedMessage());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/AuthorizeIntentExamples/RefundOrder.java b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/AuthorizeIntentExamples/RefundOrder.java
new file mode 100644
index 00000000..ded6168e
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/AuthorizeIntentExamples/RefundOrder.java
@@ -0,0 +1,50 @@
+package com.paypal.AuthorizeIntentExamples;
+
+import com.paypal.PayPalClient;
+import com.paypal.http.HttpRequest;
+import com.paypal.http.HttpResponse;
+import com.paypal.http.serializer.Json;
+import com.paypal.payments.CapturesRefundRequest;
+import com.paypal.payments.LinkDescription;
+import com.paypal.payments.Money;
+import com.paypal.payments.Refund;
+import com.paypal.payments.RefundRequest;
+import java.io.IOException;
+import org.json.JSONObject;
+
+public class RefundOrder extends PayPalClient {
+ public RefundRequest buildRequestBody() {
+ RefundRequest refundRequest = new RefundRequest();
+ Money money = new Money();
+ money.currencyCode("USD");
+ money.value("20.00");
+ refundRequest.amount(money);
+ return refundRequest;
+ }
+
+ public HttpResponse refundOrder(String captureId, boolean debug) throws IOException {
+ CapturesRefundRequest request = new CapturesRefundRequest(captureId);
+ request.prefer("return=representation");
+ request.requestBody(buildRequestBody());
+ HttpResponse response = client().execute((HttpRequest)request);
+ if (debug) {
+ System.out.println("Status Code: " + response.statusCode());
+ System.out.println("Status: " + ((Refund)response.result()).status());
+ System.out.println("Refund Id: " + ((Refund)response.result()).id());
+ System.out.println("Links: ");
+ for (LinkDescription link : (Iterable)((Refund)response.result()).links())
+ System.out.println("\t" + link.rel() + ": " + link.href() + "\tCall Type: " + link.method());
+ System.out.println("Full response body:");
+ System.out.println(new JSONObject(new Json().serialize(response.result())).toString(4));
+ }
+ return response;
+ }
+
+ public static void main(String[] args) {
+ try {
+ new RefundOrder().refundOrder("<>", true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/AuthorizeIntentExamples/RunAll.java b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/AuthorizeIntentExamples/RunAll.java
new file mode 100644
index 00000000..044ac957
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/AuthorizeIntentExamples/RunAll.java
@@ -0,0 +1,59 @@
+package com.paypal.AuthorizeIntentExamples;
+
+import com.paypal.http.HttpResponse;
+import com.paypal.orders.LinkDescription;
+import com.paypal.orders.Order;
+import com.paypal.payments.Capture;
+import com.paypal.payments.Refund;
+
+public class RunAll {
+ public static void main(String[] args) {
+ try {
+ HttpResponse orderResponse = new CreateOrder().createOrder(false);
+ String orderId = "";
+ System.out.println("Creating Order...");
+ if (orderResponse.statusCode() == 201) {
+ orderId = ((Order)orderResponse.result()).id();
+ System.out.println("Order ID: " + orderId);
+ System.out.println("Links:");
+ for (LinkDescription link : (Iterable)((Order)orderResponse.result()).links())
+ System.out.println("\t" + link.rel() + ": " + link.href());
+ }
+ System.out.println("Created Successfully\n");
+ System.out.println("Copy approve link and paste it in browser. Login with buyer account and follow the instructions.\nOnce approved hit enter...");
+ System.in.read();
+ System.out.println("Authorizing Order...");
+ orderResponse = new AuthorizeOrder().authorizeOrder(orderId, false);
+ String authId = "";
+ if (orderResponse.statusCode() == 201) {
+ System.out.println("Authorized Successfully\n");
+ authId = ((Order)orderResponse.result()).purchaseUnits().get(0).payments().authorizations().get(0).id();
+ }
+ System.out.println("Capturing Order...");
+ HttpResponse captureOrderResponse = new CaptureOrder().captureOrder(authId, false);
+ if (orderResponse.statusCode() == 201) {
+ System.out.println("Captured Successfully");
+ System.out.println("Status Code: " + captureOrderResponse.statusCode());
+ System.out.println("Status: " + ((Capture)captureOrderResponse.result()).status());
+ System.out.println("Capture ID: " + ((Capture)captureOrderResponse.result()).id());
+ System.out.println("Links: ");
+ for (com.paypal.payments.LinkDescription link : (Iterable)((Capture)captureOrderResponse.result()).links())
+ System.out.println("\t" + link.rel() + ": " + link.href() + "\tCall Type: " + link.method());
+ }
+ System.out.println();
+ System.out.println("Refunding Order...");
+ HttpResponse refundHttpResponse = new RefundOrder().refundOrder(((Capture)captureOrderResponse.result()).id(), false);
+ if (refundHttpResponse.statusCode() == 201) {
+ System.out.println("Refunded Successfully");
+ System.out.println("Status Code: " + refundHttpResponse.statusCode());
+ System.out.println("Status: " + ((Refund)refundHttpResponse.result()).status());
+ System.out.println("Order ID: " + ((Refund)refundHttpResponse.result()).id());
+ System.out.println("Links: ");
+ for (com.paypal.payments.LinkDescription link : (Iterable)((Refund)refundHttpResponse.result()).links())
+ System.out.println("\t" + link.rel() + ": " + link.href() + "\tCall Type: " + link.method());
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/CaptureIntentExamples/CaptureOrder.java b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/CaptureIntentExamples/CaptureOrder.java
new file mode 100644
index 00000000..994dfad2
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/CaptureIntentExamples/CaptureOrder.java
@@ -0,0 +1,55 @@
+package com.paypal.CaptureIntentExamples;
+
+import com.paypal.PayPalClient;
+import com.paypal.http.HttpRequest;
+import com.paypal.http.HttpResponse;
+import com.paypal.http.serializer.Json;
+import com.paypal.orders.Capture;
+import com.paypal.orders.LinkDescription;
+import com.paypal.orders.Order;
+import com.paypal.orders.OrderRequest;
+import com.paypal.orders.OrdersCaptureRequest;
+import com.paypal.orders.Payer;
+import com.paypal.orders.PurchaseUnit;
+import java.io.IOException;
+import org.json.JSONObject;
+
+public class CaptureOrder extends PayPalClient {
+ public OrderRequest buildRequestBody() {
+ return new OrderRequest();
+ }
+
+ public HttpResponse captureOrder(String orderId, boolean debug) throws IOException {
+ OrdersCaptureRequest request = new OrdersCaptureRequest(orderId);
+ request.requestBody(buildRequestBody());
+ HttpResponse response = client().execute((HttpRequest)request);
+ if (debug) {
+ System.out.println("Status Code: " + response.statusCode());
+ System.out.println("Status: " + ((Order)response.result()).status());
+ System.out.println("Order ID: " + ((Order)response.result()).id());
+ System.out.println("Links: ");
+ for (LinkDescription link : (Iterable)((Order)response.result()).links())
+ System.out.println("\t" + link.rel() + ": " + link.href());
+ System.out.println("Capture ids:");
+ for (PurchaseUnit purchaseUnit : (Iterable)((Order)response.result()).purchaseUnits()) {
+ for (Capture capture : (Iterable)purchaseUnit.payments().captures())
+ System.out.println("\t" + capture.id());
+ }
+ System.out.println("Buyer: ");
+ Payer buyer = ((Order)response.result()).payer();
+ System.out.println("\tEmail Address: " + buyer.email());
+ System.out.println("\tName: " + buyer.name().givenName() + " " + buyer.name().surname());
+ System.out.println("Full response body:");
+ System.out.println(new JSONObject(new Json().serialize(response.result())).toString(4));
+ }
+ return response;
+ }
+
+ public static void main(String[] args) {
+ try {
+ new CaptureOrder().captureOrder("<>", true);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/CaptureIntentExamples/CreateOrder.java b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/CaptureIntentExamples/CreateOrder.java
new file mode 100644
index 00000000..a72c08cd
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/CaptureIntentExamples/CreateOrder.java
@@ -0,0 +1,93 @@
+package com.paypal.CaptureIntentExamples;
+
+import com.paypal.PayPalClient;
+import com.paypal.http.HttpRequest;
+import com.paypal.http.HttpResponse;
+import com.paypal.http.exceptions.HttpException;
+import com.paypal.http.serializer.Json;
+import com.paypal.orders.AddressPortable;
+import com.paypal.orders.AmountBreakdown;
+import com.paypal.orders.AmountWithBreakdown;
+import com.paypal.orders.ApplicationContext;
+import com.paypal.orders.Item;
+import com.paypal.orders.LinkDescription;
+import com.paypal.orders.Money;
+import com.paypal.orders.Name;
+import com.paypal.orders.Order;
+import com.paypal.orders.OrderRequest;
+import com.paypal.orders.OrdersCreateRequest;
+import com.paypal.orders.PurchaseUnitRequest;
+import com.paypal.orders.ShippingDetail;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import org.json.JSONObject;
+
+public class CreateOrder extends PayPalClient {
+ private OrderRequest buildRequestBody() {
+ OrderRequest orderRequest = new OrderRequest();
+ orderRequest.checkoutPaymentIntent("CAPTURE");
+ ApplicationContext applicationContext = new ApplicationContext().brandName("EXAMPLE INC").landingPage("BILLING")
+ .cancelUrl("https://www.example.com").returnUrl("https://www.example.com").userAction("CONTINUE")
+ .shippingPreference("SET_PROVIDED_ADDRESS");
+ orderRequest.applicationContext(applicationContext);
+ List purchaseUnitRequests = new ArrayList<>();
+ PurchaseUnitRequest purchaseUnitRequest = new PurchaseUnitRequest().referenceId("PUHF")
+ .description("Sporting Goods").customId("CUST-HighFashions").softDescriptor("HighFashions")
+ .amountWithBreakdown(new AmountWithBreakdown().currencyCode("USD").value("220.00")
+ .amountBreakdown(new AmountBreakdown().itemTotal(new Money().currencyCode("USD").value("180.00"))
+ .shipping(new Money().currencyCode("USD").value("20.00"))
+ .handling(new Money().currencyCode("USD").value("10.00"))
+ .taxTotal(new Money().currencyCode("USD").value("20.00"))
+ .shippingDiscount(new Money().currencyCode("USD").value("10.00"))))
+ .items(new ArrayList<>() {
+ {
+ add(new Item().name("T-shirt").description("Green XL").sku("sku01")
+ .unitAmount(new Money().currencyCode("USD").value("90.00"))
+ .tax(new Money().currencyCode("USD").value("10.00")).quantity("1")
+ .category("PHYSICAL_GOODS"));
+ add(new Item().name("Shoes").description("Running, Size 10.5").sku("sku02")
+ .unitAmount(new Money().currencyCode("USD").value("45.00"))
+ .tax(new Money().currencyCode("USD").value("5.00")).quantity("2")
+ .category("PHYSICAL_GOODS"));
+ }
+ }).shippingDetail(new ShippingDetail().name(new Name().fullName("John Doe"))
+ .addressPortable(new AddressPortable().addressLine1("123 Townsend St").addressLine2("Floor 6")
+ .adminArea2("San Francisco").adminArea1("CA").postalCode("94107").countryCode("US")));
+ purchaseUnitRequests.add(purchaseUnitRequest);
+ orderRequest.purchaseUnits(purchaseUnitRequests);
+ return orderRequest;
+ }
+
+ public HttpResponse createOrder(boolean debug) throws IOException {
+ OrdersCreateRequest request = new OrdersCreateRequest();
+ request.header("prefer", "return=representation");
+ request.requestBody(buildRequestBody());
+ HttpResponse response = client().execute((HttpRequest)request);
+ if (debug &&
+ response.statusCode() == 201) {
+ System.out.println("Status Code: " + response.statusCode());
+ System.out.println("Status: " + ((Order)response.result()).status());
+ System.out.println("Order ID: " + ((Order)response.result()).id());
+ System.out.println("Intent: " + ((Order)response.result()).checkoutPaymentIntent());
+ System.out.println("Links: ");
+ for (LinkDescription link : (Iterable)((Order)response.result()).links())
+ System.out.println("\t" + link.rel() + ": " + link.href() + "\tCall Type: " + link.method());
+ System.out.println("Total Amount: " + ((Order)response.result()).purchaseUnits().get(0).amountWithBreakdown().currencyCode() + " " + ((Order)
+ response.result()).purchaseUnits().get(0).amountWithBreakdown().value());
+ System.out.println("Full response body:");
+ System.out.println(new JSONObject(new Json().serialize(response.result())).toString(4));
+ }
+ return response;
+ }
+
+ public static void main(String[] args) {
+ try {
+ new CreateOrder().createOrder(true);
+ } catch (HttpException e) {
+ System.out.println(e.getLocalizedMessage());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/CaptureIntentExamples/RunAll.java b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/CaptureIntentExamples/RunAll.java
new file mode 100644
index 00000000..d94cfe00
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/CaptureIntentExamples/RunAll.java
@@ -0,0 +1,60 @@
+package com.paypal.CaptureIntentExamples;
+
+import com.paypal.AuthorizeIntentExamples.RefundOrder;
+import com.paypal.http.HttpResponse;
+import com.paypal.orders.Capture;
+import com.paypal.orders.LinkDescription;
+import com.paypal.orders.Order;
+import com.paypal.orders.PurchaseUnit;
+import com.paypal.payments.Refund;
+
+public class RunAll {
+ public static void main(String[] args) {
+ try {
+ HttpResponse orderResponse = new CreateOrder().createOrder(false);
+ String orderId = "";
+ System.out.println("Creating Order...");
+ if (orderResponse.statusCode() == 201) {
+ orderId = ((Order)orderResponse.result()).id();
+ System.out.println("Links:");
+ for (LinkDescription link : (Iterable)((Order)orderResponse.result()).links())
+ System.out.println("\t" + link.rel() + ": " + link.href());
+ }
+ System.out.println("Created Successfully\n");
+ System.out.println("Copy approve link and paste it in browser. Login with buyer account and follow the instructions.\nOnce approved hit enter...");
+ System.in.read();
+ System.out.println("Capturing Order...");
+ orderResponse = new CaptureOrder().captureOrder(orderId, false);
+ String captureId = "";
+ if (orderResponse.statusCode() == 201) {
+ System.out.println("Captured Successfully");
+ System.out.println("Status Code: " + orderResponse.statusCode());
+ System.out.println("Status: " + ((Order)orderResponse.result()).status());
+ System.out.println("Order ID: " + ((Order)orderResponse.result()).id());
+ System.out.println("Links:");
+ for (LinkDescription link : (Iterable)((Order)orderResponse.result()).links())
+ System.out.println("\t" + link.rel() + ": " + link.href());
+ System.out.println("Capture ids:");
+ for (PurchaseUnit purchaseUnit : (Iterable)((Order)orderResponse.result()).purchaseUnits()) {
+ for (Capture capture : (Iterable)purchaseUnit.payments().captures()) {
+ System.out.println("\t" + capture.id());
+ captureId = capture.id();
+ }
+ }
+ }
+ System.out.println("Refunding Order...");
+ HttpResponse refundResponse = new RefundOrder().refundOrder(captureId, false);
+ if (refundResponse.statusCode() == 201) {
+ System.out.println("Refunded Successfully");
+ System.out.println("Status Code: " + refundResponse.statusCode());
+ System.out.println("Status: " + ((Refund)refundResponse.result()).status());
+ System.out.println("Refund ID: " + ((Refund)refundResponse.result()).id());
+ System.out.println("Links:");
+ for (com.paypal.payments.LinkDescription link : (Iterable)((Refund)refundResponse.result()).links())
+ System.out.println("\t" + link.rel() + ": " + link.href());
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/ErrorSample.java b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/ErrorSample.java
new file mode 100644
index 00000000..b49101d6
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/ErrorSample.java
@@ -0,0 +1,59 @@
+package com.paypal;
+
+import com.paypal.http.HttpRequest;
+import com.paypal.http.HttpResponse;
+import com.paypal.http.exceptions.HttpException;
+import com.paypal.orders.AmountWithBreakdown;
+import com.paypal.orders.OrderRequest;
+import com.paypal.orders.OrdersCreateRequest;
+import com.paypal.orders.PurchaseUnitRequest;
+import java.io.IOException;
+import java.util.ArrayList;
+import org.json.JSONObject;
+
+public class ErrorSample extends PayPalClient {
+ public void createError1() {
+ OrdersCreateRequest request = new OrdersCreateRequest();
+ request.requestBody(new OrderRequest());
+ System.out.println("Request Body: {}\n");
+ System.out.println("Response:");
+ try {
+ HttpResponse httpResponse = this.client.execute((HttpRequest)request);
+ } catch (IOException e) {
+ HttpException h = (HttpException)e;
+ JSONObject message = new JSONObject(h.getMessage());
+ System.out.println(prettyPrint(message, ""));
+ System.out.println();
+ }
+ }
+
+ public void createError2() {
+ OrdersCreateRequest request = new OrdersCreateRequest();
+ request.requestBody(new OrderRequest()
+ .checkoutPaymentIntent("INVALID")
+ .purchaseUnits(new ArrayList<>() {
+ {
+ add(new PurchaseUnitRequest().amountWithBreakdown(new AmountWithBreakdown().currencyCode("USD").value("100.00")));
+ }
+ }));
+ System.out.println("Request Body:");
+ System.out.println("{\n\"intent\": \"INVALID\",\n\"purchase_units\": [\n{\n\"amount\": {\n\"currency_code\": \"USD\",\n\"value\": \"100.00\"\n}\n}\n]\n}\n");
+ System.out.println("Response:");
+ try {
+ HttpResponse httpResponse = this.client.execute((HttpRequest)request);
+ } catch (IOException e) {
+ HttpException h = (HttpException)e;
+ JSONObject message = new JSONObject(h.getMessage());
+ System.out.println(prettyPrint(message, ""));
+ System.out.println();
+ }
+ }
+
+ public static void main(String[] args) {
+ ErrorSample errorSample = new ErrorSample();
+ System.out.println("Calling createError1 (Body has no required parameters (intent, purchase_units))");
+ errorSample.createError1();
+ System.out.println("Calling createError2 (Body has invalid parameter value for intent)");
+ errorSample.createError2();
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/GetOrder.java b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/GetOrder.java
new file mode 100644
index 00000000..3e86eb4a
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/GetOrder.java
@@ -0,0 +1,24 @@
+package com.paypal;
+
+import com.paypal.AuthorizeIntentExamples.CreateOrder;
+import com.paypal.http.HttpRequest;
+import com.paypal.http.HttpResponse;
+import com.paypal.http.serializer.Json;
+import com.paypal.orders.Order;
+import com.paypal.orders.OrdersGetRequest;
+import java.io.IOException;
+import org.json.JSONObject;
+
+public class GetOrder extends PayPalClient {
+ public void getOrder(String orderId) throws IOException {
+ OrdersGetRequest request = new OrdersGetRequest(orderId);
+ HttpResponse response = client().execute((HttpRequest)request);
+ System.out.println("Full response body:");
+ System.out.println(new JSONObject(new Json().serialize(response.result())).toString(4));
+ }
+
+ public static void main(String[] args) throws IOException {
+ HttpResponse response = new CreateOrder().createOrder(false);
+ new GetOrder().getOrder(((Order)response.result()).id());
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/PatchOrder.java b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/PatchOrder.java
new file mode 100644
index 00000000..56f13e78
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/PatchOrder.java
@@ -0,0 +1,55 @@
+package com.paypal;
+
+import com.paypal.AuthorizeIntentExamples.CreateOrder;
+import com.paypal.http.HttpRequest;
+import com.paypal.http.HttpResponse;
+import com.paypal.http.serializer.Json;
+import com.paypal.orders.AmountBreakdown;
+import com.paypal.orders.AmountWithBreakdown;
+import com.paypal.orders.LinkDescription;
+import com.paypal.orders.Money;
+import com.paypal.orders.Order;
+import com.paypal.orders.OrdersGetRequest;
+import com.paypal.orders.OrdersPatchRequest;
+import com.paypal.orders.Patch;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import org.json.JSONObject;
+
+public class PatchOrder extends PayPalClient {
+ private List buildRequestBody() throws IOException {
+ List patches = new ArrayList<>();
+ patches.add(new Patch().op("replace").path("/intent").value("CAPTURE"));
+ patches.add(new Patch().op("replace").path("/purchase_units/@reference_id=='PUHF'/amount")
+ .value(new AmountWithBreakdown().currencyCode("USD").value("200.00")
+ .amountBreakdown(new AmountBreakdown().itemTotal(new Money().currencyCode("USD").value("180.00"))
+ .taxTotal(new Money().currencyCode("USD").value("20.00")))));
+ return patches;
+ }
+
+ public void patchOrder(String orderId) throws IOException {
+ OrdersPatchRequest request = new OrdersPatchRequest(orderId);
+ request.requestBody(buildRequestBody());
+ client().execute((HttpRequest)request);
+ OrdersGetRequest getRequest = new OrdersGetRequest(orderId);
+ HttpResponse response = this.client.execute((HttpRequest)getRequest);
+ System.out.println("After Patch:");
+ System.out.println("Order ID: " + ((Order)response.result()).id());
+ System.out.println("Intent: " + ((Order)response.result()).checkoutPaymentIntent());
+ System.out.println("Links: ");
+ for (LinkDescription link : (Iterable)((Order)response.result()).links())
+ System.out.println("\t" + link.rel() + ": " + link.href() + "\tCall Type: " + link.method());
+ System.out.println("Gross Amount: " + ((Order)response.result()).purchaseUnits().get(0).amountWithBreakdown().currencyCode() + " " + ((Order)
+ response.result()).purchaseUnits().get(0).amountWithBreakdown().value());
+ System.out.println("Full response body:");
+ System.out.println(new JSONObject(new Json().serialize(response.result())).toString(4));
+ }
+
+ public static void main(String[] args) throws IOException {
+ System.out.println("Before PATCH:");
+ HttpResponse response = new CreateOrder().createOrder(true);
+ System.out.println("\nAfter PATCH (Changed Intent and Amount):");
+ new PatchOrder().patchOrder(((Order)response.result()).id());
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/PayPalClient.java b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/PayPalClient.java
new file mode 100644
index 00000000..a56389cd
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/com/paypal/PayPalClient.java
@@ -0,0 +1,44 @@
+package com.paypal;
+
+import com.paypal.core.PayPalEnvironment;
+import com.paypal.core.PayPalHttpClient;
+import java.util.Iterator;
+import org.apache.commons.lang3.StringUtils;
+import org.json.JSONObject;
+
+public class PayPalClient {
+ private PayPalEnvironment environment = new PayPalEnvironment.Sandbox(
+ (System.getProperty("PAYPAL_CLIENT_ID") != null) ? System.getProperty("PAYPAL_CLIENT_ID") :
+ "<>",
+ (System.getProperty("PAYPAL_CLIENT_SECRET") != null) ? System.getProperty("PAYPAL_CLIENT_SECRET") :
+ "<>");
+
+ PayPalHttpClient client = new PayPalHttpClient(this.environment);
+
+ public PayPalHttpClient client() {
+ return this.client;
+ }
+
+ public String prettyPrint(JSONObject jo, String pre) {
+ Iterator> keys = jo.keys();
+ StringBuilder pretty = new StringBuilder();
+ while (keys.hasNext()) {
+ String key = (String)keys.next();
+ pretty.append(String.format("%s%s: ", pre, StringUtils.capitalize(key)));
+ if (jo.get(key) instanceof JSONObject) {
+ pretty.append(prettyPrint(jo.getJSONObject(key), pre + "\t"));
+ continue;
+ }
+ if (jo.get(key) instanceof org.json.JSONArray) {
+ int sno = 1;
+ for (Object jsonObject : (Iterable)jo.getJSONArray(key)) {
+ pretty.append(String.format("\n%s\t%d:\n", pre, sno++));
+ pretty.append(prettyPrint((JSONObject)jsonObject, pre + "\t\t"));
+ }
+ continue;
+ }
+ pretty.append(String.format("%s\n", jo.getString(key)));
+ }
+ return pretty.toString();
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/_BankAdapter.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/_BankAdapter.java
new file mode 100644
index 00000000..615c7aab
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/_BankAdapter.java
@@ -0,0 +1,25 @@
+package it.acxent.bank;
+
+import it.acxent.common.Parm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.Debug;
+
+public abstract class _BankAdapter extends Debug {
+ private ApplParmFull ap;
+
+ public static final String DEFAULT_OK_KO_PAGE = "payRes.jsp";
+
+ public ApplParmFull getApFull() {
+ return this.ap;
+ }
+
+ public void setAp(ApplParmFull ap) {
+ this.ap = ap;
+ }
+
+ public Parm getParm(String theKey) {
+ if (getApFull() != null)
+ return getApFull().getParm(theKey);
+ return new Parm();
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/consel/ConselReq.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/consel/ConselReq.java
new file mode 100644
index 00000000..de7c0598
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/consel/ConselReq.java
@@ -0,0 +1,323 @@
+package it.acxent.bank.consel;
+
+import it.acxent.common.Parm;
+import it.acxent.common.StatusMsg;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+
+public class ConselReq {
+ public static final String P_COD_TIPO_PRODOTTO_CONSEL = "COD_TIPO_PRODOTTO_CONSEL";
+
+ private String tipoesec;
+
+ private String tabfin;
+
+ private String cognome;
+
+ private String nome;
+
+ private String indirizzo;
+
+ private String tel_num;
+
+ private String pref_num;
+
+ private String data_nascita;
+
+ private String testomail;
+
+ private ApplParmFull ap;
+
+ private String ordine;
+
+ private String descri1;
+
+ private String parz1;
+
+ private String h_merce;
+
+ private String h_prod;
+
+ private String convenz;
+
+ private String impdafin;
+
+ public static final String CONSEL_TAB_FIN_90 = "WIP";
+
+ private double anticipo;
+
+ private String impspe;
+
+ private String codfisc;
+
+ public static final String P_CONSEL_IMPORTO_MINIMO = "CONSEL_IMPORTO_MINIMO";
+
+ public static final String P_CONSEL_TEST = "CONSEL_TEST";
+
+ public static final String P_CONSEL_OK_PAGE = "CONSEL_OK_PAGE";
+
+ public static final String CONSEL_TAB_FIN_TASSO_0 = "MPF";
+
+ public static final String CONSEL_TAB_FIN_30 = "WIN";
+
+ public static final String CONSEL_REQUEST_SERVER = "https://reserved.e-consel.it/DOL/faces/frmECProntoTuo.jsp";
+
+ public static final String P_COD_TIPO_MERCE_CONSEL = "COD_TIPO_MERCE_CONSEL";
+
+ public static final String P_COD_CONVENZIONE_CONSEL = "COD_CONVENZIONE_CONSEL";
+
+ public static final String P_CONSEL_ERROR_PAGE = "CONSEL_ERROR_PAGE";
+
+ public static final String P_CONSEL_RATA0 = "CONSEL_RATA0";
+
+ public ConselReq(ApplParmFull l_ap) {
+ setAp(l_ap);
+ }
+
+ public ConselReq() {}
+
+ public String getTipoesec() {
+ return "T";
+ }
+
+ public void setTipoesec(String tipoesec) {
+ this.tipoesec = tipoesec;
+ }
+
+ public String getTabfin() {
+ return (this.tabfin == null) ? "" : this.tabfin.trim();
+ }
+
+ public void setTabfin(String tabfin) {
+ this.tabfin = tabfin;
+ }
+
+ public String getCognome() {
+ return (this.cognome == null) ? "" : this.cognome.trim();
+ }
+
+ public void setCognome(String cognome) {
+ this.cognome = cognome;
+ }
+
+ public String getNome() {
+ return (this.nome == null) ? "" : this.nome.trim();
+ }
+
+ public void setNome(String nome) {
+ this.nome = nome;
+ }
+
+ public String getIndirizzo() {
+ return (this.indirizzo == null) ? "" : this.indirizzo.trim();
+ }
+
+ public void setIndirizzo(String indirizzo) {
+ this.indirizzo = indirizzo;
+ }
+
+ public String getTel_num() {
+ return (this.tel_num == null) ? "" : this.tel_num.trim();
+ }
+
+ public void setTel_num(String tel_num) {
+ this.tel_num = tel_num;
+ }
+
+ public String getPref_num() {
+ return (this.pref_num == null) ? "" : this.pref_num.trim();
+ }
+
+ public void setPref_num(String pref_num) {
+ this.pref_num = pref_num;
+ }
+
+ public String getData_nascita() {
+ return (this.data_nascita == null) ? "" : this.data_nascita.trim();
+ }
+
+ public void setData_nascita(String data_nascita) {
+ this.data_nascita = data_nascita;
+ }
+
+ public String getTestomail() {
+ return (this.testomail == null) ? "" : this.testomail.trim();
+ }
+
+ public void setTestomail(String testomail) {
+ this.testomail = testomail;
+ }
+
+ public String getCodfisc() {
+ return (this.codfisc == null) ? "" : this.codfisc.trim();
+ }
+
+ public void setCodfisc(String codfisc) {
+ this.codfisc = codfisc;
+ }
+
+ public String getOrdine() {
+ return (this.ordine == null) ? "" : this.ordine.trim();
+ }
+
+ public void setOrdine(String ordine) {
+ this.ordine = ordine;
+ }
+
+ public String getDescri1() {
+ return (this.descri1 == null) ? "" : this.descri1.trim();
+ }
+
+ public void setDescri1(String descri1) {
+ this.descri1 = descri1;
+ }
+
+ public String getParz1() {
+ return (this.parz1 == null) ? "" : this.parz1;
+ }
+
+ public void setParz1(String parz1) {
+ this.parz1 = parz1;
+ }
+
+ public String getH_merce() {
+ if (this.h_merce == null)
+ this.h_merce = getApFull().getParm("COD_TIPO_MERCE_CONSEL").getTesto();
+ return this.h_merce;
+ }
+
+ public void setH_merce(String h_merce) {
+ this.h_merce = h_merce;
+ }
+
+ public String getH_prod() {
+ if (this.h_prod == null)
+ this.h_prod = getApFull().getParm("COD_TIPO_PRODOTTO_CONSEL").getTesto();
+ return this.h_prod;
+ }
+
+ public void setH_prod(String h_prod) {
+ this.h_prod = h_prod;
+ }
+
+ public String getConvenz() {
+ if (this.convenz == null)
+ this.convenz = getApFull().getParm("COD_CONVENZIONE_CONSEL").getTesto().trim();
+ return this.convenz;
+ }
+
+ public void setConvenz(String convenz) {
+ this.convenz = convenz;
+ }
+
+ public String getImpdafin() {
+ return (this.impdafin == null) ? "" : this.impdafin;
+ }
+
+ public void setImpdafin(String impdafin) {
+ this.impdafin = impdafin;
+ }
+
+ public double getAnticipo() {
+ return this.anticipo;
+ }
+
+ public void setAnticipo(double anticipo) {
+ this.anticipo = anticipo;
+ }
+
+ public static void initApplicationParms(ApplParmFull ap) {
+ if (ap != null) {
+ DBAdapter.logDebug(true, "CONSEL chechout initParms: start");
+ String l_tipoParm = "";
+ Parm bean = new Parm(ap);
+ l_tipoParm = "CONSEL";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("COD_CONVENZIONE_CONSEL");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("COD_CONVENZIONE_CONSEL");
+ bean.setDescrizione("COD_CONVENZIONE_CONSEL");
+ bean.setFlgTipo(0L);
+ bean.setNota("CODICE CONVENZIONE CONSEL");
+ bean.save();
+ bean.findByCodice("COD_TIPO_MERCE_CONSEL");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("COD_TIPO_MERCE_CONSEL");
+ bean.setDescrizione("COD_TIPO_MERCE_CONSEL");
+ bean.setFlgTipo(0L);
+ bean.setNota("CODICE INDICATIVO MERCE FINANZIATA ");
+ bean.save();
+ bean.findByCodice("COD_TIPO_PRODOTTO_CONSEL");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("COD_TIPO_PRODOTTO_CONSEL");
+ bean.setDescrizione("COD_TIPO_PRODOTTO_CONSEL");
+ bean.setFlgTipo(0L);
+ bean.setNota("CODICE INDICATIVO PRODOTTO FINANZIATO");
+ bean.save();
+ bean.findByCodice("CONSEL_ERROR_PAGE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CONSEL_ERROR_PAGE");
+ bean.setDescrizione("CONSEL_ERROR_PAGE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("conselRes.jsp");
+ bean.setNota("CONSEL_ERROR_PAGE");
+ bean.save();
+ bean.findByCodice("CONSEL_OK_PAGE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CONSEL_OK_PAGE");
+ bean.setDescrizione("CONSEL_OK_PAGE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("conselRes.jsp");
+ bean.setNota("CONSEL_OK_PAGE");
+ bean.save();
+ bean.findByCodice("CONSEL_TEST");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CONSEL_TEST");
+ bean.setDescrizione("CONSEL_TEST");
+ bean.setFlgTipo(1L);
+ bean.setNota("0-->NO 1-->SI");
+ bean.save();
+ bean.findByCodice("CONSEL_IMPORTO_MINIMO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CONSEL_IMPORTO_MINIMO");
+ bean.setDescrizione("CONSEL_IMPORTO_MINIMO");
+ bean.setFlgTipo(1L);
+ bean.setNota("CONSEL_IMPORTO_MINIMO");
+ bean.save();
+ bean.findByCodice("CONSEL_RATA0");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CONSEL_RATA0");
+ bean.setDescrizione("CONSEL_RATA0");
+ bean.setFlgTipo(1L);
+ bean.setNota(" ATTIVA ANCHE RATA 0 SOPRA L'IMPORTO DEFINITO DA CONSEL_IMPORTO_MINIMO 0: RATA 0 NON ATTIVA 1: RATA 0 ATTIVA");
+ bean.save();
+ DBAdapter.logDebug(true, "CONSEL chechout initParms: stop");
+ }
+ }
+
+ public String getImpspe() {
+ return (this.impspe == null) ? "" : this.impspe;
+ }
+
+ public void setImpspe(String impspe) {
+ this.impspe = impspe;
+ }
+
+ public ApplParmFull getApFull() {
+ return this.ap;
+ }
+
+ public void setAp(ApplParmFull ap) {
+ this.ap = ap;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/consel/ConselResp.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/consel/ConselResp.java
new file mode 100644
index 00000000..7373c4a3
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/consel/ConselResp.java
@@ -0,0 +1,67 @@
+package it.acxent.bank.consel;
+
+import it.acxent.db.ApplParmFull;
+
+public class ConselResp {
+ private String pratica;
+
+ private ApplParmFull ap;
+
+ private String ordine;
+
+ private String praticabis;
+
+ private String stato;
+
+ public static final String CONSEL_VALUTAZIONE = "WW";
+
+ public static final String CONSEL_KO = "KO";
+
+ public static final String CONSEL_OK = "OK";
+
+ public ConselResp(ApplParmFull l_ap) {
+ setAp(l_ap);
+ }
+
+ public ConselResp() {}
+
+ public String getOrdine() {
+ return (this.ordine == null) ? "" : this.ordine.trim();
+ }
+
+ public void setOrdine(String ordine) {
+ this.ordine = ordine;
+ }
+
+ public ApplParmFull getApFull() {
+ return this.ap;
+ }
+
+ public void setAp(ApplParmFull ap) {
+ this.ap = ap;
+ }
+
+ public String getPratica() {
+ return (this.pratica == null) ? "" : this.pratica.trim();
+ }
+
+ public void setPratica(String pratica) {
+ this.pratica = pratica;
+ }
+
+ public String getPraticabis() {
+ return (this.praticabis == null) ? "" : this.praticabis.trim();
+ }
+
+ public void setPraticabis(String praticabis) {
+ this.praticabis = praticabis;
+ }
+
+ public String getStato() {
+ return (this.stato == null) ? "" : this.stato.trim();
+ }
+
+ public void setStato(String stato) {
+ this.stato = stato;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/consel/ConselTabfin.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/consel/ConselTabfin.java
new file mode 100644
index 00000000..d5211965
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/consel/ConselTabfin.java
@@ -0,0 +1,184 @@
+package it.acxent.bank.consel;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class ConselTabfin extends DBAdapter implements Serializable {
+ public static final double MIN_FIN = 168.0D;
+
+ public static final double MAX_FIN = 7500.0D;
+
+ private long id_conselTabfin;
+
+ private String flgTipo;
+
+ private double valoreBene;
+
+ private long durata;
+
+ private double importoRata;
+
+ private double tan;
+
+ private double taeg;
+
+ private double interessi;
+
+ private double speseGestSingolaRata;
+
+ private double speseGestTotaleRata;
+
+ private double impostaBollo;
+
+ private double importoTotaleDovuto;
+
+ public ConselTabfin(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public ConselTabfin() {}
+
+ public void setId_conselTabfin(long newId_conselTabfin) {
+ this.id_conselTabfin = newId_conselTabfin;
+ }
+
+ public void setFlgTipo(String newFlgTipo) {
+ this.flgTipo = newFlgTipo;
+ }
+
+ public void setValoreBene(double newValoreBene) {
+ this.valoreBene = newValoreBene;
+ }
+
+ public void setDurata(long newDurata) {
+ this.durata = newDurata;
+ }
+
+ public void setImportoRata(double newImportoRata) {
+ this.importoRata = newImportoRata;
+ }
+
+ public void setTan(double newTan) {
+ this.tan = newTan;
+ }
+
+ public void setTaeg(double newTaeg) {
+ this.taeg = newTaeg;
+ }
+
+ public void setInteressi(double newInteressi) {
+ this.interessi = newInteressi;
+ }
+
+ public void setSpeseGestSingolaRata(double newSpeseGestSingolaRata) {
+ this.speseGestSingolaRata = newSpeseGestSingolaRata;
+ }
+
+ public void setSpeseGestTotaleRata(double newSpeseGestTotaleRata) {
+ this.speseGestTotaleRata = newSpeseGestTotaleRata;
+ }
+
+ public void setImpostaBollo(double newImpostaBollo) {
+ this.impostaBollo = newImpostaBollo;
+ }
+
+ public void setImportoTotaleDovuto(double newImportoTotaleDovuto) {
+ this.importoTotaleDovuto = newImportoTotaleDovuto;
+ }
+
+ public long getId_conselTabfin() {
+ return this.id_conselTabfin;
+ }
+
+ public String getFlgTipo() {
+ return (this.flgTipo == null) ? "" : this.flgTipo.trim();
+ }
+
+ public double getValoreBene() {
+ return this.valoreBene;
+ }
+
+ public long getDurata() {
+ return this.durata;
+ }
+
+ public double getImportoRata() {
+ return this.importoRata;
+ }
+
+ public double getTan() {
+ return this.tan;
+ }
+
+ public double getTaeg() {
+ return this.taeg;
+ }
+
+ public double getInteressi() {
+ return this.interessi;
+ }
+
+ public double getSpeseGestSingolaRata() {
+ return this.speseGestSingolaRata;
+ }
+
+ public double getSpeseGestTotaleRata() {
+ return this.speseGestTotaleRata;
+ }
+
+ public double getImpostaBollo() {
+ return this.impostaBollo;
+ }
+
+ public double getImportoTotaleDovuto() {
+ return this.importoTotaleDovuto;
+ }
+
+ protected ResParm checkDeleteCascade() {
+ return new ResParm(true);
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(ConselTabfinCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from CONSEL_TABFIN AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (CR.getValoreBene() > 0.0D)
+ wc.addWc("A.valoreBene=" + CR.getValoreBene());
+ if (!CR.getFlgTipo().isEmpty())
+ wc.addWc("A.flgTipo='" + CR.getFlgTipo() + "'");
+ if (CR.getDurata() > 0L)
+ wc.addWc("A.durata=" + CR.getDurata());
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public void findByTipoValoreDurata(String l_flgTipo, double l_valore, long l_durata) {
+ String s_Sql_Find = "select A.* from CONSEL_TABFIN AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("A.valoreBene=" + Math.round(l_valore));
+ wc.addWc("A.flgTipo='" + l_flgTipo + "'");
+ wc.addWc("A.durata=" + l_durata);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/consel/ConselTabfinCR.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/consel/ConselTabfinCR.java
new file mode 100644
index 00000000..7afba3d7
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/consel/ConselTabfinCR.java
@@ -0,0 +1,132 @@
+package it.acxent.bank.consel;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class ConselTabfinCR extends CRAdapter {
+ private long id_conselTabfin;
+
+ private String flgTipo;
+
+ private double valoreBene;
+
+ private long durata;
+
+ private double importoRata;
+
+ private double tan;
+
+ private double taeg;
+
+ private double interessi;
+
+ private double speseGestSingolaRata;
+
+ private double speseGestTotaleRata;
+
+ private double impostaBollo;
+
+ private double importoTotaleDovuto;
+
+ public ConselTabfinCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public ConselTabfinCR() {}
+
+ public void setId_conselTabfin(long newId_conselTabfin) {
+ this.id_conselTabfin = newId_conselTabfin;
+ }
+
+ public void setFlgTipo(String newFlgTipo) {
+ this.flgTipo = newFlgTipo;
+ }
+
+ public void setValoreBene(double newValoreBene) {
+ this.valoreBene = newValoreBene;
+ }
+
+ public void setDurata(long newDurata) {
+ this.durata = newDurata;
+ }
+
+ public void setImportoRata(double newImportoRata) {
+ this.importoRata = newImportoRata;
+ }
+
+ public void setTan(double newTan) {
+ this.tan = newTan;
+ }
+
+ public void setTaeg(double newTaeg) {
+ this.taeg = newTaeg;
+ }
+
+ public void setInteressi(double newInteressi) {
+ this.interessi = newInteressi;
+ }
+
+ public void setSpeseGestSingolaRata(double newSpeseGestSingolaRata) {
+ this.speseGestSingolaRata = newSpeseGestSingolaRata;
+ }
+
+ public void setSpeseGestTotaleRata(double newSpeseGestTotaleRata) {
+ this.speseGestTotaleRata = newSpeseGestTotaleRata;
+ }
+
+ public void setImpostaBollo(double newImpostaBollo) {
+ this.impostaBollo = newImpostaBollo;
+ }
+
+ public void setImportoTotaleDovuto(double newImportoTotaleDovuto) {
+ this.importoTotaleDovuto = newImportoTotaleDovuto;
+ }
+
+ public long getId_conselTabfin() {
+ return this.id_conselTabfin;
+ }
+
+ public String getFlgTipo() {
+ return (this.flgTipo == null) ? "" : this.flgTipo.trim();
+ }
+
+ public double getValoreBene() {
+ return this.valoreBene;
+ }
+
+ public long getDurata() {
+ return this.durata;
+ }
+
+ public double getImportoRata() {
+ return this.importoRata;
+ }
+
+ public double getTan() {
+ return this.tan;
+ }
+
+ public double getTaeg() {
+ return this.taeg;
+ }
+
+ public double getInteressi() {
+ return this.interessi;
+ }
+
+ public double getSpeseGestSingolaRata() {
+ return this.speseGestSingolaRata;
+ }
+
+ public double getSpeseGestTotaleRata() {
+ return this.speseGestTotaleRata;
+ }
+
+ public double getImpostaBollo() {
+ return this.impostaBollo;
+ }
+
+ public double getImportoTotaleDovuto() {
+ return this.importoTotaleDovuto;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/infogroup/ShopnetReq.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/infogroup/ShopnetReq.java
new file mode 100644
index 00000000..9ebf8b6d
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/infogroup/ShopnetReq.java
@@ -0,0 +1,251 @@
+package it.acxent.bank.infogroup;
+
+import it.acxent.bank._BankAdapter;
+import it.acxent.common.Parm;
+import it.acxent.common.StatusMsg;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import java.text.NumberFormat;
+import java.util.Locale;
+
+public class ShopnetReq extends _BankAdapter {
+ public static final String LANG_CODE_IT = "0";
+
+ public static final String LANG_CODE_EN = "1";
+
+ public static final String LANG_CODE_ES = "2";
+
+ public static final String LANG_CODE_DE = "3";
+
+ public static final String DIV_CODE_EURO = "1";
+
+ private static NumberFormat nf2;
+
+ private String f;
+
+ private String l;
+
+ private String m;
+
+ private String o;
+
+ private String i;
+
+ private String d;
+
+ private String p;
+
+ private String c;
+
+ private String u;
+
+ private String n;
+
+ private String e;
+
+ private String action;
+
+ public static final String P_PAYMENT_ERROR_PAGE = "PAY_KO";
+
+ public static final String P_PAYMENT_OK_PAGE = "PAY_OK";
+
+ public static final long CC_DINERS = 2L;
+
+ public static final long CC_MASTERCARD = 1L;
+
+ public static final long CC_AMEX = 3L;
+
+ public static final long CC_VISA = 0L;
+
+ public static final String P_SHOPNET_PID = "SHOPNET_PID";
+
+ public static final String P_SHOPNET_ID = "SHOPNET_ID";
+
+ public static final String DEFAULT_SHOPNET_ACTION = "https://ecommerce.infogroup.it/shopnetplus/do";
+
+ public ShopnetReq() {}
+
+ public ShopnetReq(String lang) {
+ setlang(lang);
+ }
+
+ private void setlang(String l_lang) {
+ if (l_lang.toLowerCase().equals("it")) {
+ setL("0");
+ } else if (l_lang.toLowerCase().equals("en")) {
+ setL("1");
+ } else if (l_lang.toLowerCase().equals("es\t")) {
+ setL("2");
+ } else {
+ setL("0");
+ }
+ }
+
+ public String getF() {
+ return (this.f == null) ? "" : this.f.trim();
+ }
+
+ public void setF(String f) {
+ this.f = f;
+ }
+
+ public String getL() {
+ return (this.l == null) ? "" : this.l.trim();
+ }
+
+ public void setL(String l) {
+ this.l = l;
+ }
+
+ public String getM() {
+ return (this.m == null) ? "" : this.m.trim();
+ }
+
+ public void setM(String m) {
+ this.m = m;
+ }
+
+ public String getO() {
+ return (this.o == null) ? "" : this.o.trim();
+ }
+
+ public void setO(String o) {
+ this.o = o;
+ }
+
+ public String getI() {
+ return (this.i == null) ? "" : this.i.trim();
+ }
+
+ public void setI(String i) {
+ this.i = i;
+ }
+
+ public String getD() {
+ return (this.d == null) ? "" : this.d.trim();
+ }
+
+ public void setD(String d) {
+ this.d = d;
+ }
+
+ public String getP() {
+ return (this.p == null) ? "" : this.p.trim();
+ }
+
+ public void setP(String p) {
+ this.p = p;
+ }
+
+ public String getC() {
+ return (this.c == null) ? "" : this.c.trim();
+ }
+
+ public void setC(String c) {
+ this.c = c;
+ }
+
+ public String getU() {
+ return (this.u == null) ? "" : this.u.trim();
+ }
+
+ public void setU(String u) {
+ this.u = u;
+ }
+
+ public String getN() {
+ return (this.n == null) ? "" : this.n.trim();
+ }
+
+ public void setN(String n) {
+ this.n = n;
+ }
+
+ public String getE() {
+ return (this.e == null) ? "" : this.e.trim();
+ }
+
+ public void setE(String e) {
+ this.e = e;
+ }
+
+ public String getAction() {
+ return (this.action == null) ? "https://ecommerce.infogroup.it/shopnetplus/do" : this.action.trim();
+ }
+
+ public void setAction(String action) {
+ this.action = action;
+ }
+
+ public void setImporto(double l_importo) {}
+
+ public NumberFormat getNf2() {
+ if (nf2 == null) {
+ nf2 = NumberFormat.getInstance(Locale.ITALIAN);
+ nf2.setMaximumFractionDigits(2);
+ nf2.setMinimumFractionDigits(2);
+ }
+ return nf2;
+ }
+
+ public static void initApplicationParms(ApplParmFull ap) {
+ if (ap != null) {
+ DBAdapter.logDebug(true, "shopnet chechout initParms: start");
+ String l_tipoParm = "SHOPNET";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ Parm bean = new Parm(ap);
+ l_tipoParm = "SHOPNET";
+ bean.findByCodice("PAY_KO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAY_KO");
+ bean.setDescrizione("PAY_KO");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payRes.jsp");
+ bean.setNota("PAY_KO");
+ bean.save();
+ bean.findByCodice("PAY_OK");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAY_OK");
+ bean.setDescrizione("PAY_OK");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payRes.jsp");
+ bean.setNota("PAY_OK");
+ bean.save();
+ bean.findByCodice("SHOPNET_ID");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SHOPNET_ID");
+ bean.setDescrizione("SHOPNET_ID");
+ bean.setFlgTipo(0L);
+ bean.setNota("SHOPNET_ID");
+ bean.save();
+ bean.findByCodice("SHOPNET_PID");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SHOPNET_PID");
+ bean.setDescrizione("SHOPNET_PID");
+ bean.setFlgTipo(0L);
+ bean.setNota("SHOPNET_PID");
+ bean.save();
+ DBAdapter.logDebug(true, "shopnet chechout initParms: stop");
+ }
+ }
+
+ public static final String getCC(long l_cc) {
+ switch ((int)l_cc) {
+ case 3:
+ return "American Express";
+ case 2:
+ return "Diners";
+ case 1:
+ return "Mastercard";
+ case 0:
+ return "Visa";
+ }
+ return "??";
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/infogroup/ShopnetResp.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/infogroup/ShopnetResp.java
new file mode 100644
index 00000000..84590580
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/infogroup/ShopnetResp.java
@@ -0,0 +1,79 @@
+package it.acxent.bank.infogroup;
+
+import it.acxent.bank._BankAdapter;
+
+public class ShopnetResp extends _BankAdapter {
+ private long m;
+
+ private long o;
+
+ private long l;
+
+ private String a;
+
+ private long s;
+
+ private long id_ordine;
+
+ public static final long STATO_TRANS_NON_RICH = 1L;
+
+ public static final long STATO_TRANS_GESTITA = 2L;
+
+ public void fillResponse(String bean) {}
+
+ public long getId_ordine() {
+ return this.id_ordine;
+ }
+
+ public String getA() {
+ return (this.a == null) ? "" : this.a.trim();
+ }
+
+ public void setA(String a) {
+ this.a = a;
+ }
+
+ public long getM() {
+ return this.m;
+ }
+
+ public void setM(long m) {
+ this.m = m;
+ }
+
+ public long getO() {
+ return this.o;
+ }
+
+ public void setO(long o) {
+ this.o = o;
+ }
+
+ public long getL() {
+ return this.l;
+ }
+
+ public void setL(long l) {
+ this.l = l;
+ }
+
+ public long getS() {
+ return this.s;
+ }
+
+ public void setS(long s) {
+ this.s = s;
+ }
+
+ public long getStato() {
+ return getS();
+ }
+
+ public String getCodiceAutorizzazione() {
+ return getA();
+ }
+
+ public void setId_ordine(long id_ordine) {
+ this.id_ordine = id_ordine;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/keyclient/KeyClientReq.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/keyclient/KeyClientReq.java
new file mode 100644
index 00000000..45aafe9d
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/keyclient/KeyClientReq.java
@@ -0,0 +1,346 @@
+package it.acxent.bank.keyclient;
+
+import it.acxent.bank._BankAdapter;
+import it.acxent.common.Parm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.reg.EcDc;
+import java.net.URLEncoder;
+
+public class KeyClientReq extends _BankAdapter {
+ public static final String LANG_CODE_IT = "ITA";
+
+ public static final String LANG_CODE_EN = "ENG";
+
+ public static final String LANG_CODE_ES = "SPA";
+
+ public static final String LANG_CODE_FR = "FRA";
+
+ public static final String LANG_CODE_DE = "GER";
+
+ public static final String LANG_CODE_ITA_ENG = "ITA-ENG";
+
+ public static final String LANG_CODE_JPN = "JPN";
+
+ public static final String DIV_CODE_LIRA = "18";
+
+ public static final String DIV_CODE_EURO = "242";
+
+ public static final String DIV_CODE_STERLINE = "2";
+
+ public static final String DIV_CODE_YEN = "71";
+
+ public static final String DIV_CODE_DOLLARL_HK = "103";
+
+ public static final String DIV_CODE_REAL = "234";
+
+ private String divisa;
+
+ private String codTrans;
+
+ private String mail;
+
+ private String importo;
+
+ private String languageId;
+
+ private String alias;
+
+ private String key;
+
+ private String url;
+
+ private String url_back;
+
+ public static final String P_KC_KEY = "KC_KEY";
+
+ public static final String P_URL_RESPONSE = "KC_URL_RESPONSE";
+
+ public static final String P_KC_ALIAS = "KC_ALIAS";
+
+ public static final String P_PAYMENT_OK_PAGE = "KC_PAY_OK";
+
+ public static final String P_PAYMENT_ERROR_PAGE = "KC_PAY_KO";
+
+ public static final String P_URL_RESPONSE_NULL = "KC_URL_RESPONSE_NULL";
+
+ public static final String TEST_ALIAS = "payment_testm_urlmac";
+
+ public static final String REQ_URL = "https://ecommerce.cim-italia.it/ecomm/DispatcherServlet";
+
+ public static final String DIV_CODE_DOLLARI = "1";
+
+ public String getCodTrans() {
+ return (this.codTrans == null) ? "" : this.codTrans;
+ }
+
+ public void setCodTrans(String myamount) {
+ this.codTrans = myamount;
+ }
+
+ public String getImporto() {
+ return (this.importo == null) ? "" : this.importo;
+ }
+
+ public void setImporto(String mybuyeremail) {
+ this.importo = mybuyeremail;
+ }
+
+ public String getMail() {
+ return (this.mail == null) ? "" : this.mail;
+ }
+
+ public void setMail(String mybuyername) {
+ this.mail = mybuyername;
+ }
+
+ public String getDivisa() {
+ return (this.divisa == null) ? "" : this.divisa;
+ }
+
+ public void setDivisa(String mycurrency) {
+ this.divisa = mycurrency;
+ }
+
+ public String getAlias() {
+ return (this.alias == null) ? "" : this.alias;
+ }
+
+ public void setAlias(String mycustominfo) {
+ this.alias = mycustominfo;
+ }
+
+ private String getMylanguageCode() {
+ if (getLanguageId().toLowerCase().equals("it"))
+ return "ITA";
+ if (getLanguageId().toLowerCase().equals("en"))
+ return "ENG";
+ if (getLanguageId().toLowerCase().equals("es\t"))
+ return "SPA";
+ if (getLanguageId().toLowerCase().equals("fr"))
+ return "FRA";
+ if (getLanguageId().toLowerCase().equals("de"))
+ return "GER";
+ return "";
+ }
+
+ public String getMacEsempio() {
+ String temp = "codTrans=" + getCodTrans() + "divisa=" + getDivisa() + "importo=1esempiodicalcolomac";
+ String res = "";
+ try {
+ res = URLEncoder.encode(EcDc.encode64String(EcDc.cryptMD5Plain(temp)), "UTF-8");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public String getMac() {
+ String temp = "codTrans=" + getCodTrans() + "divisa=" + getDivisa() + "importo=" +
+ getImportoUrl() + getKey();
+ String res = "";
+ try {
+ res = URLEncoder.encode(EcDc.encode64String(EcDc.cryptMD5Plain(temp)), "UTF-8");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public String getLanguageId() {
+ return (this.languageId == null) ? "" : this.languageId;
+ }
+
+ public void setLanguageId(String lang) {
+ this.languageId = lang;
+ }
+
+ public String getFullRequestUrl() {
+ StringBuffer theUrl = new StringBuffer("https://ecommerce.cim-italia.it/ecomm/DispatcherServlet");
+ theUrl.append("alias=");
+ theUrl.append(getAlias());
+ theUrl.append("&importo=");
+ theUrl.append(getImporto());
+ theUrl.append("&divisa=");
+ theUrl.append(getDivisa());
+ theUrl.append("&codTrans=");
+ theUrl.append(getCodTrans());
+ theUrl.append("&mail=");
+ theUrl.append(getMail());
+ theUrl.append("&mac=");
+ try {
+ theUrl.append(URLEncoder.encode(getMac(), "UTF-8"));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ theUrl.append("&languageId=");
+ theUrl.append(getLanguageId());
+ theUrl.append("&url=");
+ theUrl.append(getUrl());
+ if (!getUrl_back().isEmpty()) {
+ theUrl.append("&url_back=");
+ theUrl.append(getUrl_back());
+ }
+ return theUrl.toString();
+ }
+
+ public String getRequestUrl() {
+ StringBuffer theUrl = new StringBuffer("https://ecommerce.cim-italia.it/ecomm/DispatcherServlet");
+ theUrl.append("?alias=");
+ theUrl.append(getAlias());
+ theUrl.append("&importo=");
+ theUrl.append(getImportoUrl());
+ theUrl.append("&divisa=");
+ theUrl.append(getDivisa());
+ theUrl.append("&codTrans=");
+ theUrl.append(getCodTrans());
+ theUrl.append("&mail=");
+ theUrl.append(getMail());
+ theUrl.append("&mac=");
+ try {
+ theUrl.append(URLEncoder.encode(getMac(), "UTF-8"));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ theUrl.append("&languageId=");
+ theUrl.append(getLanguageId());
+ theUrl.append("&url=");
+ theUrl.append(getUrl());
+ if (!getUrl_back().isEmpty()) {
+ theUrl.append("&url_back=");
+ theUrl.append(getUrl_back());
+ }
+ return theUrl.toString();
+ }
+
+ public String getKey() {
+ return this.key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public String getImportoUrl() {
+ if (this.importo == null)
+ return "0000";
+ String temp = this.importo;
+ if (temp.indexOf('.') < 0) {
+ temp = temp + "00";
+ } else if (temp.length() - temp.indexOf('.') < 3) {
+ temp = temp + "0";
+ }
+ return temp.replace(".", "");
+ }
+
+ public String getUrl() {
+ return (this.url == null) ? "" : this.url.trim();
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public String getUrl_back() {
+ return (this.url_back == null) ? "" : this.url_back.trim();
+ }
+
+ public void setUrl_back(String url_back) {
+ this.url_back = url_back;
+ }
+
+ public String getTestRequestUrl() {
+ StringBuffer theUrl = new StringBuffer("https://ecommerce.cim-italia.it/ecomm/DispatcherServlet");
+ theUrl.append("?alias=");
+ theUrl.append("payment_testm_urlmac");
+ theUrl.append("&importo=1");
+ theUrl.append("&divisa=");
+ theUrl.append(getDivisa());
+ theUrl.append("&codTrans=");
+ theUrl.append(getCodTrans());
+ theUrl.append("&mail=");
+ theUrl.append(getMail());
+ theUrl.append("&mac=");
+ try {
+ theUrl.append(URLEncoder.encode(getMacEsempio(), "UTF-8"));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ theUrl.append("&languageId=");
+ theUrl.append(getLanguageId());
+ theUrl.append("&url=");
+ theUrl.append(getUrl());
+ if (!getUrl_back().isEmpty()) {
+ theUrl.append("&url_back=");
+ theUrl.append(getUrl_back());
+ }
+ return theUrl.toString();
+ }
+
+ public static void initApplicationParms(ApplParmFull ap) {
+ if (ap != null) {
+ String l_tipoParm = "PAYPAL";
+ Parm bean = new Parm(ap);
+ l_tipoParm = "KEY CLIENT";
+ bean.findByCodice("KC_PAY_KO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("KC_PAY_KO");
+ bean.setDescrizione("KC_PAY_KO");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payRes.jsp");
+ bean.setNota("KC_PAY_KO");
+ bean.save();
+ bean.findByCodice("KC_PAY_OK");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("KC_PAY_OK");
+ bean.setDescrizione("KC_PAY_OK");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payRes.jsp");
+ bean.setNota("KC_PAY_OK");
+ bean.save();
+ bean.findByCodice("KC_KEY");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("KC_KEY");
+ bean.setDescrizione("KC_KEY");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("esempiodicalcolomac");
+ bean.setNota("KC_KEY. mac di esempio: esempiodicalcolomac");
+ bean.save();
+ bean.findByCodice("KC_ALIAS");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("KC_ALIAS");
+ bean.setDescrizione("KC_ALIAS");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payment_testm_urlmac");
+ bean.setNota("KC_KEY. ALIAS DI TEST: payment_testm_urlmac");
+ bean.save();
+ bean.findByCodice("KC_URL_RESPONSE_NULL");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("KC_URL_RESPONSE_NULL");
+ bean.setDescrizione("KC_URL_RESPONSE_NULL");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("http://localhost/td/RicevutaKC.abl");
+ bean.setNota("KC_PAY_OK");
+ bean.save();
+ bean.findByCodice("KC_URL_RESPONSE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("KC_URL_RESPONSE");
+ bean.setDescrizione("KC_URL_RESPONSE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("http://localhost/td/RicevutaKC.abl");
+ bean.setNota("KC_URL_RESPONSE");
+ bean.save();
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/keyclient/KeyClientResp.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/keyclient/KeyClientResp.java
new file mode 100644
index 00000000..5a398d5d
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/keyclient/KeyClientResp.java
@@ -0,0 +1,149 @@
+package it.acxent.bank.keyclient;
+
+import it.acxent.bank._BankAdapter;
+
+public class KeyClientResp extends _BankAdapter {
+ private long id_ordine;
+
+ private String importo;
+
+ private String data;
+
+ private String divisa;
+
+ private String session_id;
+
+ private String codTrans;
+
+ private String orario;
+
+ private String esito;
+
+ private String codAut;
+
+ private String BRAND;
+
+ private String nome;
+
+ private String cognome;
+
+ private String email;
+
+ private String mac;
+
+ public static final String ESITO_OK = "OK";
+
+ public static final String ESITO_KO = "KO";
+
+ public long getId_ordine() {
+ return this.id_ordine;
+ }
+
+ public void setId_ordine(long id_ordine) {
+ this.id_ordine = id_ordine;
+ }
+
+ public String getImporto() {
+ return this.importo;
+ }
+
+ public void setImporto(String importo) {
+ this.importo = importo;
+ }
+
+ public String getData() {
+ return this.data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getDivisa() {
+ return this.divisa;
+ }
+
+ public void setDivisa(String divisa) {
+ this.divisa = divisa;
+ }
+
+ public String getSession_id() {
+ return this.session_id;
+ }
+
+ public void setSession_id(String session_id) {
+ this.session_id = session_id;
+ }
+
+ public String getCodTrans() {
+ return this.codTrans;
+ }
+
+ public void setCodTrans(String codTrans) {
+ this.codTrans = codTrans;
+ }
+
+ public String getOrario() {
+ return this.orario;
+ }
+
+ public void setOrario(String orario) {
+ this.orario = orario;
+ }
+
+ public String getEsito() {
+ return this.esito;
+ }
+
+ public void setEsito(String esito) {
+ this.esito = esito;
+ }
+
+ public String getCodAut() {
+ return this.codAut;
+ }
+
+ public void setCodAut(String codAut) {
+ this.codAut = codAut;
+ }
+
+ public String getBRAND() {
+ return this.BRAND;
+ }
+
+ public void setBRAND(String brand) {
+ this.BRAND = brand;
+ }
+
+ public String getNome() {
+ return this.nome;
+ }
+
+ public void setNome(String nome) {
+ this.nome = nome;
+ }
+
+ public String getCognome() {
+ return this.cognome;
+ }
+
+ public void setCognome(String cognome) {
+ this.cognome = cognome;
+ }
+
+ public String getEmail() {
+ return this.email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getMac() {
+ return this.mac;
+ }
+
+ public void setMac(String mac) {
+ this.mac = mac;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/paypal/PayPalReq.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/paypal/PayPalReq.java
new file mode 100644
index 00000000..88bb4354
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/paypal/PayPalReq.java
@@ -0,0 +1,292 @@
+package it.acxent.bank.paypal;
+
+import it.acxent.bank._BankAdapter;
+import it.acxent.common.Parm;
+import it.acxent.common.StatusMsg;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import java.net.URLEncoder;
+
+public class PayPalReq extends _BankAdapter {
+ private static final long serialVersionUID = -3355707562295063479L;
+
+ public static final String MTH_SET_EXPRESS_CHECKOUT = "SetExpressCheckout";
+
+ private double amt;
+
+ private long id_ordine;
+
+ private String cancelURL;
+
+ private String returnUrl;
+
+ private String TOKEN;
+
+ private String PAYERID;
+
+ private String SHIPTOCITY;
+
+ private String SHIPTOCOUNTRYCODE;
+
+ private String SHIPTONAME;
+
+ private String SHIPTOSTATE;
+
+ private String SHIPTOSTREET;
+
+ private String SHIPTOZIP;
+
+ private String DESC;
+
+ public static final String P_API_PASSWORD = "PAYPAL_API_PWD";
+
+ public static final String P_API_SIGNATURE = "PAYPAL_API_SIGNATURE";
+
+ public static final String P_API_USE_CERTIFICATE = "PAYPAL_USE_CERTIFICATE";
+
+ public static final String P_API_USERNAME = "PAYPAL_API_USERNAME";
+
+ public static final String P_CANCEL_URL = "PAYPAL_CANCELURL";
+
+ public static final String P_CURRENCY = "PAYPAL_CURRENCY";
+
+ public static final String P_PAGE_STYLE = "PAYPAL_PAGE_STYLE";
+
+ public static final String P_PAYMENT_DETAIL_PAGE = "PAYPAL_DETAIL";
+
+ public static final String P_PAYMENT_ERROR_PAGE = "PAY_PAL_KO";
+
+ public static final String P_PAYMENT_OK_PAGE = "PAYPAL_OK";
+
+ public static final String P_RETURN_URL = "PAYPAL_RETURNURL";
+
+ public static final String MTH_GET_EXPRESS_CHECKOUT_DETAIL = "GetExpressCheckoutDetails";
+
+ public static final String MTH_DO_EXPRESS_CHECKOUT_PAYMENT = "DoExpressCheckoutPayment";
+
+ public static final String CMD_ADDROVERRIDE = "ADDROVVERRIDE=1";
+
+ public static final String CMD_PAGESTILE = "PAGESTYLE";
+
+ public static final String CMD_PAYACT_AUTH = "PAYMENTACTION=Authorization";
+
+ public double getAmt() {
+ return this.amt;
+ }
+
+ public void setAmt(double amt) {
+ this.amt = amt;
+ }
+
+ public String getCancelURL() {
+ return (this.cancelURL == null) ? "" : this.cancelURL;
+ }
+
+ public void setCancelURL(String cancelURL) {
+ this.cancelURL = cancelURL;
+ }
+
+ public String getReturnUrl() {
+ return (this.returnUrl == null) ? "" : this.returnUrl;
+ }
+
+ public void setReturnUrl(String returnUrl) {
+ this.returnUrl = returnUrl;
+ }
+
+ public String getTOKEN() {
+ return (this.TOKEN == null) ? "" : this.TOKEN;
+ }
+
+ public void setTOKEN(String token) {
+ this.TOKEN = token;
+ }
+
+ public String getPAYERID() {
+ return this.PAYERID;
+ }
+
+ public void setPAYERID(String payerid) {
+ this.PAYERID = payerid;
+ }
+
+ public String getSHIPTOCITY() {
+ return (this.SHIPTOCITY == null) ? "" : this.SHIPTOCITY;
+ }
+
+ public String getSHIPTOCOUNTRYCODE() {
+ return (this.SHIPTOCOUNTRYCODE == null) ? "" : this.SHIPTOCOUNTRYCODE;
+ }
+
+ public String getSHIPTONAME() {
+ return (this.SHIPTONAME == null) ? "" : this.SHIPTONAME;
+ }
+
+ public String getSHIPTOSTATE() {
+ return (this.SHIPTOSTATE == null) ? "" : this.SHIPTOSTATE;
+ }
+
+ public String getSHIPTOSTREET() {
+ return (this.SHIPTOSTREET == null) ? "" : this.SHIPTOSTREET;
+ }
+
+ public String getSHIPTOZIP() {
+ return (this.SHIPTOZIP == null) ? "" : this.SHIPTOZIP;
+ }
+
+ public long getId_ordine() {
+ return this.id_ordine;
+ }
+
+ public void setId_ordine(long id_ordine) {
+ this.id_ordine = id_ordine;
+ }
+
+ public String getShippingAddressString() {
+ return "SHIPTONAME=" + URLEncoder.encode(getSHIPTONAME()) + "&DESC=" + URLEncoder.encode(getDESC()) + "&SHIPTOSTREET=" +
+ URLEncoder.encode(getSHIPTOSTREET()) + "&SHIPTOCITY=" + URLEncoder.encode(getSHIPTOCITY()) + "&SHIPTOSTATE=" +
+ URLEncoder.encode(getSHIPTOSTATE()) + "&SHIPTOCOUNTRYCODE=" + URLEncoder.encode(getSHIPTOCOUNTRYCODE()) + "&SHIPTOZIP=" +
+ URLEncoder.encode(getSHIPTOZIP()) + "&ADDROVERRIDE=1";
+ }
+
+ public void setSHIPTOCITY(String shiptocity) {
+ this.SHIPTOCITY = shiptocity;
+ }
+
+ public void setSHIPTOCOUNTRYCODE(String shiptocountrycode) {
+ this.SHIPTOCOUNTRYCODE = shiptocountrycode;
+ }
+
+ public void setSHIPTONAME(String shiptoname) {
+ this.SHIPTONAME = shiptoname;
+ }
+
+ public void setSHIPTOSTATE(String shiptostate) {
+ this.SHIPTOSTATE = shiptostate;
+ }
+
+ public void setSHIPTOSTREET(String shiptostreet) {
+ this.SHIPTOSTREET = shiptostreet;
+ }
+
+ public void setSHIPTOZIP(String shiptozip) {
+ this.SHIPTOZIP = shiptozip;
+ }
+
+ public static void initApplicationParms(ApplParmFull ap) {
+ boolean debug = true;
+ if (ap != null) {
+ DBAdapter.logDebug(debug, "Paypal initParms: start");
+ String l_tipoParm = "PAYPAL";
+ Parm bean = new Parm(ap);
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ l_tipoParm = "PAYPAL";
+ bean.findByCodice("PAYPAL_API_PWD");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_API_PWD");
+ bean.setDescrizione("PAYPAL_API_PWD");
+ bean.setFlgTipo(0L);
+ bean.setNota("PAYPAL_API_PWD");
+ bean.save();
+ bean.findByCodice("PAYPAL_API_SIGNATURE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_API_SIGNATURE");
+ bean.setDescrizione("PAYPAL_API_SIGNATURE");
+ bean.setFlgTipo(0L);
+ bean.setNota("PAYPAL_API_SIGNATURE");
+ bean.save();
+ bean.findByCodice("PAYPAL_USE_CERTIFICATE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_USE_CERTIFICATE");
+ bean.setDescrizione("PAYPAL_USE_CERTIFICATE");
+ bean.setFlgTipo(0L);
+ bean.setNota("PAYPAL_USE_CERTIFICATE");
+ bean.save();
+ bean.findByCodice("PAYPAL_API_USERNAME");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_API_USERNAME");
+ bean.setDescrizione("PAYPAL_API_USERNAME");
+ bean.setFlgTipo(0L);
+ bean.setNota("PAYPAL_API_USERNAME");
+ bean.save();
+ bean.findByCodice("PAYPAL_CANCELURL");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_CANCELURL");
+ bean.setDescrizione("PAYPAL_CANCELURL");
+ bean.setFlgTipo(0L);
+ bean.setNota("PAYPAL_CANCELURL");
+ bean.save();
+ bean.findByCodice("PAYPAL_CURRENCY");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_CURRENCY");
+ bean.setDescrizione("PAYPAL_CURRENCY");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("EUR");
+ bean.setNota("PAYPAL_CURRENCY");
+ bean.save();
+ bean.findByCodice("PAYPAL_PAGE_STYLE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_PAGE_STYLE");
+ bean.setDescrizione("PAYPAL_PAGE_STYLE");
+ bean.setFlgTipo(0L);
+ bean.setNota("PAYPAL_PAGE_STYLE");
+ bean.save();
+ bean.findByCodice("PAYPAL_DETAIL");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_DETAIL");
+ bean.setDescrizione("PAYPAL_DETAIL");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payPalRes.jsp");
+ bean.setNota("PAYPAL_DETAIL");
+ bean.save();
+ bean.findByCodice("PAY_PAL_KO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAY_PAL_KO");
+ bean.setDescrizione("PAY_PAL_KO");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payPalRes.jsp");
+ bean.setNota("PAY_PAL_KO");
+ bean.save();
+ bean.findByCodice("PAYPAL_OK");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_OK");
+ bean.setDescrizione("PAYPAL_OK");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payPalRes.jsp");
+ bean.setNota("PAYPAL_OK");
+ bean.save();
+ bean.findByCodice("PAYPAL_RETURNURL");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_RETURNURL");
+ bean.setDescrizione("PAYPAL_RETURNURL");
+ bean.setFlgTipo(0L);
+ bean.setNota("PAYPAL_RETURNURL");
+ bean.save();
+ DBAdapter.logDebug(debug, "Paypal initParms: stop");
+ StatusMsg.deleteMsgByTag(ap, "INIT");
+ }
+ }
+
+ public String getDESC() {
+ return (this.DESC == null) ? "" : this.DESC.trim();
+ }
+
+ public void setDESC(String dESC) {
+ this.DESC = dESC;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/paypal/PayPalResp.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/paypal/PayPalResp.java
new file mode 100644
index 00000000..a6c2f88e
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/paypal/PayPalResp.java
@@ -0,0 +1,363 @@
+package it.acxent.bank.paypal;
+
+import it.acxent.bank._BankAdapter;
+import java.io.BufferedReader;
+import java.net.URLDecoder;
+
+public class PayPalResp extends _BankAdapter {
+ public static final String SESS_TOKEN = "_SESS_TOKEN";
+
+ private String ACK;
+
+ private String TIMESTAMP;
+
+ private String VERSION;
+
+ private String L_ERRORCODE0;
+
+ private String L_SHORTMESSAGE0;
+
+ private String L_SEVERITYCODE0;
+
+ private String L_LONGMESSAGE0;
+
+ private String CORRELATIONID;
+
+ private String BUILD;
+
+ private String AMT;
+
+ private String EMAIL;
+
+ private String PAYERID;
+
+ private String PAYERSTATUS;
+
+ private String FIRSTNAME;
+
+ private String LASTNAME;
+
+ private String SHIPTOSTREET;
+
+ private String COUNTRYCODE;
+
+ private String SHIPTOCITY;
+
+ private String SHIPTOSTATE;
+
+ private String SHIPTOCOUNTRYCODE;
+
+ private String SHIPTOZIP;
+
+ private String ADDRESSID;
+
+ private String ADDRESSSTATUS;
+
+ private String SHIPTONAME;
+
+ private String TRANSACTIONID;
+
+ private String TOKEN;
+
+ private long id_ordine;
+
+ private boolean paymentDone = false;
+
+ private boolean detailBuyer = false;
+
+ public static final String SESS_ID_ORDER = "_SESS_ID_ORDER";
+
+ public String getACK() {
+ return (this.ACK == null) ? "" : this.ACK;
+ }
+
+ public void setACK(String ack) {
+ this.ACK = ack;
+ }
+
+ public String getBUILD() {
+ return (this.BUILD == null) ? "" : this.BUILD;
+ }
+
+ public void setBUILD(String build) {
+ this.BUILD = build;
+ }
+
+ public String getCORRELATIONID() {
+ return (this.CORRELATIONID == null) ? "" :
+ this.CORRELATIONID;
+ }
+
+ public void setCORRELATIONID(String correlationid) {
+ this.CORRELATIONID = correlationid;
+ }
+
+ public String getTIMESTAMP() {
+ return (this.TIMESTAMP == null) ? "" : this.TIMESTAMP;
+ }
+
+ public void setTIMESTAMP(String timestamp) {
+ this.TIMESTAMP = timestamp;
+ }
+
+ public String getVERSION() {
+ return (this.VERSION == null) ? "" : this.VERSION;
+ }
+
+ public void setVERSION(String version) {
+ this.VERSION = version;
+ }
+
+ public String getL_ERRORCODE0() {
+ return (this.L_ERRORCODE0 == null) ? "" : this.L_ERRORCODE0;
+ }
+
+ public void setL_ERRORCODE0(String l_errorcode0) {
+ this.L_ERRORCODE0 = l_errorcode0;
+ }
+
+ public String getL_LONGMESSAGE0() {
+ return (this.L_LONGMESSAGE0 == null) ? "" :
+ this.L_LONGMESSAGE0;
+ }
+
+ public void setL_LONGMESSAGE0(String l_longmessage0) {
+ this.L_LONGMESSAGE0 = l_longmessage0;
+ }
+
+ public String getL_SEVERITYCODE0() {
+ return (this.L_SEVERITYCODE0 == null) ? "" :
+ this.L_SEVERITYCODE0;
+ }
+
+ public void setL_SEVERITYCODE0(String l_severitycode0) {
+ this.L_SEVERITYCODE0 = l_severitycode0;
+ }
+
+ public String getL_SHORTMESSAGE0() {
+ return (this.L_SHORTMESSAGE0 == null) ? "" :
+ this.L_SHORTMESSAGE0;
+ }
+
+ public void setL_SHORTMESSAGE0(String l_shortmessage0) {
+ this.L_SHORTMESSAGE0 = l_shortmessage0;
+ }
+
+ public String getTOKEN() {
+ return (this.TOKEN == null) ? "" : this.TOKEN;
+ }
+
+ public void setTOKEN(String token) {
+ this.TOKEN = token;
+ }
+
+ public String getADDRESSID() {
+ return this.ADDRESSID;
+ }
+
+ public void setADDRESSID(String addressid) {
+ this.ADDRESSID = addressid;
+ }
+
+ public String getADDRESSSTATUS() {
+ return this.ADDRESSSTATUS;
+ }
+
+ public void setADDRESSSTATUS(String addressstatus) {
+ this.ADDRESSSTATUS = addressstatus;
+ }
+
+ public String getCOUNTRYCODE() {
+ return this.COUNTRYCODE;
+ }
+
+ public boolean isResponseOk() {
+ return getACK().equals("Success");
+ }
+
+ public void setCOUNTRYCODE(String countrycode) {
+ this.COUNTRYCODE = countrycode;
+ }
+
+ public String getEMAIL() {
+ return this.EMAIL;
+ }
+
+ public void setEMAIL(String email) {
+ this.EMAIL = email;
+ }
+
+ public String getFIRSTNAME() {
+ return this.FIRSTNAME;
+ }
+
+ public void fillResponse(BufferedReader reader) {
+ try {
+ String response = URLDecoder.decode(reader.readLine());
+ setACK("Success");
+ setL_LONGMESSAGE0(response);
+ setAMT(getAttribute(response, "AMT"));
+ setACK(getAttribute(response, "ACK"));
+ setTOKEN(getAttribute(response, "TOKEN"));
+ setADDRESSID(getAttribute(response, "ADDRESSID"));
+ setADDRESSSTATUS(getAttribute(response, "ADDRESSSTATUS"));
+ setBUILD(getAttribute(response, "BUILD"));
+ setCORRELATIONID(getAttribute(response, "CORRELATIONID"));
+ setCOUNTRYCODE(getAttribute(response, "COUNTRYCODE"));
+ setEMAIL(getAttribute(response, "EMAIL"));
+ setFIRSTNAME(getAttribute(response, "FIRSTNAME"));
+ setL_ERRORCODE0(getAttribute(response, "L_ERRORCODE0"));
+ setL_LONGMESSAGE0(getAttribute(response, "L_LONGMESSAGE0"));
+ setL_SEVERITYCODE0(getAttribute(response, "L_SEVERITCODE0"));
+ setLASTNAME(getAttribute(response, "LASTNAME"));
+ setPAYERID(getAttribute(response, "PAYERID"));
+ setPAYERSTATUS(getAttribute(response, "PAYERSTATUS"));
+ setSHIPTOCITY(getAttribute(response, "SHIPTOCITY"));
+ setSHIPTOCOUNTRYCODE(getAttribute(response, "SHIPTOCOUNTRYCODE"));
+ setSHIPTONAME(getAttribute(response, "SHIPTONAME"));
+ setSHIPTOSTREET(getAttribute(response, "SHIPTOSTREET"));
+ setSHIPTOSTATE(getAttribute(response, "SHIPTOSTATE"));
+ setSHIPTOZIP(getAttribute(response, "SHIPTOZIP"));
+ setTIMESTAMP(getAttribute(response, "TIMESTAMP"));
+ setVERSION(getAttribute(response, "VERSION"));
+ setTRANSACTIONID(getAttribute(response, "TRANSACTIONID"));
+ } catch (Exception e) {
+ setACK("Error");
+ setL_LONGMESSAGE0(e.getMessage());
+ e.printStackTrace();
+ }
+ }
+
+ private String getAttribute(String response, String key) {
+ try {
+ if (response.indexOf(key) >= 0) {
+ int idxStart = response.indexOf(key) + key.length() + 1;
+ int idxStop = response.substring(idxStart).indexOf("&") + idxStart;
+ if (idxStop < idxStart)
+ idxStop = response.length();
+ return response.substring(idxStart, idxStop);
+ }
+ return "";
+ } catch (Exception e) {
+ System.out.println(key);
+ return "";
+ }
+ }
+
+ public void setFIRSTNAME(String firstname) {
+ this.FIRSTNAME = firstname;
+ }
+
+ public String getLASTNAME() {
+ return this.LASTNAME;
+ }
+
+ public void setLASTNAME(String lastname) {
+ this.LASTNAME = lastname;
+ }
+
+ public String getPAYERID() {
+ return this.PAYERID;
+ }
+
+ public void setPAYERID(String payerid) {
+ this.PAYERID = payerid;
+ }
+
+ public String getPAYERSTATUS() {
+ return this.PAYERSTATUS;
+ }
+
+ public void setPAYERSTATUS(String payerstatus) {
+ this.PAYERSTATUS = payerstatus;
+ }
+
+ public String getSHIPTOCITY() {
+ return (this.SHIPTOCITY == null) ? "" : this.SHIPTOCITY;
+ }
+
+ public void setSHIPTOCITY(String shiptocity) {
+ this.SHIPTOCITY = shiptocity;
+ }
+
+ public String getSHIPTOCOUNTRYCODE() {
+ return (this.SHIPTOCOUNTRYCODE == null) ? "" :
+ this.SHIPTOCOUNTRYCODE;
+ }
+
+ public void setSHIPTOCOUNTRYCODE(String shiptocountrycode) {
+ this.SHIPTOCOUNTRYCODE = shiptocountrycode;
+ }
+
+ public String getSHIPTONAME() {
+ return (this.SHIPTONAME == null) ? "" : this.SHIPTONAME;
+ }
+
+ public void setSHIPTONAME(String shiptoname) {
+ this.SHIPTONAME = shiptoname;
+ }
+
+ public String getSHIPTOSTATE() {
+ return (this.SHIPTOSTATE == null) ? "" : this.SHIPTOSTATE;
+ }
+
+ public void setSHIPTOSTATE(String shiptostate) {
+ this.SHIPTOSTATE = shiptostate;
+ }
+
+ public String getSHIPTOSTREET() {
+ return (this.SHIPTOSTREET == null) ? "" : this.SHIPTOSTREET;
+ }
+
+ public void setSHIPTOSTREET(String shiptostreet) {
+ this.SHIPTOSTREET = shiptostreet;
+ }
+
+ public String getSHIPTOZIP() {
+ return (this.SHIPTOZIP == null) ? "" : this.SHIPTOZIP;
+ }
+
+ public void setSHIPTOZIP(String shiptozip) {
+ this.SHIPTOZIP = shiptozip;
+ }
+
+ public String getAMT() {
+ return this.AMT;
+ }
+
+ public void setAMT(String amt) {
+ this.AMT = amt;
+ }
+
+ public long getId_ordine() {
+ return this.id_ordine;
+ }
+
+ public void setId_ordine(long id_ordine) {
+ this.id_ordine = id_ordine;
+ }
+
+ public boolean isDetailBuyer() {
+ return this.detailBuyer;
+ }
+
+ public void setDetailBuyer(boolean detailBuyer) {
+ this.detailBuyer = detailBuyer;
+ }
+
+ public boolean isPaymentDone() {
+ return this.paymentDone;
+ }
+
+ public void setPaymentDone(boolean paymentDone) {
+ this.paymentDone = paymentDone;
+ }
+
+ public String getTRANSACTIONID() {
+ return this.TRANSACTIONID;
+ }
+
+ public void setTRANSACTIONID(String transactionid) {
+ this.TRANSACTIONID = transactionid;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/paypalcheckout/PayPalOrder.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/paypalcheckout/PayPalOrder.java
new file mode 100644
index 00000000..acb1ab91
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/paypalcheckout/PayPalOrder.java
@@ -0,0 +1,139 @@
+package it.acxent.bank.paypalcheckout;
+
+import com.paypal.core.PayPalEnvironment;
+import com.paypal.core.PayPalHttpClient;
+import com.paypal.http.HttpRequest;
+import com.paypal.http.HttpResponse;
+import com.paypal.http.exceptions.HttpException;
+import com.paypal.http.serializer.Json;
+import com.paypal.orders.AmountWithBreakdown;
+import com.paypal.orders.ApplicationContext;
+import com.paypal.orders.LinkDescription;
+import com.paypal.orders.Order;
+import com.paypal.orders.OrderRequest;
+import com.paypal.orders.OrdersCreateRequest;
+import com.paypal.orders.OrdersGetRequest;
+import com.paypal.orders.PurchaseUnitRequest;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.json.JSONObject;
+
+public class PayPalOrder {
+ private PayPalHttpClient client;
+
+ private PayPalReq payPalReq;
+
+ private boolean useSandbox = true;
+
+ public PayPalOrder(PayPalReq payPalReq) {
+ setPayPalReq(payPalReq);
+ this.useSandbox = getPayPalReq().isUseSandbox();
+ }
+
+ private OrderRequest buildMinimumRequestBody() {
+ OrderRequest orderRequest = new OrderRequest();
+ orderRequest.checkoutPaymentIntent("CAPTURE");
+ ApplicationContext applicationContext = new ApplicationContext().cancelUrl(getPayPalReq().getCancelURL())
+ .returnUrl(getPayPalReq().getReturnUrl());
+ orderRequest.applicationContext(applicationContext);
+ List purchaseUnitRequests = new ArrayList<>();
+ PurchaseUnitRequest purchaseUnitRequest = new PurchaseUnitRequest()
+ .amountWithBreakdown(new AmountWithBreakdown()
+ .currencyCode(getPayPalReq().getCurrency()).value(String.valueOf(getPayPalReq().getAmt())))
+ .description(getPayPalReq().getDESC());
+ purchaseUnitRequests.add(purchaseUnitRequest);
+ orderRequest.purchaseUnits(purchaseUnitRequests);
+ return orderRequest;
+ }
+
+ public HttpResponse createOrder(boolean debug) throws IOException {
+ OrdersCreateRequest request = new OrdersCreateRequest();
+ request.header("prefer", "return=representation");
+ request.requestBody(buildMinimumRequestBody());
+ HttpResponse response = getClient().execute((HttpRequest)request);
+ if (debug &&
+ response.statusCode() == 201) {
+ System.out.println("Order with Minimum Payload: ");
+ System.out.println("Status Code: " + response.statusCode());
+ System.out.println("Status: " + ((Order)response.result()).status());
+ System.out.println("Order ID: " + ((Order)response.result()).id());
+ System.out.println("Intent: " + ((Order)response.result()).checkoutPaymentIntent());
+ System.out.println("Links: ");
+ for (LinkDescription link : (Iterable)((Order)response.result()).links())
+ System.out.println("\t" + link.rel() + ": " + link.href() + "\tCall Type: " + link.method());
+ System.out.println("Total Amount: " + ((Order)response.result()).purchaseUnits().get(0).amountWithBreakdown().currencyCode() + " " + ((Order)
+ response.result()).purchaseUnits().get(0).amountWithBreakdown().value());
+ System.out.println("Full response body:");
+ System.out.println(new JSONObject(new Json().serialize(response.result())).toString(4));
+ }
+ return response;
+ }
+
+ public static void main(String[] args) {
+ try {
+ PayPalReq ppr = new PayPalReq();
+ new PayPalOrder(ppr).createOrder(true);
+ } catch (HttpException e) {
+ System.out.println(e.getLocalizedMessage());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public PayPalReq getPayPalReq() {
+ return this.payPalReq;
+ }
+
+ public void setPayPalReq(PayPalReq payPalReq) {
+ this.payPalReq = payPalReq;
+ }
+
+ public PayPalHttpClient getClient() {
+ if (this.client == null) {
+ System.out.println("clientid: " + getPayPalReq().getPaypalClientId());
+ System.out.println("clientSc: " + getPayPalReq().getPaypalClientSecret());
+ if (this.useSandbox) {
+ PayPalEnvironment.Sandbox sandbox = new PayPalEnvironment.Sandbox(getPayPalReq().getPaypalClientId(),
+ getPayPalReq().getPaypalClientSecret());
+ this.client = new PayPalHttpClient((PayPalEnvironment)sandbox);
+ } else {
+ PayPalEnvironment.Live live = new PayPalEnvironment.Live(getPayPalReq().getPaypalClientId(),
+ getPayPalReq().getPaypalClientSecret());
+ this.client = new PayPalHttpClient((PayPalEnvironment)live);
+ }
+ }
+ return this.client;
+ }
+
+ public String prettyPrint(JSONObject jo, String pre) {
+ Iterator> keys = jo.keys();
+ StringBuilder pretty = new StringBuilder();
+ while (keys.hasNext()) {
+ String key = (String)keys.next();
+ pretty.append(String.format("%s%s: ", pre, StringUtils.capitalize(key)));
+ if (jo.get(key) instanceof JSONObject) {
+ pretty.append(prettyPrint(jo.getJSONObject(key), pre + "\t"));
+ continue;
+ }
+ if (jo.get(key) instanceof org.json.JSONArray) {
+ int sno = 1;
+ for (Object jsonObject : (Iterable)jo.getJSONArray(key)) {
+ pretty.append(String.format("\n%s\t%d:\n", pre, sno++));
+ pretty.append(prettyPrint((JSONObject)jsonObject, pre + "\t\t"));
+ }
+ continue;
+ }
+ pretty.append(String.format("%s\n", jo.getString(key)));
+ }
+ return pretty.toString();
+ }
+
+ public HttpResponse getOrder(String orderId) throws IOException {
+ OrdersGetRequest request = new OrdersGetRequest(orderId);
+ HttpResponse response = getClient().execute((HttpRequest)request);
+ return response;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/paypalcheckout/PayPalReq.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/paypalcheckout/PayPalReq.java
new file mode 100644
index 00000000..a5d8cc0f
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/paypalcheckout/PayPalReq.java
@@ -0,0 +1,291 @@
+package it.acxent.bank.paypalcheckout;
+
+import it.acxent.bank._BankAdapter;
+import it.acxent.common.Parm;
+import it.acxent.common.StatusMsg;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import java.net.URLEncoder;
+
+public class PayPalReq extends _BankAdapter {
+ private String paypalClientId;
+
+ private String paypalClientSecret;
+
+ private boolean useSandbox = false;
+
+ private double amt;
+
+ private long id_ordine;
+
+ private String cancelURL;
+
+ private String returnUrl;
+
+ private String paypalOrderId;
+
+ private String TOKEN;
+
+ private String PAYERID;
+
+ private String SHIPTOCITY;
+
+ private String SHIPTOCOUNTRYCODE;
+
+ private String SHIPTONAME;
+
+ private String SHIPTOSTATE;
+
+ private String SHIPTOSTREET;
+
+ private String SHIPTOZIP;
+
+ private String DESC;
+
+ private String currency;
+
+ public static final String P_CHECKOUT_APPLICATION_CLIENT_ID = "PAYPAL_CHECKOUT_APPLICATION_CLIENT_ID";
+
+ public static final String P_CHECKOUT_APPLICATION_CLIENT_SECRET = "PAYPAL_CHECKOUT_APPLICATION_CLIENT_SECRET";
+
+ public static final String P_CHECKOUT_USE_SANDBOX = "P_PAYPAL_CHECKOUT_USE_SANDBOX";
+
+ public static final String P_CANCEL_URL = "PAYPAL_CANCELURL";
+
+ public static final String P_CURRENCY = "PAYPAL_CURRENCY";
+
+ public static final String P_PAYMENT_OK_PAGE = "PAYPAL_OK";
+
+ public static final String P_RETURN_URL = "PAYPAL_RETURNURL";
+
+ public double getAmt() {
+ return this.amt;
+ }
+
+ public void setAmt(double amt) {
+ this.amt = amt;
+ }
+
+ public String getCancelURL() {
+ return (this.cancelURL == null) ? "" : this.cancelURL;
+ }
+
+ public void setCancelURL(String cancelURL) {
+ this.cancelURL = cancelURL;
+ }
+
+ public String getReturnUrl() {
+ return (this.returnUrl == null) ? "" : this.returnUrl;
+ }
+
+ public void setReturnUrl(String returnUrl) {
+ this.returnUrl = returnUrl;
+ }
+
+ public String getTOKEN() {
+ return (this.TOKEN == null) ? "" : this.TOKEN;
+ }
+
+ public void setTOKEN(String token) {
+ this.TOKEN = token;
+ }
+
+ public String getPAYERID() {
+ return this.PAYERID;
+ }
+
+ public void setPAYERID(String payerid) {
+ this.PAYERID = payerid;
+ }
+
+ public String getSHIPTOCITY() {
+ return (this.SHIPTOCITY == null) ? "" : this.SHIPTOCITY;
+ }
+
+ public String getSHIPTOCOUNTRYCODE() {
+ return (this.SHIPTOCOUNTRYCODE == null) ? "" : this.SHIPTOCOUNTRYCODE;
+ }
+
+ public String getSHIPTONAME() {
+ return (this.SHIPTONAME == null) ? "" : this.SHIPTONAME;
+ }
+
+ public String getSHIPTOSTATE() {
+ return (this.SHIPTOSTATE == null) ? "" : this.SHIPTOSTATE;
+ }
+
+ public String getSHIPTOSTREET() {
+ return (this.SHIPTOSTREET == null) ? "" : this.SHIPTOSTREET;
+ }
+
+ public String getSHIPTOZIP() {
+ return (this.SHIPTOZIP == null) ? "" : this.SHIPTOZIP;
+ }
+
+ public long getId_ordine() {
+ return this.id_ordine;
+ }
+
+ public void setId_ordine(long id_ordine) {
+ this.id_ordine = id_ordine;
+ }
+
+ public String getShippingAddressString() {
+ return "SHIPTONAME=" + URLEncoder.encode(getSHIPTONAME()) + "&DESC=" + URLEncoder.encode(getDESC()) + "&SHIPTOSTREET=" +
+ URLEncoder.encode(getSHIPTOSTREET()) + "&SHIPTOCITY=" + URLEncoder.encode(getSHIPTOCITY()) + "&SHIPTOSTATE=" +
+ URLEncoder.encode(getSHIPTOSTATE()) + "&SHIPTOCOUNTRYCODE=" + URLEncoder.encode(getSHIPTOCOUNTRYCODE()) + "&SHIPTOZIP=" +
+ URLEncoder.encode(getSHIPTOZIP()) + "&ADDROVERRIDE=1";
+ }
+
+ public void setSHIPTOCITY(String shiptocity) {
+ this.SHIPTOCITY = shiptocity;
+ }
+
+ public void setSHIPTOCOUNTRYCODE(String shiptocountrycode) {
+ this.SHIPTOCOUNTRYCODE = shiptocountrycode;
+ }
+
+ public void setSHIPTONAME(String shiptoname) {
+ this.SHIPTONAME = shiptoname;
+ }
+
+ public void setSHIPTOSTATE(String shiptostate) {
+ this.SHIPTOSTATE = shiptostate;
+ }
+
+ public void setSHIPTOSTREET(String shiptostreet) {
+ this.SHIPTOSTREET = shiptostreet;
+ }
+
+ public void setSHIPTOZIP(String shiptozip) {
+ this.SHIPTOZIP = shiptozip;
+ }
+
+ public static void initApplicationParms(ApplParmFull ap) {
+ boolean debug = false;
+ if (ap != null) {
+ DBAdapter.logDebug(debug, "payPal chechout initParms: start");
+ String l_tipoParm = "PAYPAL";
+ Parm bean = new Parm(ap);
+ l_tipoParm = "PAYPAL_CHECKOUT";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("PAYPAL_CANCELURL");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_CANCELURL");
+ bean.setDescrizione("PAYPAL_CANCELURL");
+ bean.setFlgTipo(0L);
+ bean.setNota("PAYPAL_CANCELURL");
+ bean.save();
+ bean.findByCodice("PAYPAL_CURRENCY");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_CURRENCY");
+ bean.setDescrizione("PAYPAL_CURRENCY");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("EUR");
+ bean.setNota("PAYPAL_CURRENCY");
+ bean.save();
+ bean.findByCodice("PAYPAL_OK");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_OK");
+ bean.setDescrizione("PAYPAL_OK");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payPalRes.jsp");
+ bean.setNota("PAYPAL_OK");
+ bean.save();
+ bean.findByCodice("PAYPAL_RETURNURL");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_RETURNURL");
+ bean.setDescrizione("PAYPAL_RETURNURL");
+ bean.setFlgTipo(0L);
+ bean.setNota("PAYPAL_RETURNURL");
+ bean.save();
+ bean.findByCodice("PAYPAL_CHECKOUT_APPLICATION_CLIENT_ID");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_CHECKOUT_APPLICATION_CLIENT_ID");
+ bean.setDescrizione("PAYPAL_CHECKOUT_APPLICATION_CLIENT_ID");
+ bean.setFlgTipo(0L);
+ bean.setNota("PAYPAL_CHECKOUT_APPLICATION_CLIENT_SECRET");
+ bean.save();
+ bean.findByCodice("PAYPAL_CHECKOUT_APPLICATION_CLIENT_SECRET");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_CHECKOUT_APPLICATION_CLIENT_SECRET");
+ bean.setDescrizione("PAYPAL_CHECKOUT_APPLICATION_CLIENT_SECRET");
+ bean.setFlgTipo(0L);
+ bean.setNota("PAYPAL_CHECKOUT_APPLICATION_CLIENT_SECRET");
+ bean.save();
+ bean.findByCodice("PAYPAL_CHECKOUT_APPLICATION_CLIENT_SECRET");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PAYPAL_CHECKOUT_APPLICATION_CLIENT_SECRET");
+ bean.setDescrizione("PAYPAL_CHECKOUT_APPLICATION_CLIENT_SECRET");
+ bean.setFlgTipo(0L);
+ bean.setNota("PAYPAL_CHECKOUT_APPLICATION_CLIENT_SECRET");
+ bean.save();
+ bean.findByCodice("P_PAYPAL_CHECKOUT_USE_SANDBOX");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("P_PAYPAL_CHECKOUT_USE_SANDBOX");
+ bean.setDescrizione("P_PAYPAL_CHECKOUT_USE_SANDBOX");
+ bean.setFlgTipo(5L);
+ bean.setNota("P_PAYPAL_CHECKOUT_USE_SANDBOX");
+ bean.save();
+ DBAdapter.logDebug(debug, "payPal chechout initParms: stop");
+ }
+ }
+
+ public String getDESC() {
+ return (this.DESC == null) ? "" : this.DESC.trim();
+ }
+
+ public void setDESC(String dESC) {
+ this.DESC = dESC;
+ }
+
+ public String getCurrency() {
+ return (this.currency == null) ? "EUR" : this.currency.trim();
+ }
+
+ public void setCurrency(String currency) {
+ this.currency = currency;
+ }
+
+ public String getPaypalClientId() {
+ return this.paypalClientId;
+ }
+
+ public void setPaypalClientId(String paypalClientId) {
+ this.paypalClientId = paypalClientId;
+ }
+
+ public String getPaypalClientSecret() {
+ return this.paypalClientSecret;
+ }
+
+ public void setPaypalClientSecret(String paypalClientSecret) {
+ this.paypalClientSecret = paypalClientSecret;
+ }
+
+ public boolean isUseSandbox() {
+ return this.useSandbox;
+ }
+
+ public void setUseSandbox(boolean useSandbox) {
+ this.useSandbox = useSandbox;
+ }
+
+ public String getPaypalOrderId() {
+ return (this.paypalOrderId == null) ? "" : this.paypalOrderId.trim();
+ }
+
+ public void setPaypalOrderId(String paypalOrderId) {
+ this.paypalOrderId = paypalOrderId;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/poste/PeReq.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/poste/PeReq.java
new file mode 100644
index 00000000..769c0d2f
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/poste/PeReq.java
@@ -0,0 +1,303 @@
+package it.acxent.bank.poste;
+
+import it.acxent.bank._BankAdapter;
+import it.acxent.common.Parm;
+import it.acxent.common.StatusMsg;
+import it.acxent.db.ApplParmFull;
+
+public class PeReq extends _BankAdapter {
+ public static final String LANG_CODE_USA = "USA";
+
+ public static final String LANG_CODE_ITA = "ITA";
+
+ public static final String DIV_CODE_EURO = "978";
+
+ private String currency;
+
+ private String trackId;
+
+ private String mail;
+
+ private String resourcePath;
+
+ private String language;
+
+ private String alias;
+
+ private String responseURL;
+
+ private String errorURL;
+
+ private String userName;
+
+ private String amt;
+
+ private String action;
+
+ private String flgTipoPagamentoPe;
+
+ private String merchantId;
+
+ private String shopId;
+
+ public static final String P_USE_IGFS = "PE_USE_IGFS";
+
+ public static final String P_NO_CERTIFICATO = "PE_NO_CERTIFICATO";
+
+ public static final String P_RESOURCE_PATH = "PE_RESOURCE_PATH";
+
+ public static final String P_URL_POST_RESPONSE = "PE_URL_POST_RESPONSE";
+
+ public static final String ALIAS_POSTEPAY = "03";
+
+ public static final String ALIAS_BPOPL = "01";
+
+ public static final String ALIAS_CC = "02";
+
+ public static final String ALIAS_BPIOL = "04";
+
+ public static final String ALIAS_POSTEPAY_IMPRESA = "06";
+
+ public static final String P_MERCHANT_ID = "PE_MERCHANT_ID";
+
+ public static final String DEFAULT_OK_KO_PAGE = "payResPe.jsp";
+
+ public static final String P_URL_REDIRECT_RESULT = "PE_URL_REDIRECT_RESULT";
+
+ public static final String P_PAYMENT_OK_PAGE = "PE_PAY_OK";
+
+ public static final String P_PAYMENT_ERROR_PAGE = "PE_PAY_KO";
+
+ public static final String P_URL_POST_RESPONSE_ERROR = "URL_POST_RESPONSE_ERROR";
+
+ public static final String TEST_ALIAS = "payment_testm_urlmac";
+
+ public static final String REQ_URL = "https://ecommerce.cim-italia.it/ecomm/DispatcherServlet";
+
+ public String getTrackId() {
+ return (this.trackId == null) ? "" : this.trackId;
+ }
+
+ public void setTrackId(String myamount) {
+ this.trackId = myamount;
+ }
+
+ public String getAmt() {
+ return (this.amt == null) ? "" : this.amt;
+ }
+
+ public void setAmt(String mybuyeremail) {
+ this.amt = mybuyeremail;
+ }
+
+ public String getMail() {
+ return (this.mail == null) ? "" : this.mail;
+ }
+
+ public void setMail(String mybuyername) {
+ this.mail = mybuyername;
+ }
+
+ public String getCurrency() {
+ return (this.currency == null) ? "" : this.currency;
+ }
+
+ public void setCurrency(String mycurrency) {
+ this.currency = mycurrency;
+ }
+
+ public String getAlias() {
+ return getMerchantId() + getMerchantId();
+ }
+
+ public void setAlias(String mycustominfo) {
+ this.alias = mycustominfo;
+ }
+
+ public String getLanguage() {
+ return (this.language == null) ? "" : this.language;
+ }
+
+ public void setLanguage(String lang) {
+ this.language = lang;
+ }
+
+ public String getImportoUrl() {
+ return (this.amt == null) ? "" : this.amt;
+ }
+
+ public String getResponseURL() {
+ return (this.responseURL == null) ? "" : this.responseURL.trim();
+ }
+
+ public void setResponseURL(String url) {
+ this.responseURL = url;
+ }
+
+ public String getErrorURL() {
+ return (this.errorURL == null) ? "" : this.errorURL.trim();
+ }
+
+ public void setErrorURL(String url_back) {
+ this.errorURL = url_back;
+ }
+
+ public static void initApplicationParms(ApplParmFull ap) {
+ if (ap != null) {
+ Parm bean = new Parm(ap);
+ String l_tipoParm = "POST ECOMMERCE";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("PE_MERCHANT_ID");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PE_MERCHANT_ID");
+ bean.setDescrizione("PE_MERCHANT_ID");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("PE_MERCHANT_ID");
+ bean.setNota("PE_MERCHANT_ID");
+ bean.save();
+ bean.findByCodice("PE_PAY_KO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PE_PAY_KO");
+ bean.setDescrizione("PE_PAY_KO");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payResPe.jsp");
+ bean.setNota("PE_PAY_KO");
+ bean.save();
+ bean.findByCodice("PE_PAY_OK");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PE_PAY_OK");
+ bean.setDescrizione("PE_PAY_OK");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payResPe.jsp");
+ bean.setNota("PE_PAY_OK");
+ bean.save();
+ bean.findByCodice("PE_NO_CERTIFICATO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PE_NO_CERTIFICATO");
+ bean.setDescrizione("PE_NO_CERTIFICATO");
+ bean.setFlgTipo(1L);
+ bean.setNota("PE_NO_CERTIFICATOSOLO PER IGFS: 0--> CON CERTIFICATO, PRODUZIONE 1 --> SENZA CERTIFICATO, SOLO TEST");
+ bean.save();
+ bean.findByCodice("PE_USE_IGFS");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PE_USE_IGFS");
+ bean.setDescrizione("PE_USE_IGFS");
+ bean.setFlgTipo(1L);
+ bean.setNota("PE_USE_IGFS: 0--> vecchia versione con resource.cgn 1 --> nuova versione con file properties");
+ bean.save();
+ bean.findByCodice("PE_RESOURCE_PATH");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PE_RESOURCE_PATH");
+ bean.setDescrizione("PE_RESOURCE_PATH");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("/home/xxx/xxx/");
+ bean.setNota("PE_RESOURCE_PATH: per la versione vecchia con / finale. Path assoluto dove trovare resource.cgn per la versione nuova il percorso completo del .properties compreso il nome del file.");
+ bean.save();
+ bean.findByCodice("PE_URL_POST_RESPONSE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PE_URL_POST_RESPONSE");
+ bean.setDescrizione("PE_URL_POST_RESPONSE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("http://test.f3.com/tf/GetResponsePe.abl");
+ bean.setNota("PE_URL_POST_RESPONSE: URL HTTP RICHIAMATA TRAMITE POST. DEVE ESSERE VISIBILE SU INTERNET (NO LOCALHOST)");
+ bean.save();
+ bean.findByCodice("URL_POST_RESPONSE_ERROR");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("URL_POST_RESPONSE_ERROR");
+ bean.setDescrizione("URL_POST_RESPONSE_ERROR");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("http://test.f3.com/tf/RicevutaPE.abl");
+ bean.setNota("URL_POST_RESPONSE_ERROR: URL HTTP RICHIAMATA TRAMITE REDIRECT. DEVE ESSERE VISIBILE SU INTERNET (NO LOCALHOST)");
+ bean.save();
+ bean.findByCodice("PE_URL_REDIRECT_RESULT");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PE_URL_REDIRECT_RESULT");
+ bean.setDescrizione("PE_URL_REDIRECT_RESULT");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("http://localhost/tf/RicevutaPE.abl");
+ bean.setNota("PE_URL_REDIRECT_RESULT: URL HTTP RICHIAMATA TRAMITE REDIRECT. PUO' ESSERE LOCALHOST IN FASE DI SVILUPPO");
+ bean.save();
+ StatusMsg.deleteMsgByTag(ap, "INIT");
+ }
+ }
+
+ public String getResourcePath() {
+ return (this.resourcePath == null) ? "" : this.resourcePath;
+ }
+
+ public void setResourcePath(String resourcePath) {
+ this.resourcePath = resourcePath;
+ }
+
+ public String getUserName() {
+ return (this.userName == null) ? "" : this.userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
+ public String getAction() {
+ return "4";
+ }
+
+ public void setAction(String action) {
+ this.action = action;
+ }
+
+ public String getTipoPagamentoPE(String tipoPagamento) {
+ if (tipoPagamento.equals("04"))
+ return "conto bpiol";
+ if (tipoPagamento.equals("01"))
+ return "conto bpiol";
+ if (tipoPagamento.equals("04"))
+ return "conto bpol";
+ if (tipoPagamento.equals("02"))
+ return "carta di credito";
+ if (tipoPagamento.equals("03"))
+ return "carta postepay";
+ if (tipoPagamento.equals("06"))
+ return "carta postepay Impresa";
+ return "??";
+ }
+
+ public String getFlgTipoPagamentoPe() {
+ return (this.flgTipoPagamentoPe == null) ? "" : this.flgTipoPagamentoPe.trim();
+ }
+
+ public void setFlgTipoPagamentoPe(String flgTipoPagamentoPe) {
+ this.flgTipoPagamentoPe = flgTipoPagamentoPe;
+ }
+
+ public String getMerchantId() {
+ return (this.merchantId == null) ? "" : this.merchantId.trim();
+ }
+
+ public void setMerchantId(String merchantId) {
+ this.merchantId = merchantId;
+ }
+
+ public String getShopId() {
+ return (this.shopId == null) ? "" : this.shopId.trim();
+ }
+
+ public void setShopId(String shopId) {
+ this.shopId = shopId;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/poste/PeResp.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/poste/PeResp.java
new file mode 100644
index 00000000..d768c645
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/poste/PeResp.java
@@ -0,0 +1,118 @@
+package it.acxent.bank.poste;
+
+import it.acxent.bank._BankAdapter;
+
+public class PeResp extends _BankAdapter {
+ private long id_ordine;
+
+ private String errorText;
+
+ private String postdate;
+
+ private String paymentid;
+
+ private String trackid;
+
+ private String result;
+
+ private String tranid;
+
+ private String errorCode;
+
+ private String error;
+
+ private String auth;
+
+ private String errorService;
+
+ public static final String ESITO_OK = "APPROVED";
+
+ public long getId_ordine() {
+ return this.id_ordine;
+ }
+
+ public void setId_ordine(long id_ordine) {
+ this.id_ordine = id_ordine;
+ }
+
+ public String getErrorText() {
+ return (this.errorText == null) ? "" : this.errorText.trim();
+ }
+
+ public void setErrorText(String importo) {
+ this.errorText = importo;
+ }
+
+ public String getPostdate() {
+ return (this.postdate == null) ? "" : this.postdate.trim();
+ }
+
+ public void setPostdate(String data) {
+ this.postdate = data;
+ }
+
+ public String getPaymentid() {
+ return (this.paymentid == null) ? "" : this.paymentid.trim();
+ }
+
+ public void setPaymentid(String divisa) {
+ this.paymentid = divisa;
+ }
+
+ public String getTrackid() {
+ return (this.trackid == null) ? "" : this.trackid.trim();
+ }
+
+ public void setTrackid(String codTrans) {
+ this.trackid = codTrans;
+ }
+
+ public String getResult() {
+ return (this.result == null) ? "" : this.result.trim();
+ }
+
+ public void setResult(String esito) {
+ this.result = esito;
+ }
+
+ public String getTranid() {
+ return (this.tranid == null) ? "" : this.tranid.trim();
+ }
+
+ public void setTranid(String codAut) {
+ this.tranid = codAut;
+ }
+
+ public String getErrorCode() {
+ return (this.errorCode == null) ? "" : this.errorCode.trim();
+ }
+
+ public void setErrorCode(String nome) {
+ this.errorCode = nome;
+ }
+
+ public String getError() {
+ return (this.error == null) ? "" : this.error.trim();
+ }
+
+ public void setError(String cognome) {
+ this.error = cognome;
+ }
+
+ public String getAuth() {
+ return (this.auth == null) ? "" : this.auth.trim();
+ }
+
+ public void setAuth(String email) {
+ this.auth = email;
+ }
+
+ public String getErrorService() {
+ return (this.errorService == null) ? "" :
+ this.errorService.trim();
+ }
+
+ public void setErrorService(String errorService) {
+ this.errorService = errorService;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/poste2019/PosteReq.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/poste2019/PosteReq.java
new file mode 100644
index 00000000..5c2325d7
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/poste2019/PosteReq.java
@@ -0,0 +1,363 @@
+package it.acxent.bank.poste2019;
+
+import it.acxent.bank._BankAdapter;
+import it.acxent.common.Parm;
+import it.acxent.common.StatusMsg;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.reg.EcDc;
+
+public class PosteReq extends _BankAdapter {
+ private String VALUTA;
+
+ private String NUMORD;
+
+ private String IMPORTO;
+
+ private String LINGUA;
+
+ private String EMAILESERC;
+
+ private String EMAIL;
+
+ private String USERID;
+
+ public static final String TCONTAB_DIFFERITA = "D";
+
+ public static final String TCONTAB_IMMEDIATA = "I";
+
+ public static final String LANG_CODE_IT = "ITA";
+
+ public static final String LANG_CODE_EN = "EN";
+
+ public static final String P_POSTE19_MAC_KEY_START = "POSTE19_MAC_KEY_START";
+
+ public static final String P_POSTE19_URL_BACK = "POSTE19_URL_BACK";
+
+ public static final String P_POSTE19_URL_DONE = "POSTE19_URL_DONE";
+
+ public static final String P_POSTE19_URL_MS = "POSTE19_URL_MS";
+
+ public static final String P_POSTE19_EMAILESERC = "POSTE19_EMAILESERC";
+
+ public static final String P_POSTE19_MAC_KEY_ESITO = "POSTE19_MAC_KEY_ESITO";
+
+ public static final String P_POSTE19_IDNEGOZIO = "POSTE19_IDNEGOZIO";
+
+ public static final String P_POSTE19_TCONTAB = "POSTE19_TCONTAB";
+
+ public static final String P_POSTE19_OPTIONS = "POSTE19_OPTIONS";
+
+ public static final String URL_POSTE19_TEST = "https://acquistionlinetest.poste.it/poste/pagamenti/main?PAGE=MASTER";
+
+ public static final String URL_POSTE19_PROD = "https://acquistionline.poste.it/poste/pagamenti/main?PAGE=MASTER";
+
+ public static final String DEFAULT_URL_BACK_AND_DONE = "http://localhost/tf15/RicevutaPoste.abl";
+
+ public static final String DEFAULT_URL_MS = "http://localhost/tf15/RicevutaPoste.abl";
+
+ public static final String TEST_MAC = "CHENESOADESSO";
+
+ public static final String OPTIONS_G_REDIRIZIONE_IMMEDIATA = "G";
+
+ public static final String OPTIONS_L_ORDINE_DUPLICATO_CODE_07_URLMS = "L";
+
+ public static final String OPTIONS_N_NEGATA_SU_RULDONE = "N";
+
+ public static final String OPTIONS_P_SEND_RESPONSE_CODE_AUT = "P";
+
+ public PosteReq() {}
+
+ public PosteReq(ApplParmFull apFull) {
+ setAp(apFull);
+ }
+
+ public String getNUMORD() {
+ return (this.NUMORD == null) ? "" : this.NUMORD.trim();
+ }
+
+ public void setNUMORD(String myamount) {
+ this.NUMORD = myamount;
+ }
+
+ public String getIMPORTO() {
+ return (this.IMPORTO == null) ? "" : this.IMPORTO;
+ }
+
+ public void setIMPORTO(String mybuyeremail) {
+ this.IMPORTO = mybuyeremail;
+ }
+
+ public String getEMAILESERC() {
+ return (this.EMAILESERC == null) ? "" : this.EMAILESERC;
+ }
+
+ public void setEMAILESERC(String mybuyername) {
+ this.EMAILESERC = mybuyername;
+ }
+
+ public String getVALUTA() {
+ return (this.VALUTA == null) ? "" : this.VALUTA;
+ }
+
+ public void setVALUTA(String mycurrency) {
+ this.VALUTA = mycurrency;
+ }
+
+ public String getAlias() {
+ return getParm("POSTE19_MAC_KEY_ESITO").getTesto();
+ }
+
+ public String getMac() {
+ return getMacPagamento();
+ }
+
+ public String getMacPagamento() {
+ StringBuffer theUrl = new StringBuffer();
+ theUrl.append("&URLMS=");
+ theUrl.append(getURLMS());
+ theUrl.append("&URLDONE=");
+ theUrl.append(getURLDONE());
+ theUrl.append("&NUMORD=");
+ theUrl.append(getNUMORD());
+ theUrl.append("&IDNEGOZIO=");
+ theUrl.append(getIDNEGOZIO());
+ theUrl.append("&IMPORTO=");
+ theUrl.append(getIMPORTO());
+ theUrl.append("&VALUTA=");
+ theUrl.append(getVALUTA());
+ theUrl.append("&TCONTAB=");
+ theUrl.append(getTCONTAB());
+ theUrl.append("&TAUTOR=I");
+ if (!getOPTIONS().isEmpty()) {
+ theUrl.append("&OPTIONS=");
+ theUrl.append(getOPTIONS());
+ }
+ theUrl.append("&USERID=");
+ theUrl.append(getUSERID());
+ String res = "";
+ res = EcDc.encodeHMAC_256(getMAC_KEY_START(), theUrl.toString());
+ System.out.println("stringa mac: " + res);
+ return res;
+ }
+
+ public String getLINGUA() {
+ return (this.LINGUA == null) ? "" : this.LINGUA;
+ }
+
+ public void setLINGUA(String lang) {
+ this.LINGUA = lang;
+ }
+
+ public String getRequestUrl() {
+ return getRequestUrl(false);
+ }
+
+ public String getImportoUrl() {
+ if (this.IMPORTO == null)
+ return "0000";
+ String temp = this.IMPORTO;
+ if (temp.indexOf('.') < 0) {
+ temp = temp + "00";
+ } else if (temp.length() - temp.indexOf('.') < 3) {
+ temp = temp + "0";
+ }
+ return temp.replace(".", "");
+ }
+
+ public String getTestRequestUrl() {
+ return getRequestUrl(true);
+ }
+
+ public static void initApplicationParms(ApplParmFull ap) {
+ if (ap != null) {
+ DBAdapter.logDebug(true, "postepay 2019 chechout initParms: start");
+ String l_tipoParm = "POSTEPAY 2019";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ Parm bean = new Parm(ap);
+ bean.findByCodice("POSTE19_URL_BACK");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("POSTE19_URL_BACK");
+ bean.setDescrizione("POSTE19_URL_BACK");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("http://localhost/tf15/RicevutaPoste.abl");
+ bean.setNota("La URL verso la quale mandare l’utente in caso di annullamento del processo di pagamento e ritorno alla modifica del carrello");
+ bean.save();
+ bean.findByCodice("POSTE19_URL_DONE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("POSTE19_URL_DONE");
+ bean.setDescrizione("POSTE19_URL_DONE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("http://localhost/tf15/RicevutaPoste.abl");
+ bean.setNota("POSTE19_URL_MS");
+ bean.save();
+ bean.findByCodice("POSTE19_URL_MS");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("POSTE19_URL_MS");
+ bean.setDescrizione("POSTE19_URL_MS");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("http://localhost/tf15/RicevutaPoste.abl");
+ bean.setNota("La URL che il sistema deve utilizzare per notificare direttamente al negozio l’esito della transazione compiuta ");
+ bean.save();
+ bean.findByCodice("POSTE19_MAC_KEY_START");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("POSTE19_MAC_KEY_START");
+ bean.setDescrizione("POSTE19_MAC_KEY_START");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("CHENESOADESSO");
+ bean.setNota("E' la chiave per il calcolo del MAC nei messaggi di avvio pagamento");
+ bean.save();
+ bean.findByCodice("POSTE19_MAC_KEY_ESITO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("POSTE19_MAC_KEY_ESITO");
+ bean.setDescrizione("POSTE19_MAC_KEY_ESITO");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""));
+ if (bean.getNota().isEmpty())
+ bean.setNota("E' la chiave per la verifica del MAC nei messaggi di esito emessi da Poste e per l’usodelle API.");
+ bean.save();
+ bean.findByCodice("POSTE19_EMAILESERC");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("POSTE19_EMAILESERC");
+ bean.setDescrizione("POSTE19_EMAILESERC");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""));
+ if (bean.getNota().isEmpty())
+ bean.setNota("MAIL ESERCENTE AL QUALE INVIARE L'ESITO DELLA TRANSAZIONE. SE VUOTA VIENE UTILIZZATA QUELLA DELL'ANAGRAFICA DEL NEGOZIO");
+ bean.save();
+ bean.findByCodice("POSTE19_IDNEGOZIO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("POSTE19_IDNEGOZIO");
+ bean.setDescrizione("POSTE19_IDNEGOZIO");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""));
+ if (bean.getNota().isEmpty())
+ bean.setNota("Identificativo del negozio del merchant assegnato da Poste, Merchant ID (MID).");
+ bean.save();
+ bean.findByCodice("POSTE19_TCONTAB");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("POSTE19_TCONTAB");
+ bean.setDescrizione("POSTE19_TCONTAB");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("I");
+ if (bean.getNota().isEmpty())
+ bean.setNota("Tipo di contabilizzazione da utilizzare in questo ordine. Obbligatorio. D --> Differita I --> Immediata");
+ bean.save();
+ bean.findByCodice("POSTE19_OPTIONS");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("POSTE19_OPTIONS");
+ bean.setDescrizione("POSTE19_OPTIONS");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""));
+ if (bean.getNota().isEmpty())
+ bean.setNota("Opzioni aggiuntive per il pagamento in corso. G – In caso di autorizzazione concessa il sistema invece di mostrare l’esito della transazione al consumatore effettua la redirezione immediata presso URLDONE in modo che il negozio virtuale possa mostrare un proprio “scontrino” personalizzato. In caso di autorizzazione negata all’utente viene riproposta la schermata di inserimento carta. L – Nel caso di ordine duplicato il sistema invia una URLMS con codice di esito 07. N – In caso di autorizzazione negata il sistema, invece di mostrare l’esito della transazione alconsumatore, effettua la redirezione immediata verso URLDONE. P – Viene restituito, in URLMS E URDONE, il campo RESPONSE_CODE_AUT che rappresenta il codice di risposta ritornato dal backend autorizzativo. ");
+ bean.save();
+ DBAdapter.logDebug(true, "postepay 2019 chechout initParms: stop");
+ }
+ }
+
+ private String getIDNEGOZIO() {
+ return getParm("POSTE19_IDNEGOZIO").getTesto();
+ }
+
+ public String getURLBACK() {
+ return getParm("POSTE19_URL_BACK").getTesto();
+ }
+
+ public String getURLDONE() {
+ return getParm("POSTE19_URL_DONE").getTesto();
+ }
+
+ public String getURLMS() {
+ return getParm("POSTE19_URL_MS").getTesto();
+ }
+
+ public String getTCONTAB() {
+ return getParm("POSTE19_TCONTAB").getTesto();
+ }
+
+ public String getTAUTOR() {
+ return "I";
+ }
+
+ public String getOPTIONS() {
+ return getParm("POSTE19_OPTIONS").getTesto();
+ }
+
+ public String getEMAIL() {
+ return this.EMAIL;
+ }
+
+ public void setEMAIL(String eMAIL) {
+ this.EMAIL = eMAIL;
+ }
+
+ public String getUSERID() {
+ return this.USERID;
+ }
+
+ public void setUSERID(String uSERID) {
+ this.USERID = uSERID;
+ }
+
+ private String getMAC_KEY_START() {
+ return getParm("POSTE19_MAC_KEY_START").getTesto();
+ }
+
+ private String getRequestUrl(boolean test) {
+ StringBuilder theUrl = new StringBuilder();
+ if (test) {
+ theUrl.append("https://acquistionlinetest.poste.it/poste/pagamenti/main?PAGE=MASTER");
+ } else {
+ theUrl.append("https://acquistionline.poste.it/poste/pagamenti/main?PAGE=MASTER");
+ }
+ theUrl.append("&IMPORTO=");
+ theUrl.append(getIMPORTO());
+ theUrl.append("&VALUTA=");
+ theUrl.append(getVALUTA());
+ theUrl.append("&NUMORD=");
+ theUrl.append(getNUMORD());
+ theUrl.append("&IDNEGOZIO=");
+ theUrl.append(getIDNEGOZIO());
+ theUrl.append("&URLBACK=");
+ theUrl.append(getURLBACK());
+ theUrl.append("&URLDONE=");
+ theUrl.append(getURLDONE());
+ theUrl.append("&URLMS=");
+ theUrl.append(getURLMS());
+ theUrl.append("&TCONTAB=");
+ theUrl.append(getTCONTAB());
+ theUrl.append("&TAUTOR=I");
+ theUrl.append("&MAC=");
+ theUrl.append(getMacPagamento());
+ theUrl.append("&LINGUA=");
+ theUrl.append(getLINGUA());
+ if (!getEMAILESERC().isEmpty()) {
+ theUrl.append("&EMAILESERC=");
+ theUrl.append(getEMAILESERC());
+ }
+ if (!getOPTIONS().isEmpty()) {
+ theUrl.append("&OPTIONS=");
+ theUrl.append(getOPTIONS());
+ }
+ theUrl.append("&EMAIL=");
+ theUrl.append(getEMAIL());
+ theUrl.append("&USERID=");
+ theUrl.append(getUSERID());
+ return theUrl.toString();
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/poste2019/PosteRes.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/poste2019/PosteRes.java
new file mode 100644
index 00000000..8cb1ebb8
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/poste2019/PosteRes.java
@@ -0,0 +1,258 @@
+package it.acxent.bank.poste2019;
+
+import it.acxent.bank._BankAdapter;
+import it.acxent.db.ApplParmFull;
+import it.acxent.reg.EcDc;
+
+public class PosteRes extends _BankAdapter {
+ public static final String ESITO_OK = "00";
+
+ public static final String ESITO_KO_01 = "01";
+
+ public static final String ESITO_KO_02 = "02";
+
+ public static final String ESITO_KO_03 = "03";
+
+ public static final String ESITO_KO_04 = "04";
+
+ public static final String ESITO_KO_05 = "05";
+
+ public static final String ESITO_KO_06 = "06";
+
+ public static final String ESITO_KO_07 = "07";
+
+ public static final String ESITO_KO_60 = "60";
+
+ public static final String ESITO_KO_66 = "66";
+
+ private String IMPORTO;
+
+ private String NUMORD;
+
+ private String VALUTA;
+
+ private String ESITO;
+
+ private String AUT;
+
+ private String IDTRANS;
+
+ private String IDNEGOZIO;
+
+ private String MAC;
+
+ private String TCONTAB;
+
+ private String TAUTOR;
+
+ private String BPW_TIPO_TRANSAZIONE;
+
+ private String RESPONSE_CODE_AUT;
+
+ private String ALIASSTR;
+
+ private String EMAILTIT;
+
+ private String CFTIT;
+
+ public PosteRes() {}
+
+ public static final String getEsito(String l_esito) {
+ if (l_esito.equals("01"))
+ return "Negata dal sistema";
+ if (l_esito.equals("02"))
+ return "Negata per problemi sull'anagrafica negozio";
+ if (l_esito.equals("03"))
+ return "Negata per problemi di comunicazione con i circuiti autorizzativi";
+ if (l_esito.equals("04"))
+ return "Negata dall'emittente della carta";
+ if (l_esito.equals("05"))
+ return "Negata per numero carta errato";
+ if (l_esito.equals("06"))
+ return "Errore imprevisto durante l’elaborazione della richiesta";
+ if (l_esito.equals("07"))
+ return "Ordine duplicato";
+ if (l_esito.equals("60"))
+ return "Negata dai controlli antifrode di Poste";
+ if (l_esito.equals("66"))
+ return "Negata per mancata autenticazione dell’utente nelle procedure di verifica (ACS).";
+ if (l_esito.equals("00"))
+ return "Successo";
+ return "??";
+ }
+
+ public PosteRes(ApplParmFull apFull) {
+ setAp(apFull);
+ }
+
+ public boolean isMacRitornoOk() {
+ String macCalcolato = getMacEsito();
+ if (getMAC().equals(macCalcolato))
+ return true;
+ return false;
+ }
+
+ public String getKey() {
+ return getParm("XPAY_MAC_KEY").getTesto();
+ }
+
+ public String getIMPORTO() {
+ return this.IMPORTO;
+ }
+
+ public void setIMPORTO(String iMPORTO) {
+ this.IMPORTO = iMPORTO;
+ }
+
+ public String getNUMORD() {
+ return this.NUMORD;
+ }
+
+ public void setNUMORD(String nUMORD) {
+ this.NUMORD = nUMORD;
+ }
+
+ public String getVALUTA() {
+ return this.VALUTA;
+ }
+
+ public void setVALUTA(String vALUTA) {
+ this.VALUTA = vALUTA;
+ }
+
+ public String getESITO() {
+ return this.ESITO;
+ }
+
+ public void setESITO(String eSITO) {
+ this.ESITO = eSITO;
+ }
+
+ public String getAUT() {
+ return this.AUT;
+ }
+
+ public void setAUT(String aUT) {
+ this.AUT = aUT;
+ }
+
+ public String getIDTRANS() {
+ return this.IDTRANS;
+ }
+
+ public void setIDTRANS(String iDTRANS) {
+ this.IDTRANS = iDTRANS;
+ }
+
+ public String getIDNEGOZIO() {
+ return this.IDNEGOZIO;
+ }
+
+ public void setIDNEGOZIO(String iDNEGOZIO) {
+ this.IDNEGOZIO = iDNEGOZIO;
+ }
+
+ public String getMAC() {
+ return this.MAC;
+ }
+
+ public void setMAC(String mAC) {
+ this.MAC = mAC;
+ }
+
+ private String getMAC_KEY_ESITO() {
+ return getParm("POSTE19_MAC_KEY_ESITO").getTesto();
+ }
+
+ public String getMacEsito() {
+ StringBuffer theUrl = new StringBuffer();
+ theUrl.append("&NUMORD=");
+ theUrl.append(getNUMORD());
+ theUrl.append("&IDNEGOZIO=");
+ theUrl.append(getIDNEGOZIO());
+ theUrl.append("&AUT=");
+ theUrl.append(getAUT());
+ theUrl.append("&IMPORTO=");
+ theUrl.append(getIMPORTO());
+ theUrl.append("&VALUTA=");
+ theUrl.append(getVALUTA());
+ theUrl.append("&IDTRANS=");
+ theUrl.append(getIDTRANS());
+ theUrl.append("&TCONTAB=");
+ theUrl.append(getTCONTAB());
+ theUrl.append("&TAUTOR=");
+ theUrl.append(getTAUTOR());
+ theUrl.append("&ESITO=");
+ theUrl.append(getESITO());
+ theUrl.append("&BPW_TIPO_TRANSAZIONE=");
+ theUrl.append(getBPW_TIPO_TRANSAZIONE());
+ if (getOPTIONS().equals("P")) {
+ theUrl.append("&RESPONSE_CODE_AUT=");
+ theUrl.append(getRESPONSE_CODE_AUT());
+ }
+ String res = "";
+ res = EcDc.encodeHMAC_256(getMAC_KEY_ESITO(), theUrl.toString());
+ System.out.println("stringa mac esito: " + res);
+ return res;
+ }
+
+ public String getTCONTAB() {
+ return this.TCONTAB;
+ }
+
+ public void setTCONTAB(String tCONTAB) {
+ this.TCONTAB = tCONTAB;
+ }
+
+ public String getTAUTOR() {
+ return this.TAUTOR;
+ }
+
+ public void setTAUTOR(String tAUTOR) {
+ this.TAUTOR = tAUTOR;
+ }
+
+ public String getBPW_TIPO_TRANSAZIONE() {
+ return this.BPW_TIPO_TRANSAZIONE;
+ }
+
+ public void setBPW_TIPO_TRANSAZIONE(String bPW_TIPO_TRANSAZIONE) {
+ this.BPW_TIPO_TRANSAZIONE = bPW_TIPO_TRANSAZIONE;
+ }
+
+ public String getRESPONSE_CODE_AUT() {
+ return this.RESPONSE_CODE_AUT;
+ }
+
+ public void setRESPONSE_CODE_AUT(String rESPONSE_CODE_AUT) {
+ this.RESPONSE_CODE_AUT = rESPONSE_CODE_AUT;
+ }
+
+ public String getALIASSTR() {
+ return this.ALIASSTR;
+ }
+
+ public void setALIASSTR(String aLIASSTR) {
+ this.ALIASSTR = aLIASSTR;
+ }
+
+ public String getEMAILTIT() {
+ return this.EMAILTIT;
+ }
+
+ public void setEMAILTIT(String eMAILTIT) {
+ this.EMAILTIT = eMAILTIT;
+ }
+
+ public String getCFTIT() {
+ return this.CFTIT;
+ }
+
+ public void setCFTIT(String cFTIT) {
+ this.CFTIT = cFTIT;
+ }
+
+ public String getOPTIONS() {
+ return getParm("POSTE19_OPTIONS").getTesto();
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sella/GestPayCrypt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sella/GestPayCrypt.java
new file mode 100644
index 00000000..7d7a2e5d
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sella/GestPayCrypt.java
@@ -0,0 +1,721 @@
+package it.acxent.bank.sella;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLEncoder;
+import java.net.UnknownServiceException;
+
+public class GestPayCrypt {
+ private String ShopLogin = "";
+
+ private String Currency = "";
+
+ private String Amount = "";
+
+ private String ShopTransactionID = "";
+
+ private String BuyerName = "";
+
+ private String BuyerEmail = "";
+
+ private String Language = "";
+
+ private String CustomInfo = "";
+
+ private String AuthorizationCode = "";
+
+ private String ErrorCode = "";
+
+ private String ErrorDescription = "";
+
+ private String BankTransactionID = "";
+
+ private String AlertCode = "";
+
+ private String AlertDescription = "";
+
+ private String EncryptedString = "";
+
+ private String ToBeEncript = "";
+
+ private String Decripted = "";
+
+ private String TransactionResult = "";
+
+ private String ProtocolAuthServer = "";
+
+ private String DomainName = "";
+
+ private String separator = "";
+
+ private String errDescription = "";
+
+ private String errNumber = "";
+
+ private String Version = "";
+
+ private String Min = "";
+
+ private String CVV = "";
+
+ private String country = "";
+
+ private String vbvrisp = "";
+
+ private String vbv = "";
+
+ private String trans;
+
+ public GestPayCrypt() {
+ this.ShopLogin = "";
+ this.Currency = "";
+ this.Amount = "";
+ this.ShopTransactionID = "";
+ this.BuyerName = "";
+ this.BuyerEmail = "";
+ this.Language = "";
+ this.CustomInfo = "";
+ this.AuthorizationCode = "";
+ this.ErrorCode = "";
+ this.ErrorDescription = "";
+ this.BankTransactionID = "";
+ this.AlertCode = "";
+ this.AlertDescription = "";
+ this.EncryptedString = "";
+ this.ToBeEncript = "";
+ this.Decripted = "";
+ this.ProtocolAuthServer = "http://";
+ this.DomainName = "";
+ this.separator = "*P1*";
+ this.errDescription = "";
+ this.errNumber = "0";
+ this.Version = "3.0";
+ this.Min = "";
+ this.CVV = "";
+ this.country = "";
+ this.vbvrisp = "";
+ this.vbv = "";
+ this.trans = "";
+ }
+
+ public void setShopLogin(String xstr) {
+ this.ShopLogin = xstr;
+ }
+
+ public void setCurrency(String xstr) {
+ this.Currency = xstr;
+ }
+
+ public void setAmount(String xstr) {
+ this.Amount = xstr;
+ }
+
+ public void setShopTransactionID(String xstr) {
+ this.ShopTransactionID = URLEncoder.encode(xstr.trim());
+ }
+
+ public void setMIN(String xstr) {
+ this.Min = xstr;
+ }
+
+ public void setCVV(String xstr) {
+ this.CVV = xstr;
+ }
+
+ public void setBuyerName(String xstr) {
+ this.BuyerName = URLEncoder.encode(xstr.trim());
+ }
+
+ public void setBuyerEmail(String xstr) {
+ this.BuyerEmail = xstr.trim();
+ }
+
+ public void setLanguage(String xstr) {
+ this.Language = xstr.trim();
+ }
+
+ public void setCustomInfo(String xstr) {
+ this.CustomInfo = URLEncoder.encode(xstr.trim());
+ }
+
+ public void setEncryptedString(String xstr) {
+ this.EncryptedString = xstr;
+ }
+
+ public void setProtocolServer(String xstr) {
+ this.ProtocolAuthServer = xstr;
+ }
+
+ public void setDomainName(String xstr) {
+ this.DomainName = xstr;
+ }
+
+ public String getShopLogin() {
+ return this.ShopLogin;
+ }
+
+ public String getCurrency() {
+ return this.Currency;
+ }
+
+ public String getAmount() {
+ return this.Amount;
+ }
+
+ public String getCountry() {
+ return this.country;
+ }
+
+ public String getVBV() {
+ return this.vbv;
+ }
+
+ public String getVBVrisp() {
+ return this.vbvrisp;
+ }
+
+ public String getShopTransactionID() {
+ String app = "";
+ try {
+ app = URLDecode(this.ShopTransactionID);
+ } catch (Exception e) {}
+ return app;
+ }
+
+ public String getBuyerName() {
+ String appBuyername = "";
+ try {
+ appBuyername = URLDecode(this.BuyerName);
+ } catch (Exception ex) {
+ appBuyername = "errore";
+ }
+ return appBuyername;
+ }
+
+ public String getBuyerEmail() {
+ return this.BuyerEmail;
+ }
+
+ public String getCustomInfo() {
+ String appCustom = "";
+ try {
+ appCustom = URLDecode(this.CustomInfo);
+ } catch (Exception e) {}
+ return appCustom;
+ }
+
+ public String getAuthorizationCode() {
+ return this.AuthorizationCode;
+ }
+
+ public String getErrorCode() {
+ return this.ErrorCode;
+ }
+
+ public String getErrorDescription() {
+ return this.ErrorDescription;
+ }
+
+ public String getBankTransactionID() {
+ return this.BankTransactionID;
+ }
+
+ public String getTransactionResult() {
+ return this.TransactionResult;
+ }
+
+ public String getAlertCode() {
+ return this.AlertCode;
+ }
+
+ public String getAlertDescription() {
+ return this.AlertDescription;
+ }
+
+ public String getEncryptedString() {
+ return this.EncryptedString;
+ }
+
+ public String getProtocolServer() {
+ return this.ProtocolAuthServer;
+ }
+
+ public String getDomainName() {
+ return this.DomainName;
+ }
+
+ public boolean Encrypt() {
+ String sErr = "";
+ this.ErrorCode = "0";
+ this.ErrorDescription = "";
+ try {
+ if (this.ShopLogin.length() <= 0) {
+ this.ErrorCode = "546";
+ this.ErrorDescription = "IDshop not valid";
+ return false;
+ }
+ if (controlValues(this.ProtocolAuthServer))
+ this.ProtocolAuthServer = "http://";
+ this.trans = this.ShopLogin.substring(0, 6);
+ this.trans = this.trans.toLowerCase();
+ if (controlValues(this.DomainName))
+ if (this.trans.equals("gespay")) {
+ this.DomainName = "testecomm.sella.it/CryptHTTP";
+ } else {
+ this.DomainName = "ecomms2s.sella.it/CryptHTTP";
+ }
+ if (this.Currency.length() <= 0) {
+ this.ErrorCode = "552";
+ this.ErrorDescription = "Currency not valid";
+ return false;
+ }
+ if (this.Amount.length() <= 0) {
+ this.ErrorCode = "553";
+ this.ErrorDescription = "Amount not valid";
+ return false;
+ }
+ if (this.ShopTransactionID.length() <= 0) {
+ this.ErrorCode = "551";
+ this.ErrorDescription = "Shop Transaction ID not valid";
+ return false;
+ }
+ this.ToBeEncript = "";
+ if (this.CVV.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_CVV=" + this.separator;
+ if (this.Min.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_MIN=" + this.separator;
+ if (this.Currency.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_UICCODE=" + this.separator;
+ if (this.Amount.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_AMOUNT=" + this.separator;
+ if (this.ShopTransactionID.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_SHOPTRANSACTIONID=" + this.separator;
+ if (this.BuyerName.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_CHNAME=" + this.separator;
+ if (this.BuyerEmail.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_CHEMAIL=" + this.separator;
+ if (this.Language.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_IDLANGUAGE=" + this.separator;
+ if (this.CustomInfo.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + this.separator;
+ String urlString = this.ProtocolAuthServer + this.ProtocolAuthServer + "/Encrypt.asp?a=" + this.DomainName + "&b=" + this.ShopLogin + "&c=" +
+ this.ToBeEncript.substring(4, this.ToBeEncript.length());
+ URL url = new URL(urlString);
+ URLConnection connection = url.openConnection();
+ BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+ int nStart = 0;
+ int nEnd = 0;
+ String line = "";
+ while (line != null) {
+ line = in.readLine();
+ if (line != null) {
+ nStart = line.indexOf("#cryptstring#");
+ nEnd = line.lastIndexOf("#/cryptstring#");
+ if (((nStart != -1) ? true : false) & ((nEnd > nStart + 14) ? true : false))
+ this.EncryptedString = line.substring(nStart + 13, nEnd);
+ nStart = line.indexOf("#error#");
+ nEnd = line.lastIndexOf("#/error#");
+ if (((nStart != -1) ? true : false) & ((nEnd > nStart + 8) ? true : false)) {
+ sErr = line.substring(nStart + 7, nEnd);
+ int intsep = sErr.indexOf("-");
+ this.ErrorCode = sErr.substring(0, intsep);
+ this.ErrorDescription = sErr.substring(intsep + 1, sErr.length());
+ return false;
+ }
+ }
+ }
+ in.close();
+ return true;
+ } catch (MalformedURLException ex) {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "Bad URL";
+ return false;
+ } catch (UnknownServiceException ex) {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "ServiceException occurred.";
+ return false;
+ } catch (IOException ex) {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "Bad URL Request";
+ return false;
+ }
+ }
+
+ public boolean Decrypt() {
+ this.ErrorCode = "0";
+ this.ErrorDescription = "";
+ String strdaelim = "";
+ if (this.ShopLogin.length() <= 0) {
+ this.ErrorCode = "546";
+ this.ErrorDescription = "IDshop not valid";
+ return false;
+ }
+ if (controlValues(this.ProtocolAuthServer))
+ this.ProtocolAuthServer = "http://";
+ this.trans = this.ShopLogin.substring(0, 6);
+ this.trans = this.trans.toLowerCase();
+ if (controlValues(this.DomainName))
+ if (this.trans.equals("gespay")) {
+ this.DomainName = "testecomm.sella.it/CryptHTTP";
+ } else {
+ this.DomainName = "ecomms2s.sella.it/CryptHTTP";
+ }
+ if (this.EncryptedString.length() <= 0) {
+ this.ErrorCode = "1009";
+ this.ErrorDescription = "String to Decrypt not valid";
+ return false;
+ }
+ try {
+ String urlString = this.ProtocolAuthServer + this.ProtocolAuthServer + "/Decrypt.asp?a=" + this.DomainName + "&b=" + this.ShopLogin + "&c=" + this.EncryptedString;
+ URL url = new URL(urlString);
+ URLConnection connection = url.openConnection();
+ BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+ int nStart = 0;
+ int nEnd = 0;
+ String line = "";
+ while (line != null) {
+ line = in.readLine();
+ if (line != null) {
+ nStart = line.indexOf("#decryptstring#");
+ nEnd = line.lastIndexOf("#/decryptstring#");
+ if (((nStart != -1) ? true : false) & ((nEnd > nStart + 16) ? true : false))
+ this.Decripted = line.substring(nStart + 15, nEnd);
+ nStart = line.indexOf("#error#");
+ nEnd = line.lastIndexOf("#/error#");
+ if (((nStart != -1) ? true : false) & ((nEnd > nStart + 8) ? true : false)) {
+ String sErr = line.substring(nStart + 7, nEnd);
+ int intsep = sErr.indexOf("-");
+ this.ErrorCode = sErr.substring(0, intsep);
+ this.ErrorDescription = sErr.substring(intsep + 1, sErr.length());
+ return false;
+ }
+ }
+ }
+ in.close();
+ if (this.Decripted.trim() == "") {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "Void String";
+ return false;
+ }
+ if (!Parsing(this.Decripted))
+ return false;
+ return true;
+ } catch (MalformedURLException ex) {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "Bad URL";
+ return false;
+ } catch (UnknownServiceException ex) {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "Service Exception occurred.";
+ return false;
+ } catch (IOException ex) {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "Bad URL Request";
+ return false;
+ }
+ }
+
+ private boolean Parsing(String StringToBeParsed) {
+ int nStart = 0;
+ int nEnd = 0;
+ this.ErrorCode = "";
+ this.ErrorDescription = "";
+ try {
+ nStart = StringToBeParsed.indexOf("PAY1_UICCODE");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.Currency = StringToBeParsed.substring(nStart + 13, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.Currency = StringToBeParsed.substring(nStart + 13, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_AMOUNT");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.Amount = StringToBeParsed.substring(nStart + 12, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.Amount = StringToBeParsed.substring(nStart + 12, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_SHOPTRANSACTIONID");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.ShopTransactionID = StringToBeParsed.substring(nStart + 23, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.ShopTransactionID = StringToBeParsed.substring(nStart + 23, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_CHNAME");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.BuyerName = StringToBeParsed.substring(nStart + 12, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.BuyerName = StringToBeParsed.substring(nStart + 12, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_CHEMAIL");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.BuyerEmail = StringToBeParsed.substring(nStart + 13, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.BuyerEmail = StringToBeParsed.substring(nStart + 13, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_AUTHORIZATIONCODE");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.AuthorizationCode = StringToBeParsed.substring(nStart + 23, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.AuthorizationCode = StringToBeParsed.substring(nStart + 23, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_ERRORCODE");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.ErrorCode = StringToBeParsed.substring(nStart + 15, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.ErrorCode = StringToBeParsed.substring(nStart + 15, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_ERRORDESCRIPTION");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.ErrorDescription = StringToBeParsed.substring(nStart + 22, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.ErrorDescription = StringToBeParsed.substring(nStart + 22, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_BANKTRANSACTIONID");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.BankTransactionID = StringToBeParsed.substring(nStart + 23, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.BankTransactionID = StringToBeParsed.substring(nStart + 23, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_ALERTCODE");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.AlertCode = StringToBeParsed.substring(nStart + 15, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.AlertCode = StringToBeParsed.substring(nStart + 15, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_ALERTDESCRIPTION");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.AlertDescription = StringToBeParsed.substring(nStart + 22, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.AlertDescription = StringToBeParsed.substring(nStart + 22, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_COUNTRY");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.country = StringToBeParsed.substring(nStart + 13, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.country = StringToBeParsed.substring(nStart + 13, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_VBVRISP");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.vbvrisp = StringToBeParsed.substring(nStart + 13, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.vbvrisp = StringToBeParsed.substring(nStart + 13, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_VBV");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.vbv = StringToBeParsed.substring(nStart + 9, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.vbv = StringToBeParsed.substring(nStart + 9, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_IDLANGUAGE");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.Language = StringToBeParsed.substring(nStart + 16, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.Language = StringToBeParsed.substring(nStart + 16, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_TRANSACTIONRESULT");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.TransactionResult = StringToBeParsed.substring(nStart + 23, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.TransactionResult = StringToBeParsed.substring(nStart + 23, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ this.CustomInfo = StringToBeParsed.trim();
+ } catch (Exception e) {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "Error parsing String";
+ return false;
+ }
+ return true;
+ }
+
+ public String URLDecode(String str) throws Exception {
+ if (str == null)
+ return null;
+ char[] res = new char[str.length()];
+ int didx = 0;
+ for (int sidx = 0; sidx < str.length(); sidx++) {
+ char ch = str.charAt(sidx);
+ if (ch == '+') {
+ res[didx++] = ' ';
+ } else if (ch == '%') {
+ try {
+ res[didx++] =
+ (char)Integer.parseInt(str.substring(sidx + 1, sidx + 3), 16);
+ sidx += 2;
+ } catch (NumberFormatException e) {
+ didx--;
+ res[didx++] = ch;
+ }
+ } else {
+ res[didx++] = ch;
+ }
+ }
+ return String.valueOf(res, 0, didx);
+ }
+
+ protected boolean controlValues(String str) {
+ return (str == null || str.length() == 0);
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sella/GestPayCrypt20.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sella/GestPayCrypt20.java
new file mode 100644
index 00000000..e43752bc
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sella/GestPayCrypt20.java
@@ -0,0 +1,676 @@
+package it.acxent.bank.sella;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLEncoder;
+import java.net.UnknownServiceException;
+
+public class GestPayCrypt20 {
+ private String ShopLogin;
+
+ private String Currency;
+
+ private String Amount;
+
+ private String ShopTransactionID;
+
+ private String BuyerName;
+
+ private String BuyerEmail;
+
+ private String Language;
+
+ private String CustomInfo;
+
+ private String AuthorizationCode;
+
+ private String ErrorCode;
+
+ private String ErrorDescription;
+
+ private String BankTransactionID;
+
+ private String AlertCode;
+
+ private String AlertDescription;
+
+ private String EncryptedString;
+
+ private String ToBeEncript;
+
+ private String Decripted;
+
+ private String TransactionResult;
+
+ private String ProtocolAuthServer = "";
+
+ private String DomainName = "";
+
+ private String separator;
+
+ private String errDescription;
+
+ private String errNumber;
+
+ private String Version = "2.0";
+
+ private String Min = "";
+
+ private String CVV = "";
+
+ private String country = "";
+
+ private String vbvrisp = "";
+
+ private String vbv = "";
+
+ public GestPayCrypt20() {
+ this.ShopLogin = "";
+ this.Currency = "";
+ this.Amount = "";
+ this.ShopTransactionID = "";
+ this.BuyerName = "";
+ this.BuyerEmail = "";
+ this.Language = "";
+ this.CustomInfo = "";
+ this.AuthorizationCode = "";
+ this.ErrorCode = "";
+ this.ErrorDescription = "";
+ this.BankTransactionID = "";
+ this.AlertCode = "";
+ this.AlertDescription = "";
+ this.EncryptedString = "";
+ this.ToBeEncript = "";
+ this.Decripted = "";
+ this.ProtocolAuthServer = "http://";
+ this.DomainName = "ecomm.sella.it/CryptHTTP";
+ this.separator = "*P1*";
+ this.errDescription = "";
+ this.errNumber = "0";
+ this.Min = "";
+ this.CVV = "";
+ this.country = "";
+ this.vbvrisp = "";
+ this.vbv = "";
+ }
+
+ public void SetShopLogin(String xstr) {
+ this.ShopLogin = xstr;
+ }
+
+ public void SetCurrency(String xstr) {
+ this.Currency = xstr;
+ }
+
+ public void SetAmount(String xstr) {
+ this.Amount = xstr;
+ }
+
+ public void SetShopTransactionID(String xstr) {
+ this.ShopTransactionID = URLEncoder.encode(xstr.trim());
+ }
+
+ public void SetMIN(String xstr) {
+ this.Min = xstr;
+ }
+
+ public void SetCVV(String xstr) {
+ this.CVV = xstr;
+ }
+
+ public void SetBuyerName(String xstr) {
+ this.BuyerName = URLEncoder.encode(xstr.trim());
+ }
+
+ public void SetBuyerEmail(String xstr) {
+ this.BuyerEmail = xstr.trim();
+ }
+
+ public void SetLanguage(String xstr) {
+ this.Language = xstr.trim();
+ }
+
+ public void SetCustomInfo(String xstr) {
+ this.CustomInfo = URLEncoder.encode(xstr.trim());
+ }
+
+ public void SetEncryptedString(String xstr) {
+ this.EncryptedString = xstr;
+ }
+
+ public String GetShopLogin() {
+ return this.ShopLogin;
+ }
+
+ public String GetCurrency() {
+ return this.Currency;
+ }
+
+ public String GetAmount() {
+ return this.Amount;
+ }
+
+ public String GetCountry() {
+ return this.country;
+ }
+
+ public String GetVBV() {
+ return this.vbv;
+ }
+
+ public String GetVBVrisp() {
+ return this.vbvrisp;
+ }
+
+ public String GetShopTransactionID() {
+ String app = "";
+ try {
+ app = URLDecode(this.ShopTransactionID);
+ } catch (Exception e) {}
+ return app;
+ }
+
+ public String GetBuyerName() {
+ String appBuyername = "";
+ try {
+ appBuyername = URLDecode(this.BuyerName);
+ } catch (Exception ex) {
+ appBuyername = "errore";
+ }
+ return appBuyername;
+ }
+
+ public String GetBuyerEmail() {
+ return this.BuyerEmail;
+ }
+
+ public String GetCustomInfo() {
+ String appCustom = "";
+ try {
+ appCustom = URLDecode(this.CustomInfo);
+ } catch (Exception e) {}
+ return appCustom;
+ }
+
+ public String GetAuthorizationCode() {
+ return this.AuthorizationCode;
+ }
+
+ public String GetErrorCode() {
+ return this.ErrorCode;
+ }
+
+ public String GetErrorDescription() {
+ return this.ErrorDescription;
+ }
+
+ public String GetBankTransactionID() {
+ return this.BankTransactionID;
+ }
+
+ public String GetTransactionResult() {
+ return this.TransactionResult;
+ }
+
+ public String GetAlertCode() {
+ return this.AlertCode;
+ }
+
+ public String GetAlertDescription() {
+ return this.AlertDescription;
+ }
+
+ public String GetEncryptedString() {
+ return this.EncryptedString;
+ }
+
+ public boolean Encrypt() {
+ String sErr = "";
+ this.ErrorCode = "0";
+ this.ErrorDescription = "";
+ try {
+ if (this.ShopLogin.length() <= 0) {
+ this.ErrorCode = "546";
+ this.ErrorDescription = "IDshop not valid";
+ return false;
+ }
+ if (this.Currency.length() <= 0) {
+ this.ErrorCode = "552";
+ this.ErrorDescription = "Currency not valid";
+ return false;
+ }
+ if (this.Amount.length() <= 0) {
+ this.ErrorCode = "553";
+ this.ErrorDescription = "Amount not valid";
+ return false;
+ }
+ if (this.ShopTransactionID.length() <= 0) {
+ this.ErrorCode = "551";
+ this.ErrorDescription = "Shop Transaction ID not valid";
+ return false;
+ }
+ this.ToBeEncript = "";
+ if (this.CVV.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_CVV=" + this.separator;
+ if (this.Min.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_MIN=" + this.separator;
+ if (this.Currency.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_UICCODE=" + this.separator;
+ if (this.Amount.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_AMOUNT=" + this.separator;
+ if (this.ShopTransactionID.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_SHOPTRANSACTIONID=" + this.separator;
+ if (this.BuyerName.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_CHNAME=" + this.separator;
+ if (this.BuyerEmail.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_CHEMAIL=" + this.separator;
+ if (this.Language.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + "PAY1_IDLANGUAGE=" + this.separator;
+ if (this.CustomInfo.length() > 0)
+ this.ToBeEncript = this.ToBeEncript + this.ToBeEncript + this.separator;
+ String urlString = this.ProtocolAuthServer + this.ProtocolAuthServer + "/Encrypt.asp?a=" + this.DomainName + "&b=" + this.ShopLogin + "&c=" + this.ToBeEncript.substring(4, this.ToBeEncript.length());
+ URL url = new URL(urlString);
+ URLConnection connection = url.openConnection();
+ BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+ int nStart = 0;
+ int nEnd = 0;
+ String line = "";
+ while (line != null) {
+ line = in.readLine();
+ if (line != null) {
+ nStart = line.indexOf("#cryptstring#");
+ nEnd = line.lastIndexOf("#/cryptstring#");
+ if (((nStart != -1) ? true : false) & ((nEnd > nStart + 14) ? true : false))
+ this.EncryptedString = line.substring(nStart + 13, nEnd);
+ nStart = line.indexOf("#error#");
+ nEnd = line.lastIndexOf("#/error#");
+ if (((nStart != -1) ? true : false) & ((nEnd > nStart + 8) ? true : false)) {
+ sErr = line.substring(nStart + 7, nEnd);
+ int intsep = sErr.indexOf("-");
+ this.ErrorCode = sErr.substring(0, intsep);
+ this.ErrorDescription = sErr.substring(intsep + 1, sErr.length());
+ return false;
+ }
+ }
+ }
+ in.close();
+ return true;
+ } catch (MalformedURLException ex) {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "Bad URL";
+ return false;
+ } catch (UnknownServiceException ex) {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "ServiceException occurred.";
+ return false;
+ } catch (IOException ex) {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "Bad URL Request";
+ return false;
+ }
+ }
+
+ public boolean Decrypt() {
+ this.ErrorCode = "0";
+ this.ErrorDescription = "";
+ String strdaelim = "";
+ if (this.ShopLogin.length() <= 0) {
+ this.ErrorCode = "546";
+ this.ErrorDescription = "IDshop not valid";
+ return false;
+ }
+ if (this.EncryptedString.length() <= 0) {
+ this.ErrorCode = "1009";
+ this.ErrorDescription = "String to Decrypt not valid";
+ return false;
+ }
+ try {
+ String urlString = this.ProtocolAuthServer + this.ProtocolAuthServer + "/Decrypt.asp?a=" + this.DomainName + "&b=" + this.ShopLogin + "&c=" + this.EncryptedString;
+ URL url = new URL(urlString);
+ URLConnection connection = url.openConnection();
+ BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+ int nStart = 0;
+ int nEnd = 0;
+ String line = "";
+ while (line != null) {
+ line = in.readLine();
+ if (line != null) {
+ nStart = line.indexOf("#decryptstring#");
+ nEnd = line.lastIndexOf("#/decryptstring#");
+ if (((nStart != -1) ? true : false) & ((nEnd > nStart + 16) ? true : false))
+ this.Decripted = line.substring(nStart + 15, nEnd);
+ nStart = line.indexOf("#error#");
+ nEnd = line.lastIndexOf("#/error#");
+ if (((nStart != -1) ? true : false) & ((nEnd > nStart + 8) ? true : false)) {
+ String sErr = line.substring(nStart + 7, nEnd);
+ int intsep = sErr.indexOf("-");
+ this.ErrorCode = sErr.substring(0, intsep);
+ this.ErrorDescription = sErr.substring(intsep + 1, sErr.length());
+ return false;
+ }
+ }
+ }
+ in.close();
+ if (this.Decripted.trim() == "") {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "Void String";
+ return false;
+ }
+ if (!Parsing(this.Decripted))
+ return false;
+ return true;
+ } catch (MalformedURLException ex) {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "Bad URL";
+ return false;
+ } catch (UnknownServiceException ex) {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "Service Exception occurred.";
+ return false;
+ } catch (IOException ex) {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "Bad URL Request";
+ return false;
+ }
+ }
+
+ private boolean Parsing(String StringToBeParsed) {
+ int nStart = 0;
+ int nEnd = 0;
+ this.ErrorCode = "";
+ this.ErrorDescription = "";
+ try {
+ nStart = StringToBeParsed.indexOf("PAY1_UICCODE");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.Currency = StringToBeParsed.substring(nStart + 13, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.Currency = StringToBeParsed.substring(nStart + 13, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_AMOUNT");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.Amount = StringToBeParsed.substring(nStart + 12, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.Amount = StringToBeParsed.substring(nStart + 12, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_SHOPTRANSACTIONID");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.ShopTransactionID = StringToBeParsed.substring(nStart + 23, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.ShopTransactionID = StringToBeParsed.substring(nStart + 23, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_CHNAME");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.BuyerName = StringToBeParsed.substring(nStart + 12, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.BuyerName = StringToBeParsed.substring(nStart + 12, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_CHEMAIL");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.BuyerEmail = StringToBeParsed.substring(nStart + 13, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.BuyerEmail = StringToBeParsed.substring(nStart + 13, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_AUTHORIZATIONCODE");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.AuthorizationCode = StringToBeParsed.substring(nStart + 23, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.AuthorizationCode = StringToBeParsed.substring(nStart + 23, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_ERRORCODE");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.ErrorCode = StringToBeParsed.substring(nStart + 15, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.ErrorCode = StringToBeParsed.substring(nStart + 15, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_ERRORDESCRIPTION");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.ErrorDescription = StringToBeParsed.substring(nStart + 22, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.ErrorDescription = StringToBeParsed.substring(nStart + 22, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_BANKTRANSACTIONID");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.BankTransactionID = StringToBeParsed.substring(nStart + 23, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.BankTransactionID = StringToBeParsed.substring(nStart + 23, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_ALERTCODE");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.AlertCode = StringToBeParsed.substring(nStart + 15, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.AlertCode = StringToBeParsed.substring(nStart + 15, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_ALERTDESCRIPTION");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.AlertDescription = StringToBeParsed.substring(nStart + 22, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.AlertDescription = StringToBeParsed.substring(nStart + 22, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_COUNTRY");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.country = StringToBeParsed.substring(nStart + 13, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.country = StringToBeParsed.substring(nStart + 13, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_VBVRISP");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.vbvrisp = StringToBeParsed.substring(nStart + 13, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.vbvrisp = StringToBeParsed.substring(nStart + 13, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_VBV");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.vbv = StringToBeParsed.substring(nStart + 9, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.vbv = StringToBeParsed.substring(nStart + 9, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_IDLANGUAGE");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.Language = StringToBeParsed.substring(nStart + 16, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.Language = StringToBeParsed.substring(nStart + 16, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ nStart = StringToBeParsed.indexOf("PAY1_TRANSACTIONRESULT");
+ if (nStart != -1) {
+ nEnd = StringToBeParsed.indexOf(this.separator, nStart);
+ if (nEnd == -1) {
+ nEnd = StringToBeParsed.length();
+ this.TransactionResult = StringToBeParsed.substring(nStart + 23, nEnd);
+ if (nStart >= 4) {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart - 4);
+ } else {
+ StringToBeParsed = StringToBeParsed.substring(0, nStart);
+ }
+ } else {
+ this.TransactionResult = StringToBeParsed.substring(nStart + 23, nEnd);
+ StringToBeParsed = StringToBeParsed.substring(0, nStart) + StringToBeParsed.substring(0, nStart);
+ }
+ }
+ this.CustomInfo = StringToBeParsed.trim();
+ } catch (Exception e) {
+ this.ErrorCode = "9999";
+ this.ErrorDescription = "Error parsing String";
+ return false;
+ }
+ return true;
+ }
+
+ public String URLDecode(String str) throws Exception {
+ if (str == null)
+ return null;
+ char[] res = new char[str.length()];
+ int didx = 0;
+ for (int sidx = 0; sidx < str.length(); sidx++) {
+ char ch = str.charAt(sidx);
+ if (ch == '+') {
+ res[didx++] = ' ';
+ } else if (ch == '%') {
+ try {
+ res[didx++] =
+ (char)Integer.parseInt(str.substring(sidx + 1, sidx + 3), 16);
+ sidx += 2;
+ } catch (NumberFormatException e) {
+ didx--;
+ res[didx++] = ch;
+ }
+ } else {
+ res[didx++] = ch;
+ }
+ }
+ return String.valueOf(res, 0, didx);
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sella/SellaReq.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sella/SellaReq.java
new file mode 100644
index 00000000..8de980fa
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sella/SellaReq.java
@@ -0,0 +1,195 @@
+package it.acxent.bank.sella;
+
+import it.acxent.bank._BankAdapter;
+import it.acxent.common.Parm;
+import it.acxent.common.StatusMsg;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+
+public class SellaReq extends _BankAdapter {
+ public static final String LANG_CODE_IT = "1";
+
+ public static final String LANG_CODE_EN = "2";
+
+ public static final String LANG_CODE_ES = "3";
+
+ public static final String LANG_CODE_FR = "4";
+
+ public static final String LANG_CODE_DE = "5";
+
+ public static final String DIV_CODE_LIRA = "18";
+
+ public static final String DIV_CODE_EURO = "242";
+
+ public static final String P_COD_ESER_SELLA = "COD_ESER_SELLA";
+
+ public static final String P_SELLA_FULL = "SELLA_FULL";
+
+ public static final String DIV_CODE_STERLINE = "2";
+
+ public static final String DIV_CODE_YEN = "71";
+
+ public static final String DIV_CODE_DOLLARL_HK = "103";
+
+ public static final String DIV_CODE_REAL = "234";
+
+ private String myshoplogin;
+
+ private String mycurrency;
+
+ private String myamount;
+
+ private String myshoptransactionID;
+
+ private String mybuyername;
+
+ private String mybuyeremail;
+
+ private String mylanguage;
+
+ private String lang;
+
+ private String mycustominfo;
+
+ public static final String P_PAYMENT_OK_PAGE = "SELLA_OK";
+
+ public static final String P_PAYMENT_ERROR_PAGE = "SELLA_KO";
+
+ public static final String DIV_CODE_DOLLARI = "1";
+
+ public String getMyamount() {
+ return (this.myamount == null) ? "" : this.myamount;
+ }
+
+ public void setMyamount(String myamount) {
+ this.myamount = myamount;
+ }
+
+ public String getMybuyeremail() {
+ return (this.mybuyeremail == null) ? "" : this.mybuyeremail;
+ }
+
+ public void setMybuyeremail(String mybuyeremail) {
+ this.mybuyeremail = mybuyeremail;
+ }
+
+ public String getMybuyername() {
+ return (this.mybuyername == null) ? "" : this.mybuyername;
+ }
+
+ public void setMybuyername(String mybuyername) {
+ this.mybuyername = mybuyername;
+ }
+
+ public String getMycurrency() {
+ return (this.mycurrency == null) ? "" : this.mycurrency;
+ }
+
+ public void setMycurrency(String mycurrency) {
+ this.mycurrency = mycurrency;
+ }
+
+ public String getMycustominfo() {
+ return (this.mycustominfo == null) ? "" : this.mycustominfo;
+ }
+
+ public void setMycustominfo(String mycustominfo) {
+ this.mycustominfo = mycustominfo;
+ }
+
+ public String getMylanguage() {
+ if (this.mylanguage == null || this.mylanguage.isEmpty())
+ this.mylanguage = getMylanguageCode();
+ return this.mylanguage;
+ }
+
+ private String getMylanguageCode() {
+ if (getLang().toLowerCase().equals("it"))
+ return "1";
+ if (getLang().toLowerCase().equals("en"))
+ return "2";
+ if (getLang().toLowerCase().equals("es"))
+ return "3";
+ if (getLang().toLowerCase().equals("fr"))
+ return "4";
+ if (getLang().toLowerCase().equals("de"))
+ return "5";
+ return "2";
+ }
+
+ public String getMyshoplogin() {
+ return (this.myshoplogin == null) ? "" : this.myshoplogin;
+ }
+
+ public void setMyshoplogin(String myshoplogin) {
+ this.myshoplogin = myshoplogin;
+ }
+
+ public String getMyshoptransactionID() {
+ return (this.myshoptransactionID == null) ? "" : this.myshoptransactionID;
+ }
+
+ public void setMyshoptransactionID(String myshoptransactionID) {
+ this.myshoptransactionID = myshoptransactionID;
+ }
+
+ public void setMylanguage(String mylanguage) {
+ this.mylanguage = mylanguage;
+ }
+
+ public String getLang() {
+ return (this.lang == null) ? "" : this.lang;
+ }
+
+ public void setLang(String lang) {
+ this.lang = lang;
+ }
+
+ public static void initApplicationParms(ApplParmFull ap) {
+ boolean debug = false;
+ if (ap != null) {
+ DBAdapter.logDebug(debug, "SELLA chechout initParms: start");
+ String l_tipoParm = "SELLA";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ Parm bean = new Parm(ap);
+ bean.findByCodice("COD_ESER_SELLA");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("COD_ESER_SELLA");
+ bean.setDescrizione("COD_ESER_SELLA");
+ bean.setFlgTipo(0L);
+ bean.setNota("CODICE ESERCENTE BANCA SELLA");
+ bean.save();
+ bean.findByCodice("SELLA_FULL");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SELLA_FULL");
+ bean.setDescrizione("SELLA_FULL");
+ bean.setFlgTipo(5L);
+ bean.setNota("SPECIFICA SE IL CONTRATTO CON SELLA E' DI TIPO FULL");
+ bean.save();
+ bean.findByCodice("SELLA_KO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SELLA_KO");
+ bean.setDescrizione("SELLA_KO");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payRes.jsp");
+ bean.setNota("SELLA_KO");
+ bean.save();
+ bean.findByCodice("SELLA_OK");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SELLA_OK");
+ bean.setDescrizione("SELLA_OK");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payRes.jsp");
+ bean.setNota("SELLA_OK");
+ bean.save();
+ DBAdapter.logDebug(debug, "SELLA chechout initParms: stop");
+ StatusMsg.deleteMsgByTag(ap, "INIT");
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sella/SellaResp.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sella/SellaResp.java
new file mode 100644
index 00000000..d3f0536b
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sella/SellaResp.java
@@ -0,0 +1,185 @@
+package it.acxent.bank.sella;
+
+import it.acxent.bank._BankAdapter;
+
+public class SellaResp extends _BankAdapter {
+ private String myshoplogin;
+
+ private int mycurrency;
+
+ private float myamount;
+
+ private String myshoptrxID;
+
+ private String mybuyername;
+
+ private String mybuyeremail;
+
+ private String mytrxresult;
+
+ private String myauthcode;
+
+ private String myerrorcode;
+
+ private String myerrordescription;
+
+ private String myerrorbanktrxid;
+
+ private long id_ordine;
+
+ private String myalertcode;
+
+ private String myalertdescription;
+
+ private String mycustominfo;
+
+ public SellaResp() {}
+
+ public SellaResp(GestPayCrypt bean) {
+ fillResponse(bean);
+ }
+
+ public String getMyalertcode() {
+ return (this.myalertcode == null) ? "" : this.myalertcode;
+ }
+
+ public void fillResponse(GestPayCrypt bean) {
+ setMyshoplogin(bean.getShopLogin().trim());
+ if (!bean.getCurrency().isEmpty())
+ setMycurrency(Integer.parseInt(bean.getCurrency()));
+ if (!bean.getAmount().isEmpty())
+ setMyamount(Float.parseFloat(bean.getAmount()));
+ setMyshoptrxID(bean.getShopTransactionID().trim());
+ setMybuyername(bean.getBuyerName().trim());
+ setMybuyeremail(bean.getBuyerEmail().trim());
+ setMytrxresult(bean.getTransactionResult().trim());
+ setMyauthcode(bean.getAuthorizationCode());
+ setMyerrorcode(bean.getErrorCode());
+ setMyerrordescription(bean.getErrorDescription().trim());
+ setMyerrorbanktrxid(bean.getBankTransactionID().trim());
+ setMyalertcode(bean.getAlertCode().trim());
+ setMyalertdescription(bean.getAlertDescription().trim());
+ setMycustominfo(bean.getCustomInfo().trim());
+ if (!bean.getShopTransactionID().isEmpty())
+ setId_ordine(Long.parseLong(bean.getShopTransactionID()));
+ }
+
+ public void setMyalertcode(String myalertcode) {
+ this.myalertcode = myalertcode;
+ }
+
+ public String getMyalertdescription() {
+ return (this.myalertdescription == null) ? "" :
+ this.myalertdescription;
+ }
+
+ public void setMyalertdescription(String myalertdescription) {
+ this.myalertdescription = myalertdescription;
+ }
+
+ public float getMyamount() {
+ return this.myamount;
+ }
+
+ public void setMyamount(float myamount) {
+ this.myamount = myamount;
+ }
+
+ public String getMyauthcode() {
+ return (this.myauthcode == null) ? "" : this.myauthcode;
+ }
+
+ public void setMyauthcode(String myauthcode) {
+ this.myauthcode = myauthcode;
+ }
+
+ public String getMybuyeremail() {
+ return (this.mybuyeremail == null) ? "" : this.mybuyeremail;
+ }
+
+ public void setMybuyeremail(String mybuyeremail) {
+ this.mybuyeremail = mybuyeremail;
+ }
+
+ public String getMybuyername() {
+ return (this.mybuyername == null) ? "" : this.mybuyername;
+ }
+
+ public void setMybuyername(String mybuyername) {
+ this.mybuyername = mybuyername;
+ }
+
+ public int getMycurrency() {
+ return this.mycurrency;
+ }
+
+ public void setMycurrency(int mycurrency) {
+ this.mycurrency = mycurrency;
+ }
+
+ public String getMycustominfo() {
+ return (this.mycustominfo == null) ? "" : this.mycustominfo;
+ }
+
+ public void setMycustominfo(String mycustominfo) {
+ this.mycustominfo = mycustominfo;
+ }
+
+ public String getMyerrorbanktrxid() {
+ return (this.myerrorbanktrxid == null) ? "" :
+ this.myerrorbanktrxid;
+ }
+
+ public void setMyerrorbanktrxid(String myerrorbanktrxid) {
+ this.myerrorbanktrxid = myerrorbanktrxid;
+ }
+
+ public String getMyerrorcode() {
+ return (this.myerrorcode == null) ? "" : this.myerrorcode;
+ }
+
+ public void setMyerrorcode(String myerrorcode) {
+ this.myerrorcode = myerrorcode;
+ }
+
+ public String getMyerrordescription() {
+ return (this.myerrordescription == null) ? "" :
+ this.myerrordescription;
+ }
+
+ public void setMyerrordescription(String myerrordescription) {
+ this.myerrordescription = myerrordescription;
+ }
+
+ public String getMyshoplogin() {
+ return (this.myshoplogin == null) ? "" : this.myshoplogin;
+ }
+
+ public void setMyshoplogin(String myshoplogin) {
+ this.myshoplogin = myshoplogin;
+ }
+
+ public String getMyshoptrxID() {
+ return (this.myshoptrxID == null) ? "" : this.myshoptrxID;
+ }
+
+ public void setMyshoptrxID(String myshoptrxID) {
+ this.myshoptrxID = myshoptrxID;
+ }
+
+ public String getMytrxresult() {
+ return (this.mytrxresult == null) ? "" : this.mytrxresult;
+ }
+
+ public void setMytrxresult(String mytrxresult) {
+ this.mytrxresult = mytrxresult;
+ }
+
+ public long getId_ordine() {
+ return this.id_ordine;
+ }
+
+ public void setId_ordine(long id_ordine) {
+ this.id_ordine = id_ordine;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sellaPCredit/ConselTabfin.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sellaPCredit/ConselTabfin.java
new file mode 100644
index 00000000..50024aa9
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sellaPCredit/ConselTabfin.java
@@ -0,0 +1,184 @@
+package it.acxent.bank.sellaPCredit;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class ConselTabfin extends DBAdapter implements Serializable {
+ public static final double MIN_FIN = 168.0D;
+
+ public static final double MAX_FIN = 7500.0D;
+
+ private long id_conselTabfin;
+
+ private String flgTipo;
+
+ private double valoreBene;
+
+ private long durata;
+
+ private double importoRata;
+
+ private double tan;
+
+ private double taeg;
+
+ private double interessi;
+
+ private double speseGestSingolaRata;
+
+ private double speseGestTotaleRata;
+
+ private double impostaBollo;
+
+ private double importoTotaleDovuto;
+
+ public ConselTabfin(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public ConselTabfin() {}
+
+ public void setId_conselTabfin(long newId_conselTabfin) {
+ this.id_conselTabfin = newId_conselTabfin;
+ }
+
+ public void setFlgTipo(String newFlgTipo) {
+ this.flgTipo = newFlgTipo;
+ }
+
+ public void setValoreBene(double newValoreBene) {
+ this.valoreBene = newValoreBene;
+ }
+
+ public void setDurata(long newDurata) {
+ this.durata = newDurata;
+ }
+
+ public void setImportoRata(double newImportoRata) {
+ this.importoRata = newImportoRata;
+ }
+
+ public void setTan(double newTan) {
+ this.tan = newTan;
+ }
+
+ public void setTaeg(double newTaeg) {
+ this.taeg = newTaeg;
+ }
+
+ public void setInteressi(double newInteressi) {
+ this.interessi = newInteressi;
+ }
+
+ public void setSpeseGestSingolaRata(double newSpeseGestSingolaRata) {
+ this.speseGestSingolaRata = newSpeseGestSingolaRata;
+ }
+
+ public void setSpeseGestTotaleRata(double newSpeseGestTotaleRata) {
+ this.speseGestTotaleRata = newSpeseGestTotaleRata;
+ }
+
+ public void setImpostaBollo(double newImpostaBollo) {
+ this.impostaBollo = newImpostaBollo;
+ }
+
+ public void setImportoTotaleDovuto(double newImportoTotaleDovuto) {
+ this.importoTotaleDovuto = newImportoTotaleDovuto;
+ }
+
+ public long getId_conselTabfin() {
+ return this.id_conselTabfin;
+ }
+
+ public String getFlgTipo() {
+ return (this.flgTipo == null) ? "" : this.flgTipo.trim();
+ }
+
+ public double getValoreBene() {
+ return this.valoreBene;
+ }
+
+ public long getDurata() {
+ return this.durata;
+ }
+
+ public double getImportoRata() {
+ return this.importoRata;
+ }
+
+ public double getTan() {
+ return this.tan;
+ }
+
+ public double getTaeg() {
+ return this.taeg;
+ }
+
+ public double getInteressi() {
+ return this.interessi;
+ }
+
+ public double getSpeseGestSingolaRata() {
+ return this.speseGestSingolaRata;
+ }
+
+ public double getSpeseGestTotaleRata() {
+ return this.speseGestTotaleRata;
+ }
+
+ public double getImpostaBollo() {
+ return this.impostaBollo;
+ }
+
+ public double getImportoTotaleDovuto() {
+ return this.importoTotaleDovuto;
+ }
+
+ protected ResParm checkDeleteCascade() {
+ return new ResParm(true);
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(ConselTabfinCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from CONSEL_TABFIN AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (CR.getValoreBene() > 0.0D)
+ wc.addWc("A.valoreBene=" + CR.getValoreBene());
+ if (!CR.getFlgTipo().isEmpty())
+ wc.addWc("A.flgTipo='" + CR.getFlgTipo() + "'");
+ if (CR.getDurata() > 0L)
+ wc.addWc("A.durata=" + CR.getDurata());
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public void findByTipoValoreDurata(String l_flgTipo, double l_valore, long l_durata) {
+ String s_Sql_Find = "select A.* from CONSEL_TABFIN AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("A.valoreBene=" + Math.round(l_valore));
+ wc.addWc("A.flgTipo='" + l_flgTipo + "'");
+ wc.addWc("A.durata=" + l_durata);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sellaPCredit/ConselTabfinCR.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sellaPCredit/ConselTabfinCR.java
new file mode 100644
index 00000000..05956806
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sellaPCredit/ConselTabfinCR.java
@@ -0,0 +1,132 @@
+package it.acxent.bank.sellaPCredit;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class ConselTabfinCR extends CRAdapter {
+ private long id_conselTabfin;
+
+ private String flgTipo;
+
+ private double valoreBene;
+
+ private long durata;
+
+ private double importoRata;
+
+ private double tan;
+
+ private double taeg;
+
+ private double interessi;
+
+ private double speseGestSingolaRata;
+
+ private double speseGestTotaleRata;
+
+ private double impostaBollo;
+
+ private double importoTotaleDovuto;
+
+ public ConselTabfinCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public ConselTabfinCR() {}
+
+ public void setId_conselTabfin(long newId_conselTabfin) {
+ this.id_conselTabfin = newId_conselTabfin;
+ }
+
+ public void setFlgTipo(String newFlgTipo) {
+ this.flgTipo = newFlgTipo;
+ }
+
+ public void setValoreBene(double newValoreBene) {
+ this.valoreBene = newValoreBene;
+ }
+
+ public void setDurata(long newDurata) {
+ this.durata = newDurata;
+ }
+
+ public void setImportoRata(double newImportoRata) {
+ this.importoRata = newImportoRata;
+ }
+
+ public void setTan(double newTan) {
+ this.tan = newTan;
+ }
+
+ public void setTaeg(double newTaeg) {
+ this.taeg = newTaeg;
+ }
+
+ public void setInteressi(double newInteressi) {
+ this.interessi = newInteressi;
+ }
+
+ public void setSpeseGestSingolaRata(double newSpeseGestSingolaRata) {
+ this.speseGestSingolaRata = newSpeseGestSingolaRata;
+ }
+
+ public void setSpeseGestTotaleRata(double newSpeseGestTotaleRata) {
+ this.speseGestTotaleRata = newSpeseGestTotaleRata;
+ }
+
+ public void setImpostaBollo(double newImpostaBollo) {
+ this.impostaBollo = newImpostaBollo;
+ }
+
+ public void setImportoTotaleDovuto(double newImportoTotaleDovuto) {
+ this.importoTotaleDovuto = newImportoTotaleDovuto;
+ }
+
+ public long getId_conselTabfin() {
+ return this.id_conselTabfin;
+ }
+
+ public String getFlgTipo() {
+ return (this.flgTipo == null) ? "" : this.flgTipo.trim();
+ }
+
+ public double getValoreBene() {
+ return this.valoreBene;
+ }
+
+ public long getDurata() {
+ return this.durata;
+ }
+
+ public double getImportoRata() {
+ return this.importoRata;
+ }
+
+ public double getTan() {
+ return this.tan;
+ }
+
+ public double getTaeg() {
+ return this.taeg;
+ }
+
+ public double getInteressi() {
+ return this.interessi;
+ }
+
+ public double getSpeseGestSingolaRata() {
+ return this.speseGestSingolaRata;
+ }
+
+ public double getSpeseGestTotaleRata() {
+ return this.speseGestTotaleRata;
+ }
+
+ public double getImpostaBollo() {
+ return this.impostaBollo;
+ }
+
+ public double getImportoTotaleDovuto() {
+ return this.importoTotaleDovuto;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sellaPCredit/SellaPCreditReq.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sellaPCredit/SellaPCreditReq.java
new file mode 100644
index 00000000..10e4b215
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sellaPCredit/SellaPCreditReq.java
@@ -0,0 +1,369 @@
+package it.acxent.bank.sellaPCredit;
+
+import it.acxent.common.Parm;
+import it.acxent.common.StatusMsg;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+
+public class SellaPCreditReq {
+ public static final String P_COD_TIPO_PRODOTTO_SELLA_P_CREDIT = "COD_TIPO_PRODOTTO_SELLA_P_CREDIT";
+
+ private String tipoesec;
+
+ private String tabellaFinanziaria;
+
+ private String cognome;
+
+ private String nome;
+
+ private String indirizzo;
+
+ private String cellulare;
+
+ private String pref_num;
+
+ private String data_nascita;
+
+ private String indirizzo_mail;
+
+ private ApplParmFull ap;
+
+ private String ordine;
+
+ private String descrizioneBene;
+
+ private String anticipoS;
+
+ private String codiceMerce;
+
+ private String codiceProdotto;
+
+ private String codiceConvenzionato;
+
+ private String importoDaFinanziare;
+
+ public static final String SELLA_P_CREDIT_TAB_FIN_90 = "WIP";
+
+ private double anticipo;
+
+ private String impspe;
+
+ private String codiceFiscale;
+
+ private String numeroTelefono;
+
+ private String commissioni;
+
+ public static final String P_SELLA_P_CREDIT_IMPORTO_MINIMO = "SELLA_P_CREDIT_IMPORTO_MINIMO";
+
+ public static final String P_SELLA_P_CREDIT_TEST = "SELLA_P_CREDIT_TEST";
+
+ public static final String P_SELLA_P_CREDIT_OK_PAGE = "SELLA_P_CREDIT_OK_PAGE";
+
+ public static final String SELLA_P_CREDIT_TAB_FIN_TASSO_0 = "MPF";
+
+ public static final String SELLA_P_CREDIT_TAB_FIN_30 = "WIN";
+
+ public static final String REQUEST_SERVER = "https://secure.sellapersonalcredit.it/econsel/public/entry/pf";
+
+ public static final String REQUEST_SERVER_TEST = "https://sandbox.sellapersonalcredit.it/econsel/public/entry/pf";
+
+ public static final String P_COD_TIPO_MERCE_SELLA_P_CREDIT = "COD_TIPO_MERCE_SELLA_P_CREDIT";
+
+ public static final String P_COD_CONVENZIONE_SELLA_P_CREDIT = "COD_CONVENZIONE_SELLA_P_CREDIT";
+
+ public static final String P_SELLA_P_CREDIT_ERROR_PAGE = "SELLA_P_CREDIT_ERROR_PAGE";
+
+ public static final String P_SELLA_P_CREDIT_RATA0 = "SELLA_P_CREDIT_RATA0";
+
+ public SellaPCreditReq(ApplParmFull l_ap) {
+ setAp(l_ap);
+ }
+
+ public SellaPCreditReq() {}
+
+ public String getTipoesec() {
+ return "T";
+ }
+
+ public void setTipoesec(String tipoesec) {
+ this.tipoesec = tipoesec;
+ }
+
+ public String getTabellaFinanziaria() {
+ if (isTest())
+ return "WIN";
+ return (this.tabellaFinanziaria == null) ? "" : this.tabellaFinanziaria.trim();
+ }
+
+ public void setTabellaFinanziaria(String tabfin) {
+ this.tabellaFinanziaria = tabfin;
+ }
+
+ public String getCognome() {
+ return (this.cognome == null) ? "" : this.cognome.trim();
+ }
+
+ public void setCognome(String cognome) {
+ this.cognome = cognome;
+ }
+
+ public String getNome() {
+ return (this.nome == null) ? "" : this.nome.trim();
+ }
+
+ public void setNome(String nome) {
+ this.nome = nome;
+ }
+
+ public String getIndirizzo() {
+ return (this.indirizzo == null) ? "" : this.indirizzo.trim();
+ }
+
+ public void setIndirizzo(String indirizzo) {
+ this.indirizzo = indirizzo;
+ }
+
+ public String getNumeroTelefono() {
+ return (this.numeroTelefono == null) ? "" : this.numeroTelefono.trim();
+ }
+
+ public void setNumeroTelefono(String tel_num) {
+ this.numeroTelefono = tel_num;
+ }
+
+ public String getPref_num() {
+ return (this.pref_num == null) ? "" : this.pref_num.trim();
+ }
+
+ public void setPref_num(String pref_num) {
+ this.pref_num = pref_num;
+ }
+
+ public String getData_nascita() {
+ return (this.data_nascita == null) ? "" : this.data_nascita.trim();
+ }
+
+ public void setData_nascita(String data_nascita) {
+ this.data_nascita = data_nascita;
+ }
+
+ public String getIndirizzo_mail() {
+ return (this.indirizzo_mail == null) ? "" : this.indirizzo_mail.trim();
+ }
+
+ public void setIndirizzo_mail(String testomail) {
+ this.indirizzo_mail = testomail;
+ }
+
+ public String getCodiceFiscale() {
+ return (this.codiceFiscale == null) ? "" : this.codiceFiscale.trim();
+ }
+
+ public void setCodiceFiscale(String codfisc) {
+ this.codiceFiscale = codfisc;
+ }
+
+ public String getOrdine() {
+ return (this.ordine == null) ? "" : this.ordine.trim();
+ }
+
+ public void setOrdine(String ordine) {
+ this.ordine = ordine;
+ }
+
+ public String getDescrizioneBene() {
+ return (this.descrizioneBene == null) ? "" : this.descrizioneBene.trim();
+ }
+
+ public void setDescrizioneBene(String descri1) {
+ this.descrizioneBene = descri1;
+ }
+
+ public String getAnticipoS() {
+ return (this.anticipoS == null) ? "" : this.anticipoS;
+ }
+
+ public void setAnticipoS(String parz1) {
+ this.anticipoS = parz1;
+ }
+
+ public String getCodiceMerce() {
+ if (isTest())
+ return "HT";
+ if (this.codiceMerce == null)
+ this.codiceMerce = getApFull().getParm("COD_TIPO_MERCE_SELLA_P_CREDIT").getTesto();
+ return this.codiceMerce;
+ }
+
+ public boolean isTest() {
+ return getApFull().getParm("SELLA_P_CREDIT_TEST").isTrue();
+ }
+
+ public void setCodiceMerce(String h_merce) {
+ this.codiceMerce = h_merce;
+ }
+
+ public String getCodiceProdotto() {
+ if (isTest())
+ return "50";
+ if (this.codiceProdotto == null)
+ this.codiceProdotto = getApFull().getParm("COD_TIPO_PRODOTTO_SELLA_P_CREDIT").getTesto();
+ return this.codiceProdotto;
+ }
+
+ public void setCodiceProdotto(String h_prod) {
+ this.codiceProdotto = h_prod;
+ }
+
+ public String getCodiceConvenzionato() {
+ if (isTest())
+ return "0049613";
+ if (this.codiceConvenzionato == null)
+ this.codiceConvenzionato = getApFull().getParm("COD_CONVENZIONE_SELLA_P_CREDIT").getTesto().trim();
+ return this.codiceConvenzionato;
+ }
+
+ public void setCodiceConvenzionato(String convenz) {
+ this.codiceConvenzionato = convenz;
+ }
+
+ public String getImportoDaFinanziare() {
+ return (this.importoDaFinanziare == null) ? "" : this.importoDaFinanziare;
+ }
+
+ public void setImportoDaFinanziare(String impdafin) {
+ this.importoDaFinanziare = impdafin;
+ }
+
+ public double getAnticipo() {
+ return this.anticipo;
+ }
+
+ public String getRequestServer() {
+ if (isTest())
+ return "https://sandbox.sellapersonalcredit.it/econsel/public/entry/pf";
+ return "https://secure.sellapersonalcredit.it/econsel/public/entry/pf";
+ }
+
+ public void setAnticipo(double anticipo) {
+ this.anticipo = anticipo;
+ }
+
+ public static void initApplicationParms(ApplParmFull ap) {
+ if (ap != null) {
+ DBAdapter.logDebug(true, "SELLA_P_CREDIT chechout initParms: start");
+ String l_tipoParm = "";
+ Parm bean = new Parm(ap);
+ l_tipoParm = "SELLA_P_CREDIT";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("COD_CONVENZIONE_SELLA_P_CREDIT");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("COD_CONVENZIONE_SELLA_P_CREDIT");
+ bean.setDescrizione("COD_CONVENZIONE_SELLA_P_CREDIT");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("0026321");
+ bean.setNota("CODICE CONVENZIONE SELLA_P_CREDIT");
+ bean.save();
+ bean.findByCodice("COD_TIPO_MERCE_SELLA_P_CREDIT");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("COD_TIPO_MERCE_SELLA_P_CREDIT");
+ bean.setDescrizione("COD_TIPO_MERCE_SELLA_P_CREDIT");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("HT");
+ bean.setNota("CODICE INDICATIVO MERCE FINANZIATA ");
+ bean.save();
+ bean.findByCodice("COD_TIPO_PRODOTTO_SELLA_P_CREDIT");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("COD_TIPO_PRODOTTO_SELLA_P_CREDIT");
+ bean.setDescrizione("COD_TIPO_PRODOTTO_SELLA_P_CREDIT");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("50");
+ bean.setNota("CODICE INDICATIVO PRODOTTO FINANZIATO");
+ bean.save();
+ bean.findByCodice("SELLA_P_CREDIT_ERROR_PAGE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SELLA_P_CREDIT_ERROR_PAGE");
+ bean.setDescrizione("SELLA_P_CREDIT_ERROR_PAGE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("sellaPCreditRes.jsp");
+ bean.setNota("SELLA_P_CREDIT_ERROR_PAGE");
+ bean.save();
+ bean.findByCodice("SELLA_P_CREDIT_OK_PAGE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SELLA_P_CREDIT_OK_PAGE");
+ bean.setDescrizione("SELLA_P_CREDIT_OK_PAGE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("sellaPCreditRes.jsp");
+ bean.setNota("SELLA_P_CREDIT_OK_PAGE");
+ bean.save();
+ bean.findByCodice("SELLA_P_CREDIT_TEST");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SELLA_P_CREDIT_TEST");
+ bean.setDescrizione("SELLA_P_CREDIT_TEST");
+ bean.setFlgTipo(5L);
+ bean.setNota("0-->NO 1-->SI");
+ bean.save();
+ bean.findByCodice("SELLA_P_CREDIT_IMPORTO_MINIMO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SELLA_P_CREDIT_IMPORTO_MINIMO");
+ bean.setDescrizione("SELLA_P_CREDIT_IMPORTO_MINIMO");
+ bean.setFlgTipo(1L);
+ bean.setNota("SELLA_P_CREDIT_IMPORTO_MINIMO");
+ bean.save();
+ bean.findByCodice("SELLA_P_CREDIT_RATA0");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SELLA_P_CREDIT_RATA0");
+ bean.setDescrizione("SELLA_P_CREDIT_RATA0");
+ bean.setFlgTipo(5L);
+ bean.setNota(" ATTIVA ANCHE RATA 0 SOPRA L'IMPORTO DEFINITO DA SELLA_P_CREDIT_IMPORTO_MINIMO 0: RATA 0 NON ATTIVA 1: RATA 0 ATTIVA");
+ bean.save();
+ DBAdapter.logDebug(true, "SELLA_P_CREDIT chechout initParms: stop");
+ }
+ }
+
+ public String getImpspe() {
+ return (this.impspe == null) ? "" : this.impspe;
+ }
+
+ public void setImpspe(String impspe) {
+ this.impspe = impspe;
+ }
+
+ public ApplParmFull getApFull() {
+ return this.ap;
+ }
+
+ public void setAp(ApplParmFull ap) {
+ this.ap = ap;
+ }
+
+ public String getCellulare() {
+ return (this.cellulare == null) ? "" : this.cellulare.trim();
+ }
+
+ public void setCellulare(String cellulare) {
+ this.cellulare = cellulare;
+ }
+
+ public String getCommissioni() {
+ return (this.commissioni == null) ? "" : this.commissioni.trim();
+ }
+
+ public void setCommissioni(String commissioni) {
+ this.commissioni = commissioni;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sellaPCredit/SellaPCreditResp.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sellaPCredit/SellaPCreditResp.java
new file mode 100644
index 00000000..114df62c
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sellaPCredit/SellaPCreditResp.java
@@ -0,0 +1,67 @@
+package it.acxent.bank.sellaPCredit;
+
+import it.acxent.db.ApplParmFull;
+
+public class SellaPCreditResp {
+ private String pratica;
+
+ private ApplParmFull ap;
+
+ private String ordine;
+
+ private String praticabis;
+
+ private String stato;
+
+ public static final String SELLA_P_CREDIT_VALUTAZIONE = "WW";
+
+ public static final String SELLA_P_CREDIT_KO = "KO";
+
+ public static final String SELLA_P_CREDIT_OK = "OK";
+
+ public SellaPCreditResp(ApplParmFull l_ap) {
+ setAp(l_ap);
+ }
+
+ public SellaPCreditResp() {}
+
+ public String getOrdine() {
+ return (this.ordine == null) ? "" : this.ordine.trim();
+ }
+
+ public void setOrdine(String ordine) {
+ this.ordine = ordine;
+ }
+
+ public ApplParmFull getApFull() {
+ return this.ap;
+ }
+
+ public void setAp(ApplParmFull ap) {
+ this.ap = ap;
+ }
+
+ public String getPratica() {
+ return (this.pratica == null) ? "" : this.pratica.trim();
+ }
+
+ public void setPratica(String pratica) {
+ this.pratica = pratica;
+ }
+
+ public String getPraticabis() {
+ return (this.praticabis == null) ? "" : this.praticabis.trim();
+ }
+
+ public void setPraticabis(String praticabis) {
+ this.praticabis = praticabis;
+ }
+
+ public String getStato() {
+ return (this.stato == null) ? "" : this.stato.trim();
+ }
+
+ public void setStato(String stato) {
+ this.stato = stato;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sellaPCredit/package-info.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sellaPCredit/package-info.java
new file mode 100644
index 00000000..a93b34fa
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sellaPCredit/package-info.java
@@ -0,0 +1 @@
+package it.acxent.bank.sellaPCredit;
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/consel/ConselReqSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/consel/ConselReqSvlt.java
new file mode 100644
index 00000000..744e1abd
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/consel/ConselReqSvlt.java
@@ -0,0 +1,118 @@
+package it.acxent.bank.servlet.consel;
+
+import it.acxent.bank.consel.ConselReq;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLEncoder;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public abstract class ConselReqSvlt extends ConselSvlt {
+ protected void sendRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ String conselSite = "https://reserved.e-consel.it/DOL/faces/frmECProntoTuo.jsp";
+ ConselReq conselReq = new ConselReq(getApFull());
+ fillObject(req, conselReq);
+ caricaConselRequest(req, conselReq);
+ if (getParm("CONSEL_TEST").getNumeroLong() == 1L)
+ caricaDemoRequest(req, conselReq);
+ req.setAttribute("conselReq", conselReq);
+ RequestDispatcher rd = getServletContext()
+ .getRequestDispatcher("/conselReq.jsp");
+ rd.forward((ServletRequest)req, (ServletResponse)res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ sendRequest(req, res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected abstract void caricaConselRequest(HttpServletRequest paramHttpServletRequest, ConselReq paramConselReq);
+
+ private void caricaDemoRequest(HttpServletRequest req, ConselReq conselReq) {
+ conselReq.setCodfisc("CLMCST80A01D969I");
+ conselReq.setCognome("COLOMBO");
+ conselReq.setNome("CRISTOFORO");
+ conselReq.setData_nascita("01/01/1980");
+ }
+
+ protected void sendRequestOld(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ String conselSite = "https://reserved.e-consel.it/DOL/faces/frmECProntoTuo.jsp";
+ ConselReq conselReq = new ConselReq(getApFull());
+ fillObject(req, conselReq);
+ caricaConselRequest(req, conselReq);
+ if (getParm("TEST").getNumeroLong() == 1L)
+ caricaDemoRequest(req, conselReq);
+ StringBuffer data = new StringBuffer(URLEncoder.encode("tiposec", "UTF-8") + "=" + URLEncoder.encode("tiposec", "UTF-8"));
+ data.append("&" + URLEncoder.encode("tabfin", "UTF-8") + "=" +
+ URLEncoder.encode(conselReq.getTabfin(), "UTF-8"));
+ data.append("&" + URLEncoder.encode("convenz", "UTF-8") + "=" +
+ URLEncoder.encode(conselReq.getConvenz(), "UTF-8"));
+ data.append("&" + URLEncoder.encode("h_merce", "UTF-8") + "=" +
+ URLEncoder.encode(conselReq.getH_merce(), "UTF-8"));
+ data.append("&" + URLEncoder.encode("h_prod", "UTF-8") + "=" +
+ URLEncoder.encode(conselReq.getH_prod(), "UTF-8"));
+ data.append("&" + URLEncoder.encode("cognome", "UTF-8") + "=" +
+ URLEncoder.encode(conselReq.getCognome(), "UTF-8"));
+ data.append("&" + URLEncoder.encode("nome", "UTF-8") + "=" +
+ URLEncoder.encode(conselReq.getNome(), "UTF-8"));
+ data.append("&" + URLEncoder.encode("ordine", "UTF-8") + "=" +
+ URLEncoder.encode(conselReq.getOrdine(), "UTF-8"));
+ data.append("&" + URLEncoder.encode("anticipo", "UTF-8") + "=" +
+ conselReq.getAnticipo());
+ data.append("&" + URLEncoder.encode("descr1", "UTF-8") + "=" +
+ URLEncoder.encode(conselReq.getDescri1(), "UTF-8"));
+ data.append("&" + URLEncoder.encode("parz1", "UTF-8") + "=" +
+ conselReq.getParz1());
+ data.append("&" + URLEncoder.encode("tel_num", "UTF-8") + "=" +
+ URLEncoder.encode(conselReq.getTel_num(), "UTF-8"));
+ data.append("&" + URLEncoder.encode("pref_num", "UTF-8") + "=" +
+ URLEncoder.encode(conselReq.getPref_num(), "UTF-8"));
+ data.append("&" + URLEncoder.encode("impspe", "UTF-8") + "=" +
+ conselReq.getImpspe());
+ data.append("&" + URLEncoder.encode("impdafin", "UTF-8") + "=" +
+ conselReq.getImpdafin());
+ data.append("&" + URLEncoder.encode("data_nascita", "UTF-8") + "=" +
+ URLEncoder.encode(conselReq.getData_nascita(), "UTF-8"));
+ data.append("&" + URLEncoder.encode("indirizzo", "UTF-8") + "=" +
+ URLEncoder.encode(conselReq.getIndirizzo(), "UTF-8"));
+ data.append("&" + URLEncoder.encode("testomail", "UTF-8") + "=" +
+ URLEncoder.encode(conselReq.getTestomail(), "UTF-8"));
+ data.append("&" + URLEncoder.encode("codifisc", "UTF-8") + "=" +
+ URLEncoder.encode(conselReq.getCodfisc(), "UTF-8"));
+ URL url = new URL(conselSite);
+ URLConnection conn = url.openConnection();
+ conn.setDoOutput(true);
+ OutputStreamWriter wr = new OutputStreamWriter(
+ conn.getOutputStream());
+ wr.write(data.toString());
+ wr.flush();
+ BufferedReader rd = new BufferedReader(new InputStreamReader(
+ conn.getInputStream()));
+ ServletOutputStream sos = res.getOutputStream();
+ String line;
+ while ((line = rd.readLine()) != null)
+ sos.write(line.getBytes(), 0, line.length());
+ wr.close();
+ sos.flush();
+ sos.close();
+ rd.close();
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/consel/ConselRespSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/consel/ConselRespSvlt.java
new file mode 100644
index 00000000..78df2b45
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/consel/ConselRespSvlt.java
@@ -0,0 +1,39 @@
+package it.acxent.bank.servlet.consel;
+
+import it.acxent.bank.consel.ConselResp;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public abstract class ConselRespSvlt extends ConselSvlt {
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ manageResponse(req, res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected void manageResponse(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ ConselResp conselResp = new ConselResp(getApFull());
+ fillObject(req, conselResp);
+ if (conselResp.getStato().toLowerCase()
+ .equals("OK".toLowerCase()) ||
+
+ conselResp.getStato()
+ .toLowerCase()
+ .equals("WW".toLowerCase())) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ } else {
+ setJspPageRelative(getJspKoPage(req, res), req);
+ }
+ manageConselResponse(req, conselResp);
+ req.setAttribute("conselResp", conselResp);
+ callJsp(req, res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected abstract void manageConselResponse(HttpServletRequest paramHttpServletRequest, ConselResp paramConselResp);
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/consel/ConselSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/consel/ConselSvlt.java
new file mode 100644
index 00000000..a5b79dc9
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/consel/ConselSvlt.java
@@ -0,0 +1,68 @@
+package it.acxent.bank.servlet.consel;
+
+import it.acxent.bank.consel.ConselTabfin;
+import it.acxent.bank.consel.ConselTabfinCR;
+import it.acxent.servlet.AcServlet;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class ConselSvlt extends AcServlet {
+ protected static final String CONSEL_REQ_JSP = "/conselReq.jsp";
+
+ protected static final String BEAN_CONSEL_REQ = "conselReq";
+
+ protected static final String BEAN_CONSEL_RESP = "conselResp";
+
+ protected final void callJsp(HttpServletRequest req, HttpServletResponse res) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ try {
+ RequestDispatcher rd = getServletContext().getRequestDispatcher(getJspPage(req));
+ rd.forward((ServletRequest)req, (ServletResponse)res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected String getCodiceConvenzione(HttpServletRequest req) {
+ return getParm("COD_CONVENZIONE_SELLA_P_CREDIT").getTesto();
+ }
+
+ protected String getJspErrorPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("SELLA_P_CREDIT_ERROR_PAGE").getTesto();
+ if (temp.isEmpty())
+ return getJspKoPage(req, res);
+ return temp;
+ }
+
+ protected String getJspOkPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("SELLA_P_CREDIT_OK_PAGE").getTesto();
+ if (temp.isEmpty())
+ return "conselRes.jsp";
+ return temp;
+ }
+
+ protected String getJspKoPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("SELLA_P_CREDIT_OK_PAGE").getTesto();
+ if (temp.isEmpty())
+ return "conselRes.jsp";
+ return temp;
+ }
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ ConselTabfin ct = new ConselTabfin(getApFull());
+ ConselTabfinCR CR = new ConselTabfinCR();
+ fillObject(req, CR);
+ req.setAttribute("list", ct.findByCR(CR, 0, 0));
+ req.setAttribute("CR", CR);
+ req.setAttribute("nf3", getNf3());
+ setJspPageRelative("tabfin" + CR.getFlgTipo() + getAct(req) + ".jsp", req);
+ callJsp(req, res);
+ }
+
+ protected boolean isSecureServlet(HttpServletRequest req) {
+ return false;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/infogroup/GetShopnetResponseSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/infogroup/GetShopnetResponseSvlt.java
new file mode 100644
index 00000000..17da90f5
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/infogroup/GetShopnetResponseSvlt.java
@@ -0,0 +1,10 @@
+package it.acxent.bank.servlet.infogroup;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public abstract class GetShopnetResponseSvlt extends ShopNetSvlt {
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ getResponse(req, res);
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/infogroup/ShopNetSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/infogroup/ShopNetSvlt.java
new file mode 100644
index 00000000..ca723ae6
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/infogroup/ShopNetSvlt.java
@@ -0,0 +1,91 @@
+package it.acxent.bank.servlet.infogroup;
+
+import it.acxent.bank.infogroup.ShopnetResp;
+import it.acxent.servlet.AcServlet;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public abstract class ShopNetSvlt extends AcServlet {
+ protected static final String BEAN_SHOPNETRES = "shopnetResp";
+
+ protected final void callJsp(HttpServletRequest req, HttpServletResponse res) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ try {
+ RequestDispatcher rd = getServletContext()
+ .getRequestDispatcher(getJspPage(req));
+ rd.forward((ServletRequest)req, (ServletResponse)res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected abstract void fillIdOrdineByShopnetRes(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse, ShopnetResp paramShopnetResp);
+
+ protected void getResponse(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ ShopnetResp snRes = new ShopnetResp();
+ fillObject(req, snRes);
+ fillIdOrdineByShopnetRes(req, res, snRes);
+ if (snRes.getStato() == 2L) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ recordOrder(req, res, snRes);
+ } else {
+ sendMessage(req, "Errore! Transazione annullata.");
+ payKoUpdateOrder(req, res, snRes);
+ setJspPageRelative(getJspKoPage(req, res), req);
+ }
+ req.setAttribute("shopnetResp", snRes);
+ preparePaymenResPage(req, res, snRes);
+ callJsp(req, res);
+ } catch (Exception e) {
+ setJspPageRelative(getJspErrorPage(req, res), req);
+ String temp = "ERRORE!!Shopnet! Risposta non valida: ";
+ sendMessage(req, temp);
+ handleDebug(temp, 2);
+ preparePaymenResPage(req, res, null);
+ callJsp(req, res);
+ }
+ }
+
+ protected String getJspErrorPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("PAY_OK").getTesto();
+ if (temp.isEmpty())
+ return getJspKoPage(req, res);
+ return temp;
+ }
+
+ protected String getJspOkPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("PAY_OK").getTesto();
+ if (temp.isEmpty())
+ return "payRes.jsp";
+ return temp;
+ }
+
+ protected String getJspKoPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("PAY_OK").getTesto();
+ if (temp.isEmpty())
+ return "payRes.jsp";
+ return temp;
+ }
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ getResponse(req, res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected boolean isSecureServlet(HttpServletRequest req) {
+ return false;
+ }
+
+ protected abstract void recordOrder(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse, ShopnetResp paramShopnetResp);
+
+ protected void preparePaymenResPage(HttpServletRequest req, HttpServletResponse res, ShopnetResp snRes) {}
+
+ protected abstract void payKoUpdateOrder(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse, ShopnetResp paramShopnetResp);
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/keyclient/GetKeyClientResponseSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/keyclient/GetKeyClientResponseSvlt.java
new file mode 100644
index 00000000..b1e6c718
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/keyclient/GetKeyClientResponseSvlt.java
@@ -0,0 +1,39 @@
+package it.acxent.bank.servlet.keyclient;
+
+import it.acxent.bank.keyclient.KeyClientResp;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public abstract class GetKeyClientResponseSvlt extends KeyClientSvlt {
+ protected abstract void preparePaymenResPage(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse, KeyClientResp paramKeyClientResp);
+
+ protected abstract void recordOrder(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse, KeyClientResp paramKeyClientResp);
+
+ protected void getResponse(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ KeyClientResp kcRes = new KeyClientResp();
+ fillObject(req, kcRes);
+ kcRes.setBRAND(getRequestParameter(req, "$BRAND"));
+ if (kcRes.getEsito().equals("OK")) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ recordOrder(req, res, kcRes);
+ } else {
+ setJspPageRelative(getJspKoPage(req, res), req);
+ }
+ req.setAttribute("KCResp", kcRes);
+ preparePaymenResPage(req, res, kcRes);
+ callJsp(req, res);
+ } catch (Exception e) {
+ setJspPageRelative(getJspErrorPage(req, res), req);
+ String temp = "ERRORE!!Key Client! Risposta non valida: ";
+ sendMessage(req, temp);
+ handleDebug(temp, 2);
+ preparePaymenResPage(req, res, null);
+ callJsp(req, res);
+ }
+ }
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ getResponse(req, res);
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/keyclient/KeyClientSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/keyclient/KeyClientSvlt.java
new file mode 100644
index 00000000..695338f5
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/keyclient/KeyClientSvlt.java
@@ -0,0 +1,119 @@
+package it.acxent.bank.servlet.keyclient;
+
+import it.acxent.bank.infogroup.ShopnetResp;
+import it.acxent.bank.keyclient.KeyClientReq;
+import it.acxent.servlet.AcServlet;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class KeyClientSvlt extends AcServlet {
+ protected static final String BEAN_KC_RES = "KCResp";
+
+ protected static final String CMD_GET_RES = "res";
+
+ protected static final String CMD_SEND_REQ = "send";
+
+ protected final void callJsp(HttpServletRequest req, HttpServletResponse res) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ try {
+ RequestDispatcher rd = getServletContext()
+ .getRequestDispatcher(getJspPage(req));
+ rd.forward((ServletRequest)req, (ServletResponse)res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected void getResponse(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected String getJspErrorPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("KC_PAY_OK").getTesto();
+ if (temp.isEmpty())
+ return getJspKoPage(req, res);
+ return temp;
+ }
+
+ protected String getJspOkPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("KC_PAY_OK").getTesto();
+ if (temp.isEmpty())
+ return "payRes.jsp";
+ return temp;
+ }
+
+ protected String getJspKoPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("KC_PAY_OK").getTesto();
+ if (temp.isEmpty())
+ return "payRes.jsp";
+ return temp;
+ }
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ String cmd = getCmd(req).toLowerCase();
+ try {
+ if (cmd.equals("send")) {
+ sendRequest(req, res);
+ } else if (cmd.equals("res")) {
+ getResponse(req, res);
+ } else {
+ sendRequest(req, res);
+ }
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected boolean isSecureServlet(HttpServletRequest req) {
+ return false;
+ }
+
+ protected void payKoUpdateOrder(HttpServletRequest req, HttpServletResponse res, ShopnetResp snRes) {}
+
+ protected void sendRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ String theUrl;
+ KeyClientReq kcReq = new KeyClientReq();
+ fillObject(req, kcReq);
+ kcReq.setKey(getParm("KC_KEY").getTesto());
+ kcReq.setAlias(getParm("KC_ALIAS").getTesto());
+ kcReq.setUrl(getParm("KC_URL_RESPONSE").getTesto());
+ kcReq.setUrl_back(getParm("KC_URL_RESPONSE_NULL")
+ .getTesto());
+ if (getParm("TEST").getNumeroLong() == 1L) {
+ theUrl = kcReq.getTestRequestUrl();
+ } else {
+ theUrl = kcReq.getRequestUrl();
+ System.out.println(theUrl);
+ System.out.println(kcReq.getTestRequestUrl());
+ }
+ if (!theUrl.equals("")) {
+ res.sendRedirect(theUrl);
+ } else {
+ setJspPageRelative(getJspErrorPage(req, res), req);
+ String temp = "ERRORE!!KeyClient Svlt! Impossibile creare url di richiesta!";
+ sendMessage(req, temp);
+ getResponse(req, res);
+ handleDebug(temp, 2);
+ callJsp(req, res);
+ }
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected String getUrlResponse(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("KC_URL_RESPONSE").getTesto();
+ if (temp.isEmpty())
+ return "RicevutaKC.abl";
+ return temp;
+ }
+
+ protected String getUrlResponseNull(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("KC_URL_RESPONSE_NULL").getTesto();
+ if (temp.isEmpty())
+ return "RicevutaKC.abl";
+ return temp;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/paypal/GetPayPalResponseSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/paypal/GetPayPalResponseSvlt.java
new file mode 100644
index 00000000..4b5d4dd2
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/paypal/GetPayPalResponseSvlt.java
@@ -0,0 +1,11 @@
+package it.acxent.bank.servlet.paypal;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@Deprecated
+public class GetPayPalResponseSvlt extends PayPalSvlt {
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ getPayerDatails(req, res);
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/paypal/PayPalSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/paypal/PayPalSvlt.java
new file mode 100644
index 00000000..615bc38f
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/paypal/PayPalSvlt.java
@@ -0,0 +1,301 @@
+package it.acxent.bank.servlet.paypal;
+
+import it.acxent.bank.paypal.PayPalReq;
+import it.acxent.bank.paypal.PayPalResp;
+import it.acxent.servlet.AcServlet;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLEncoder;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@Deprecated
+public class PayPalSvlt extends AcServlet {
+ private static final long serialVersionUID = 5690538301539954108L;
+
+ public static final String CMD_SET_EXPRESS_CEHCKOUT = "start";
+
+ public static final String CMD_DO_EXPRESS_CEHCKOUT = "dopayment";
+
+ protected static final String CMD_GET_RES = "res";
+
+ protected static final String BEAN_PAYPALRES = "payPalResp";
+
+ private String payPalHttpServer;
+
+ private static final boolean debug = false;
+
+ private static boolean debugRecordOrder = false;
+
+ private String API_VERSION = "98";
+
+ protected final void callJsp(HttpServletRequest req, HttpServletResponse res) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ try {
+ RequestDispatcher rd = getServletContext().getRequestDispatcher(getJspPage(req));
+ rd.forward((ServletRequest)req, (ServletResponse)res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected void doSetExpressCheckout(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ PayPalReq ppReq = new PayPalReq();
+ fillObject(req, ppReq);
+ String sec = getRequiredParameterstring() + "&CURRENCYCODE=" + getRequiredParameterstring() + "&METHOD=SetExpressCheckout&AMT=" + getCurrency() + "&RETURNURL=" +
+ URLEncoder.encode(String.valueOf(ppReq.getAmt())) + "&CANCELURL=" +
+ URLEncoder.encode(getReturnURL(req, res)) + "&" + URLEncoder.encode(getCancelURL(req, res));
+ String pageStyle = getPageStyle();
+ if (!pageStyle.equals(""))
+ sec = sec + "&PAGESTYLE=" + sec;
+ String urlString = getPayPalHttpServer(req) + "?" + getPayPalHttpServer(req);
+ URL url = new URL(urlString);
+ URLConnection connection = url.openConnection();
+ BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+ PayPalResp ppResponse = new PayPalResp();
+ ppResponse.fillResponse(in);
+ ppResponse.setId_ordine(ppReq.getId_ordine());
+ req.getSession().setAttribute("_SESS_ID_ORDER", new Long(ppReq.getId_ordine()));
+ if (ppResponse.isResponseOk()) {
+ String rediretUrl;
+ if (getParm("TEST").getNumeroLong() == 1L) {
+ rediretUrl = "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=" + ppResponse.getTOKEN();
+ } else {
+ rediretUrl = "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=" + ppResponse.getTOKEN();
+ }
+ req.getSession().setAttribute("_SESS_TOKEN", ppResponse.getTOKEN());
+ res.sendRedirect(rediretUrl);
+ } else {
+ req.setAttribute("payPalResp", ppResponse);
+ setJspPageRelative(getJspErrorPage(req, res), req);
+ String temp = "ERRORE!!PayPal Error! Code: " + ppResponse.getL_ERRORCODE0() + ": " + ppResponse.getL_SHORTMESSAGE0() + " " +
+ ppResponse.getL_LONGMESSAGE0();
+ sendMessage(req, temp);
+ preparePaymenResPage(req, res, ppResponse);
+ handleDebug(temp, 2);
+ callJsp(req, res);
+ }
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected void getPayerDatails(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ String token = (String)req.getSession().getAttribute("_SESS_TOKEN");
+ String sec = getRequiredParameterstring() + "&METHOD=GetExpressCheckoutDetails&TOKEN=" + getRequiredParameterstring();
+ String urlString = getPayPalHttpServer(req) + "?" + getPayPalHttpServer(req);
+ URL url = new URL(urlString);
+ URLConnection connection = url.openConnection();
+ BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+ PayPalResp ppResponse = new PayPalResp();
+ ppResponse.fillResponse(in);
+ long l_id_ordine = (Long)req.getSession().getAttribute("_SESS_ID_ORDER");
+ ppResponse.setId_ordine(l_id_ordine);
+ fillObject(req, ppResponse);
+ if (ppResponse.isResponseOk() && !ppResponse.getPAYERID().isEmpty()) {
+ ppResponse.setDetailBuyer(true);
+ setJspPageRelative(getJspPayerDetailsPage(req, res), req);
+ } else {
+ if (ppResponse.isResponseOk())
+ sendMessage(req, "Transazione Abbandonata!");
+ ppResponse.setDetailBuyer(false);
+ setJspPageRelative(getJspKoPage(req, res), req);
+ }
+ req.setAttribute("payPalResp", ppResponse);
+ preparePaymenResPage(req, res, ppResponse);
+ callJsp(req, res);
+ } catch (Exception e) {
+ setJspPageRelative(getJspErrorPage(req, res), req);
+ String temp = "ERRORE!!PayPal Error! getPayerDetail: ";
+ sendMessage(req, temp);
+ handleDebug(temp, 2);
+ preparePaymenResPage(req, res, null);
+ callJsp(req, res);
+ }
+ }
+
+ protected void doExpresssCheckout(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ PayPalResp ppResponse = new PayPalResp();
+ if (!debugRecordOrder) {
+ PayPalReq ppReq = new PayPalReq();
+ fillObject(req, ppReq);
+ long l_id_ordine = (Long)req.getSession().getAttribute("_SESS_ID_ORDER");
+ String sec = getRequiredParameterstring() + "&CURRENCYCODE=" + getRequiredParameterstring() + "&METHOD=DoExpressCheckoutPayment&TOKEN=" + getCurrency() + "&AMT=" +
+ ppReq.getTOKEN() + "&PAYERID=" + ppReq.getAmt() + "&PAYMENTACTION=Sale";
+ String urlString = getPayPalHttpServer(req) + "?" + getPayPalHttpServer(req);
+ URL url = new URL(urlString);
+ URLConnection connection = url.openConnection();
+ BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+ ppResponse.fillResponse(in);
+ ppResponse.setId_ordine(l_id_ordine);
+ fillObject(req, ppResponse);
+ if (!ppResponse.isResponseOk()) {
+ ppResponse.setDetailBuyer(false);
+ setJspPageRelative(getJspKoPage(req, res), req);
+ } else {
+ ppResponse.setPaymentDone(true);
+ ppResponse.setDetailBuyer(true);
+ setJspPageRelative(getJspOkPage(req, res), req);
+ recordOrder(req, res, ppResponse);
+ }
+ } else {
+ fillObject(req, ppResponse);
+ ppResponse.setACK("Success");
+ ppResponse.setAMT("40.00");
+ ppResponse.setPaymentDone(true);
+ recordOrder(req, res, ppResponse);
+ }
+ req.setAttribute("payPalResp", ppResponse);
+ preparePaymenResPage(req, res, ppResponse);
+ callJsp(req, res);
+ } catch (Exception e) {
+ setJspPageRelative(getJspErrorPage(req, res), req);
+ String temp = "ERRORE!!PayPal Error! getPayerDetail: ";
+ sendMessage(req, temp);
+ handleDebug(temp, 2);
+ preparePaymenResPage(req, res, null);
+ callJsp(req, res);
+ }
+ }
+
+ protected String getJspErrorPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("PAYPAL_OK").getTesto();
+ if (temp.isEmpty())
+ return "payPalRes.jsp";
+ return temp;
+ }
+
+ protected String getJspOkPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("PAYPAL_OK").getTesto();
+ if (temp.isEmpty())
+ return "payPalRes.jsp";
+ return temp;
+ }
+
+ protected String getJspPayerDetailsPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("PAYPAL_DETAIL").getTesto();
+ if (temp.isEmpty())
+ return "payPalRes.jsp";
+ return temp;
+ }
+
+ protected String getReturnURL(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("PAYPAL_RETURNURL").getTesto();
+ if (temp.isEmpty())
+ return "http://localhost:8080/mrcocci/PayPalResp.abl";
+ return temp;
+ }
+
+ protected String getCancelURL(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("PAYPAL_CANCELURL").getTesto();
+ if (temp.isEmpty())
+ return "http://localhost:8080/mrcocci/PayPalResp.abl";
+ return temp;
+ }
+
+ protected String getJspKoPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("PAYPAL_OK").getTesto();
+ if (temp.isEmpty())
+ return "payPalRes.jsp";
+ return temp;
+ }
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ String cmd = getCmd(req).toLowerCase();
+ if (cmd.equals("start")) {
+ doSetExpressCheckout(req, res);
+ } else if (cmd.equals("res")) {
+ getPayerDatails(req, res);
+ } else if (cmd.equals("dopayment")) {
+ doExpresssCheckout(req, res);
+ } else {
+ doSetExpressCheckout(req, res);
+ }
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected boolean isSecureServlet(HttpServletRequest req) {
+ return false;
+ }
+
+ protected boolean isApiCertificate(HttpServletRequest req) {
+ long temp = getParm("PAYPAL_USE_CERTIFICATE").getNumeroLong();
+ if (temp == 1L)
+ return true;
+ return false;
+ }
+
+ protected void recordOrder(HttpServletRequest req, HttpServletResponse res, PayPalResp ppResponse) {}
+
+ protected void preparePaymenResPage(HttpServletRequest req, HttpServletResponse res, PayPalResp ppResponse) {}
+
+ private String getPayPalHttpServer(HttpServletRequest req) {
+ if (getParm("TEST").getNumeroLong() == 1L) {
+ System.out.println("PAYPAL TEST!!!! USING SANDBOX");
+ if (isApiCertificate(req)) {
+ this.payPalHttpServer = "https://api.sandbox.paypal.com/nvp";
+ } else {
+ this.payPalHttpServer = "https://api-aa-3t.sandbox.paypal.com/nvp";
+ }
+ } else if (isApiCertificate(req)) {
+ this.payPalHttpServer = "https://api.paypal.com/nvp";
+ } else {
+ this.payPalHttpServer = "https://api-3t.paypal.com/nvp";
+ }
+ return this.payPalHttpServer;
+ }
+
+ public void setPayPalHttpServer(String payPalHttpServer) {
+ this.payPalHttpServer = payPalHttpServer;
+ }
+
+ private String getRequiredParameterstring() {
+ return "USER=" + getApiUsername() + "&PWD=" + getApiPassword() + "&SIGNATURE=" + getApiSignature() + "&VERSION=" + this.API_VERSION;
+ }
+
+ protected String getApiPassword() {
+ String temp = getParm("PAYPAL_API_PWD").getTesto();
+ if (temp.isEmpty())
+ return "1196089261";
+ return temp;
+ }
+
+ protected String getApiSignature() {
+ String temp = getParm("PAYPAL_API_SIGNATURE").getTesto();
+ if (temp.isEmpty())
+ return "AGAgVmHK8-QsvPbEGnNP6SiFg7qvADQfsLa6GrW8G43-yqX46vNyyZzG";
+ return temp;
+ }
+
+ private String getPageStyle() {
+ String temp = getParm("PAYPAL_PAGE_STYLE").getTesto();
+ if (temp.isEmpty())
+ return "";
+ return temp;
+ }
+
+ protected String getApiUsername() {
+ String temp = getParm("PAYPAL_API_USERNAME").getTesto();
+ if (temp.isEmpty())
+ return "acolzi_1196089239_biz_api1.f3.com";
+ return temp;
+ }
+
+ protected String getCurrency() {
+ String temp = getParm("PAYPAL_CURRENCY").getTesto();
+ if (temp.isEmpty())
+ return "EUR";
+ return temp;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/paypalcheckout/PaypalCheckoutSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/paypalcheckout/PaypalCheckoutSvlt.java
new file mode 100644
index 00000000..64df38ad
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/paypalcheckout/PaypalCheckoutSvlt.java
@@ -0,0 +1,182 @@
+package it.acxent.bank.servlet.paypalcheckout;
+
+import com.paypal.http.HttpResponse;
+import com.paypal.http.serializer.Json;
+import com.paypal.orders.Order;
+import it.acxent.bank.paypalcheckout.PayPalOrder;
+import it.acxent.bank.paypalcheckout.PayPalReq;
+import it.acxent.db.DBAdapter;
+import it.acxent.servlet.AcServlet;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.io.IOUtils;
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+public class PaypalCheckoutSvlt extends AcServlet {
+ private static final long serialVersionUID = 5690568301539954108L;
+
+ public static final String CMD_CREATE_ORDER = "createOrder";
+
+ public static final String CMD_GET_ORDER_DETAILS = "getOrderDetails";
+
+ protected static final String CMD_GET_RES = "res";
+
+ protected static final String BEAN_PAYPALRES = "payPalResp";
+
+ private static final boolean debug = false;
+
+ protected final void callJsp(HttpServletRequest req, HttpServletResponse res) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ try {
+ RequestDispatcher rd = getServletContext().getRequestDispatcher(getJspPage(req));
+ rd.forward((ServletRequest)req, (ServletResponse)res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ private void _createOrder(HttpServletRequest req, HttpServletResponse res) {
+ PayPalReq pReq = getPayPalReq(req, res);
+ pReq.setPaypalClientId(getApplicationClientId());
+ pReq.setPaypalClientSecret(getApplicationClienteSecret());
+ pReq.setUseSandbox(isUseSandbox(req));
+ try {
+ HttpResponse respOrd = new PayPalOrder(pReq).createOrder(false);
+ String orderId = ((Order)respOrd.result()).id();
+ String result = "{\"orderID\":\"" + orderId + "\"}";
+ System.out.println(String.valueOf(DBAdapter.getNow()) + " _createOrder paypalcheckoutsvlt: " + String.valueOf(DBAdapter.getNow()));
+ pReq.setPaypalOrderId(orderId);
+ updatePaypalOrderId(req, pReq);
+ sendHtmlMsgResponse(req, res, result);
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.out.println(String.valueOf(DBAdapter.getNow()) + " _createOrder paypalcheckoutsvlt: exception; " + String.valueOf(DBAdapter.getNow()));
+ }
+ }
+
+ private String getJspOkPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("PAYPAL_OK").getTesto();
+ if (temp.isEmpty())
+ return "payPalRes.jsp";
+ return temp;
+ }
+
+ private String getCancelURL(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("PAYPAL_CANCELURL").getTesto();
+ if (temp.isEmpty())
+ return "http://localhost/cc/PayPalCOResp.abl";
+ return temp;
+ }
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ String cmd = getCmd(req);
+ if (cmd.equals("createOrder")) {
+ _createOrder(req, res);
+ } else {
+ _getPayerDatails(req, res);
+ }
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected boolean isSecureServlet(HttpServletRequest req) {
+ return false;
+ }
+
+ private boolean isUseSandbox(HttpServletRequest req) {
+ return getParm("P_PAYPAL_CHECKOUT_USE_SANDBOX").isTrue();
+ }
+
+ protected void recordOrder(HttpServletRequest req, HttpServletResponse res, JSONObject jso) {}
+
+ private String getApplicationClientId() {
+ String temp = getParm("PAYPAL_CHECKOUT_APPLICATION_CLIENT_ID").getTesto();
+ if (temp.isEmpty())
+ return "ASB7x1BxlkomVZ1BM0OesK2SuCLjRq9R4dyc5rtCVBzM7nHB0eunZyyxO4758BgXnZBV9JSCZ3bqpFw9";
+ return temp;
+ }
+
+ private String getApplicationClienteSecret() {
+ String temp = getParm("PAYPAL_CHECKOUT_APPLICATION_CLIENT_SECRET").getTesto();
+ if (temp.isEmpty())
+ return "EFiYhkh4tgv1d3Wnx2qUAG1_BtxddWoGhZTlV7EseRfP4uKFMRAub_5G9D9PIgTObVjB54SZd2UNyXlZ";
+ return temp;
+ }
+
+ private String getCurrency() {
+ String temp = getParm("PAYPAL_CURRENCY").getTesto();
+ if (temp.isEmpty())
+ return "EUR";
+ return temp;
+ }
+
+ private String getReturnURL(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("PAYPAL_RETURNURL").getTesto();
+ if (temp.isEmpty())
+ return "http://localhost/cc/PayPalCOResp.abl";
+ return temp;
+ }
+
+ private void _getPayerDatails(HttpServletRequest req, HttpServletResponse res) {
+ PayPalReq preq = new PayPalReq();
+ fillObject(req, preq);
+ preq.setPaypalClientId(getApplicationClientId());
+ preq.setPaypalClientSecret(getApplicationClienteSecret());
+ preq.setUseSandbox(isUseSandbox(req));
+ System.out.println("PAYPALCHECKOUT _getPayerDatails .... ");
+ try {
+ String orderIdJson = IOUtils.toString(req.getReader());
+ JSONObject jso = new JSONObject(orderIdJson);
+ String orderId = jso.getString("orderID");
+ HttpResponse respOrd = new PayPalOrder(preq).getOrder(orderId);
+ JSONObject jsonRespObj = new JSONObject(new Json().serialize(respOrd.result()));
+ String json = jsonRespObj.toString(4);
+ String status = jsonRespObj.getString("status");
+ System.out.println("PAYPALCHECKOUT _getPayerDatails status: " + status);
+ if (status.equals("COMPLETED"))
+ recordOrder(req, res, jsonRespObj);
+ sendHtmlMsgResponse(req, res, json);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected PayPalReq getPayPalReq(HttpServletRequest req, HttpServletResponse res) {
+ return null;
+ }
+
+ protected void updatePaypalOrderId(HttpServletRequest req, PayPalReq pReq) {}
+
+ protected String extractTransactionId(JSONObject jo) {
+ String transactionId = "";
+ if (jo == null)
+ return transactionId;
+ try {
+ if (!jo.has("purchase_units"))
+ return transactionId;
+ JSONArray purchaseUnits = jo.optJSONArray("purchase_units");
+ if (purchaseUnits == null || purchaseUnits.isEmpty())
+ return transactionId;
+ JSONObject firstPurchaseUnit = purchaseUnits.optJSONObject(0);
+ if (firstPurchaseUnit == null)
+ return transactionId;
+ JSONObject payments = firstPurchaseUnit.optJSONObject("payments");
+ if (payments == null)
+ return transactionId;
+ JSONArray captures = payments.optJSONArray("captures");
+ if (captures == null || captures.isEmpty())
+ return transactionId;
+ JSONObject firstCapture = captures.optJSONObject(0);
+ if (firstCapture == null)
+ return transactionId;
+ transactionId = firstCapture.optString("id", "");
+ } catch (Exception e) {}
+ return transactionId;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sella/GetSellaResponseSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sella/GetSellaResponseSvlt.java
new file mode 100644
index 00000000..eb6f9df1
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sella/GetSellaResponseSvlt.java
@@ -0,0 +1,47 @@
+package it.acxent.bank.servlet.sella;
+
+import it.acxent.bank.sella.GestPayCrypt;
+import it.acxent.bank.sella.SellaResp;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public abstract class GetSellaResponseSvlt extends SellaSvlt {
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ getResponse(req, res);
+ }
+
+ protected void getResponse(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ GestPayCrypt objCrypt = new GestPayCrypt();
+ String a = req.getParameter("a");
+ String b = req.getParameter("b");
+ a = a.trim();
+ b = b.trim();
+ GestPayCrypt objdeCrypt = new GestPayCrypt();
+ objdeCrypt.setShopLogin(a);
+ objdeCrypt.setEncryptedString(b);
+ objdeCrypt.Decrypt();
+ SellaResp sellaRes = new SellaResp(objdeCrypt);
+ if (sellaRes.getMyerrorcode().equals("0")) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ recordOrder(req, res, sellaRes);
+ } else {
+ setJspPageRelative(getJspKoPage(req, res), req);
+ }
+ req.setAttribute("sellaResp", sellaRes);
+ preparePaymenResPage(req, res, sellaRes);
+ callJsp(req, res);
+ } catch (Exception e) {
+ setJspPageRelative(getJspErrorPage(req, res), req);
+ String temp = "ERRORE!!GestPay Error! Risposta non valida: ";
+ sendMessage(req, temp);
+ handleDebug(temp, 2);
+ preparePaymenResPage(req, res, null);
+ callJsp(req, res);
+ }
+ }
+
+ protected abstract void preparePaymenResPage(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse, SellaResp paramSellaResp);
+
+ protected abstract void recordOrder(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse, SellaResp paramSellaResp);
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sella/SellaSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sella/SellaSvlt.java
new file mode 100644
index 00000000..b1fee78e
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sella/SellaSvlt.java
@@ -0,0 +1,118 @@
+package it.acxent.bank.servlet.sella;
+
+import it.acxent.bank.sella.GestPayCrypt;
+import it.acxent.bank.sella.SellaReq;
+import it.acxent.servlet.AcServlet;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class SellaSvlt extends AcServlet {
+ protected static final String CMD_SEND_REQ = "send";
+
+ protected static final String CMD_GET_RES = "res";
+
+ protected static final String BEAN_SELLA_RES = "sellaResp";
+
+ protected final void callJsp(HttpServletRequest req, HttpServletResponse res) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ try {
+ RequestDispatcher rd = getServletContext().getRequestDispatcher(getJspPage(req));
+ rd.forward((ServletRequest)req, (ServletResponse)res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected void sendRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ GestPayCrypt objCrypt = new GestPayCrypt();
+ SellaReq sellareq = new SellaReq();
+ fillObject(req, sellareq);
+ objCrypt.setShopLogin(getCodiceEsercente(req));
+ objCrypt.setCurrency(sellareq.getMycurrency());
+ if (getParm("TEST").getNumeroLong() == 1L) {
+ objCrypt.setAmount("0.12");
+ } else {
+ objCrypt.setAmount(sellareq.getMyamount());
+ }
+ objCrypt.setShopTransactionID(sellareq.getMyshoptransactionID());
+ if (getParm("SELLA_FULL").isTrue()) {
+ if (!sellareq.getMybuyername().isEmpty())
+ objCrypt.setBuyerName(sellareq.getMybuyername());
+ if (!sellareq.getMybuyeremail().isEmpty())
+ objCrypt.setBuyerEmail(sellareq.getMybuyeremail());
+ if (!sellareq.getMylanguage().isEmpty())
+ objCrypt.setLanguage(sellareq.getMylanguage());
+ if (!sellareq.getMycustominfo().isEmpty())
+ objCrypt.setCustomInfo(sellareq.getMycustominfo());
+ }
+ String tempX = "cod eserc.: " + objCrypt.getShopLogin() + " curr:" + objCrypt.getCurrency() + " amount:" + objCrypt.getAmount() + " shoptranid:" +
+ objCrypt.getShopTransactionID() + " buyername:" + objCrypt.getBuyerName() + " buyeremail:" +
+ objCrypt.getBuyerEmail() + " lang:" + sellareq.getMylanguage() + " custinfo:" + objCrypt.getCustomInfo();
+ System.out.println("SELLA:SENDREQUEST ENCRYPT: " + tempX);
+ objCrypt.Encrypt();
+ String b = "";
+ String a = "";
+ if (objCrypt.getErrorCode().equals("0")) {
+ String sellaSite;
+ b = objCrypt.getEncryptedString();
+ a = objCrypt.getShopLogin();
+ if (getParm("TEST").getNumeroLong() == 1L) {
+ sellaSite = "testecomm.sella.it";
+ } else {
+ sellaSite = "ecomm.sella.it";
+ }
+ String requestPage = "https://" + sellaSite + "/gestpay/pagam.asp?a=" + a + "&b=" + b;
+ res.sendRedirect(requestPage);
+ } else {
+ setJspPageRelative(getJspErrorPage(req, res), req);
+ String temp = "ERRORE!!GestPay Error! Code: " + objCrypt.getErrorCode() + ": " + objCrypt.getErrorDescription();
+ sendMessage(req, temp);
+ handleDebug(temp, 2);
+ callJsp(req, res);
+ }
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected String getCodiceEsercente(HttpServletRequest req) {
+ return getParm("COD_ESER_SELLA").getTesto();
+ }
+
+ protected String getJspErrorPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("SELLA_OK").getTesto();
+ if (temp.isEmpty())
+ return getJspKoPage(req, res);
+ return temp;
+ }
+
+ protected String getJspOkPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("SELLA_OK").getTesto();
+ if (temp.isEmpty())
+ return "payRes.jsp";
+ return temp;
+ }
+
+ protected String getJspKoPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("SELLA_OK").getTesto();
+ if (temp.isEmpty())
+ return "payRes.jsp";
+ return temp;
+ }
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ sendRequest(req, res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected boolean isSecureServlet(HttpServletRequest req) {
+ return false;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sellaPCredit/SellaPCreditReqSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sellaPCredit/SellaPCreditReqSvlt.java
new file mode 100644
index 00000000..b5356dc3
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sellaPCredit/SellaPCreditReqSvlt.java
@@ -0,0 +1,45 @@
+package it.acxent.bank.servlet.sellaPCredit;
+
+import it.acxent.bank.sellaPCredit.SellaPCreditReq;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public abstract class SellaPCreditReqSvlt extends SellaPCreditlSvlt {
+ protected void sendRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ SellaPCreditReq conselReq = new SellaPCreditReq(getApFull());
+ String conselSite = conselReq.getRequestServer();
+ fillObject(req, conselReq);
+ if (!getRequestParameter(req, "tabfin").isEmpty())
+ conselReq.setTabellaFinanziaria(getRequestParameter(req, "tabfin"));
+ caricaSellaPCreditRequest(req, conselReq);
+ if (getParm("SELLA_P_CREDIT_TEST").isTrue())
+ caricaDemoRequest(req, conselReq);
+ req.setAttribute("sellaPCreditReq", conselReq);
+ RequestDispatcher rd = getServletContext().getRequestDispatcher("/sellaPCreditReq.jsp");
+ rd.forward((ServletRequest)req, (ServletResponse)res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ sendRequest(req, res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected abstract void caricaSellaPCreditRequest(HttpServletRequest paramHttpServletRequest, SellaPCreditReq paramSellaPCreditReq);
+
+ private void caricaDemoRequest(HttpServletRequest req, SellaPCreditReq conselReq) {
+ conselReq.setCodiceFiscale("CLMCST80A01D969I");
+ conselReq.setCognome("COLOMBO");
+ conselReq.setNome("CRISTOFORO");
+ conselReq.setData_nascita("01/01/1980");
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sellaPCredit/SellaPCreditRespSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sellaPCredit/SellaPCreditRespSvlt.java
new file mode 100644
index 00000000..741016f9
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sellaPCredit/SellaPCreditRespSvlt.java
@@ -0,0 +1,39 @@
+package it.acxent.bank.servlet.sellaPCredit;
+
+import it.acxent.bank.sellaPCredit.SellaPCreditResp;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public abstract class SellaPCreditRespSvlt extends SellaPCreditlSvlt {
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ manageResponse(req, res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected void manageResponse(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ SellaPCreditResp conselResp = new SellaPCreditResp(getApFull());
+ fillObject(req, conselResp);
+ if (conselResp.getStato().toLowerCase()
+ .equals("OK".toLowerCase()) ||
+
+ conselResp.getStato()
+ .toLowerCase()
+ .equals("WW".toLowerCase())) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ } else {
+ setJspPageRelative(getJspKoPage(req, res), req);
+ }
+ manageSellaPCreditResponse(req, conselResp);
+ req.setAttribute("sellaPCreditResp", conselResp);
+ callJsp(req, res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected abstract void manageSellaPCreditResponse(HttpServletRequest paramHttpServletRequest, SellaPCreditResp paramSellaPCreditResp);
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sellaPCredit/SellaPCreditlSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sellaPCredit/SellaPCreditlSvlt.java
new file mode 100644
index 00000000..e16066aa
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sellaPCredit/SellaPCreditlSvlt.java
@@ -0,0 +1,68 @@
+package it.acxent.bank.servlet.sellaPCredit;
+
+import it.acxent.bank.sellaPCredit.ConselTabfin;
+import it.acxent.bank.sellaPCredit.ConselTabfinCR;
+import it.acxent.servlet.AcServlet;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class SellaPCreditlSvlt extends AcServlet {
+ protected static final String SELLA_P_CREDIT_REQ_JSP = "/sellaPCreditReq.jsp";
+
+ protected static final String BEAN_SELLA_P_CREDIT_REQ = "sellaPCreditReq";
+
+ protected static final String BEAN_SELLA_P_CREDIT_RESP = "sellaPCreditResp";
+
+ protected final void callJsp(HttpServletRequest req, HttpServletResponse res) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ try {
+ RequestDispatcher rd = getServletContext().getRequestDispatcher(getJspPage(req));
+ rd.forward((ServletRequest)req, (ServletResponse)res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected String getCodiceConvenzione(HttpServletRequest req) {
+ return getParm("COD_CONVENZIONE_SELLA_P_CREDIT").getTesto();
+ }
+
+ protected String getJspErrorPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("SELLA_P_CREDIT_ERROR_PAGE").getTesto();
+ if (temp.isEmpty())
+ return getJspKoPage(req, res);
+ return temp;
+ }
+
+ protected String getJspOkPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("SELLA_P_CREDIT_OK_PAGE").getTesto();
+ if (temp.isEmpty())
+ return "conselRes.jsp";
+ return temp;
+ }
+
+ protected String getJspKoPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("SELLA_P_CREDIT_OK_PAGE").getTesto();
+ if (temp.isEmpty())
+ return "conselRes.jsp";
+ return temp;
+ }
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ ConselTabfin ct = new ConselTabfin(getApFull());
+ ConselTabfinCR CR = new ConselTabfinCR();
+ fillObject(req, CR);
+ req.setAttribute("list", ct.findByCR(CR, 0, 0));
+ req.setAttribute("CR", CR);
+ req.setAttribute("nf3", getNf3());
+ setJspPageRelative("tabfin" + CR.getFlgTipo() + getAct(req) + ".jsp", req);
+ callJsp(req, res);
+ }
+
+ protected boolean isSecureServlet(HttpServletRequest req) {
+ return false;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sellaPCredit/package-info.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sellaPCredit/package-info.java
new file mode 100644
index 00000000..a0eda482
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/sellaPCredit/package-info.java
@@ -0,0 +1 @@
+package it.acxent.bank.servlet.sellaPCredit;
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/setefi/MonetaOnlineSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/setefi/MonetaOnlineSvlt.java
new file mode 100644
index 00000000..1e53bc4e
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/setefi/MonetaOnlineSvlt.java
@@ -0,0 +1,176 @@
+package it.acxent.bank.servlet.setefi;
+
+import it.acxent.bank.setefi.SetefiReq;
+import it.acxent.bank.setefi.SetefiResp;
+import it.acxent.db.ResParm;
+import it.acxent.servlet.AcServlet;
+import java.io.BufferedReader;
+import java.io.DataOutputStream;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public abstract class MonetaOnlineSvlt extends AcServlet {
+ protected static final String CMD_GET_RES = "res";
+
+ protected static final String CMD_SEND_REQ = "send";
+
+ protected final void callJsp(HttpServletRequest req, HttpServletResponse res) {
+ setJspPageRelative(getResponsePage(req, res), req);
+ try {
+ RequestDispatcher rd = getServletContext()
+ .getRequestDispatcher(getJspPage(req));
+ rd.forward((ServletRequest)req, (ServletResponse)res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected String getResponsePage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("MONETAONLINE_RESPONSE_PAGE")
+ .getTesto();
+ if (temp.isEmpty())
+ return "http://www.miodominio.it/xxx_response-#-@.html";
+ return temp;
+ }
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ String cmd = getCmd(req).toLowerCase();
+ if (cmd.equals("send")) {
+ sendRequest(req, res);
+ } else if (getCmd(req).equals("risultato") ||
+ getCmd(req).equals("result")) {
+ preparePaymentResultPage(req, res);
+ setJspPage(getResponseJsp(req, res), req);
+ callJsp(req, res);
+ } else {
+ getResponse(req, res);
+ }
+ }
+
+ protected boolean isSecureServlet(HttpServletRequest req) {
+ return false;
+ }
+
+ protected void sendRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ boolean testMode = (getParm("TEST").getNumeroInt() == 1);
+ SetefiReq setefiReq = new SetefiReq();
+ fillObject(req, setefiReq);
+ String theUrl = "https://test.monetaonline.it/monetaweb/hosted/init/http";
+ if (testMode) {
+ theUrl = "https://test.monetaonline.it/monetaweb/hosted/init/http";
+ setefiReq.setId(getParm("MONETAONLINE_ID").getTesto());
+ setefiReq.setPassword(getParm("MONETAONLINE_PASSWORD")
+ .getTesto());
+ } else {
+ setefiReq.setId("99999999");
+ setefiReq.setPassword("99999999");
+ }
+ setefiReq.setResponseurl(getResponseUrl(req, res));
+ String rawData = setefiReq.getRawdata();
+ if (!rawData.equals("")) {
+ String type = "application/x-www-form-urlencoded";
+ String encodedData = rawData;
+ URL u = new URL("https://test.monetaonline.it/monetaweb/hosted/init/http");
+ HttpURLConnection conn = (HttpURLConnection)u.openConnection();
+ conn.setDoInput(true);
+ conn.setDoOutput(true);
+ conn.setUseCaches(false);
+ conn.setRequestMethod("POST");
+ conn.setRequestProperty("Content-Type", type);
+ conn.setRequestProperty("Content-Length",
+ String.valueOf(encodedData.length()));
+ conn.connect();
+ DataOutputStream os = new DataOutputStream(
+ conn.getOutputStream());
+ os.writeBytes(encodedData);
+ os.flush();
+ os.close();
+ BufferedReader read = new BufferedReader(new InputStreamReader(
+ conn.getInputStream()));
+ String line = read.readLine();
+ String html = "";
+ while (line != null) {
+ html = html + html;
+ line = read.readLine();
+ }
+ int idx2dot = html.indexOf(":");
+ String paymentId = html.substring(0, html.indexOf(":"));
+ String url = html.substring(idx2dot + 1, html.length());
+ String paymentUrl = url + "?paymentid=" + url;
+ System.out.println(paymentUrl);
+ ResParm rp = recordPaymentId(req, res, paymentId);
+ if (rp.getStatus()) {
+ res.sendRedirect(paymentUrl);
+ } else {
+ setJspPageRelative(getResponsePage(req, res), req);
+ sendMessage(req, rp.getErrMsg());
+ getResponse(req, res);
+ callJsp(req, res);
+ }
+ } else {
+ setJspPageRelative(getResponsePage(req, res), req);
+ String temp = "ERRORE!!MonetaOnline Svlt! Impossibile creare url di richiesta!";
+ sendMessage(req, temp);
+ getResponse(req, res);
+ handleDebug(temp, 2);
+ callJsp(req, res);
+ }
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected String getResponseJsp(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("MONETAONLINE_RESPONSE_JSP").getTesto();
+ if (temp.isEmpty())
+ return "/payResMO.jsp";
+ return temp;
+ }
+
+ protected abstract ResParm recordPaymentId(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse, String paramString);
+
+ protected String getResponseUrl(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("MONETAONLINE_RESPONSE_URL").getTesto();
+ if (temp.isEmpty())
+ return "http://www.miodoninio.it/RicevutaMO.abl";
+ return temp;
+ }
+
+ protected abstract void preparePaymentResultPage(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse);
+
+ protected abstract void checkPaymentId(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse, SetefiResp paramSetefiResp);
+
+ protected void getResponse(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ req.setAttribute("responsecode", "000");
+ req.setAttribute("result", "Accepted");
+ req.setAttribute("trackid", "6");
+ req.setAttribute("paymentid", "316061656072333389");
+ req.setAttribute("tranid", "316061656072333389");
+ SetefiResp setefiResp = new SetefiResp();
+ fillObject(req, setefiResp);
+ checkPaymentId(req, res, setefiResp);
+ String theUrl = getResponsePage(req, res).replace("#",
+ setefiResp.getTrackid());
+ theUrl = theUrl.replace("@",
+ String.valueOf(setefiResp.getPaymentid()));
+ System.out.println("redirect url :" + theUrl);
+ sendHtmlMsgResponse(req, res, "redirect=" + theUrl);
+ } catch (Exception e) {
+ setJspPageRelative(getResponsePage(req, res), req);
+ String temp = "ERRORE!!MONETAONLINE ! Risposta non valida: ";
+ sendMessage(req, temp);
+ handleDebug(temp, 2);
+ setJspPage(getResponsePage(req, res), req);
+ callJsp(req, res);
+ callJsp(req, res);
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/stripe/_StripeResponseSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/stripe/_StripeResponseSvlt.java
new file mode 100644
index 00000000..230242bd
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/stripe/_StripeResponseSvlt.java
@@ -0,0 +1,49 @@
+package it.acxent.bank.servlet.stripe;
+
+import it.acxent.bank.stripe.StripeResp;
+import it.acxent.db.ResParm;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public abstract class _StripeResponseSvlt extends _StripeSvlt {
+ private static final long serialVersionUID = 571692091994662023L;
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ getResponse(req, res);
+ }
+
+ protected void getResponse(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ StripeResp stripeRes = new StripeResp();
+ fillObject(req, stripeRes);
+ if (stripeRes.getRedirect_status().equals("succeeded")) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ recordOrder(req, res, stripeRes);
+ } else {
+ setJspPageRelative(getJspKoPage(req, res), req);
+ }
+ req.setAttribute("stripeResp", stripeRes);
+ preparePaymenResPage(req, res, stripeRes);
+ callJsp(req, res);
+ } catch (Exception e) {
+ setJspPageRelative(getJspErrorPage(req, res), req);
+ String temp = "ERRORE!!Stripe Error! Risposta non valida: ";
+ sendMessage(req, temp);
+ handleDebug(temp, 2);
+ preparePaymenResPage(req, res, null);
+ callJsp(req, res);
+ }
+ }
+
+ protected abstract void preparePaymenResPage(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse, StripeResp paramStripeResp);
+
+ protected abstract void recordOrder(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse, StripeResp paramStripeResp);
+
+ protected long getAmount(HttpServletRequest req, long l_id) {
+ return 0L;
+ }
+
+ protected ResParm saveClientSecret(HttpServletRequest req, long l_id, String l_clientSecret) {
+ return null;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/stripe/_StripeSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/stripe/_StripeSvlt.java
new file mode 100644
index 00000000..4a040216
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/stripe/_StripeSvlt.java
@@ -0,0 +1,101 @@
+package it.acxent.bank.servlet.stripe;
+
+import com.google.gson.Gson;
+import com.stripe.Stripe;
+import com.stripe.model.PaymentIntent;
+import com.stripe.param.PaymentIntentCreateParams;
+import it.acxent.bank.stripe.CreatePaymentResponse;
+import it.acxent.db.ResParm;
+import it.acxent.servlet.AcServlet;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import org.json.JSONObject;
+
+public abstract class _StripeSvlt extends AcServlet {
+ private static Gson gson = new Gson();
+
+ private static final long serialVersionUID = 7052017571211783636L;
+
+ protected static final String BEAN_STRIPE_RESP = "stripeResp";
+
+ protected final void callJsp(HttpServletRequest req, HttpServletResponse res) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ try {
+ RequestDispatcher rd = getServletContext().getRequestDispatcher(getJspPage(req));
+ rd.forward((ServletRequest)req, (ServletResponse)res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected String getStripeSecretApiKey(HttpServletRequest req) {
+ return getParm("STRIPE_PRIVATE_KEY").getTesto();
+ }
+
+ protected String getJspErrorPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("SELLA_OK").getTesto();
+ if (temp.isEmpty())
+ return getJspKoPage(req, res);
+ return temp;
+ }
+
+ protected String getJspOkPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("STRIPE_OK_PAGE").getTesto();
+ if (temp.isEmpty())
+ return "stripeRes.jsp";
+ return temp;
+ }
+
+ protected String getJspKoPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("SELLA_OK").getTesto();
+ if (temp.isEmpty())
+ return "stripeRes.jsp";
+ return temp;
+ }
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ _getPaymentIntent(req, res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected boolean isSecureServlet(HttpServletRequest req) {
+ return false;
+ }
+
+ public void _getPaymentIntent(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ Stripe.apiKey = getStripeSecretApiKey(req);
+ String body = req.getReader().lines().reduce("", String::concat);
+ JSONObject jo = new JSONObject(body).getJSONObject("orderData");
+ long l_id = jo.getLong("id");
+ String l_descrizione = jo.getString("descOrdine");
+ System.out.println("" + l_id + " " + l_id);
+ System.out.println("body: " + body);
+ Long amount = getAmount(req, l_id);
+ if (amount == 0L) {
+ sendHtmlMsgResponse(req, res, "Error: amount==0!!!");
+ } else {
+ PaymentIntentCreateParams params = PaymentIntentCreateParams.builder().setAmount(amount).setCurrency("eur")
+ .setAutomaticPaymentMethods(PaymentIntentCreateParams.AutomaticPaymentMethods.builder().setEnabled(Boolean.valueOf(true)).build())
+ .build();
+ PaymentIntent paymentIntent = PaymentIntent.create(params);
+ CreatePaymentResponse paymentResponse = new CreatePaymentResponse(paymentIntent.getClientSecret());
+ saveClientSecret(req, l_id, paymentIntent.getClientSecret());
+ sendHtmlMsgResponse(req, res, gson.toJson(paymentResponse));
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ sendHtmlMsgResponse(req, res, "Error: " + e.getMessage());
+ }
+ }
+
+ protected abstract ResParm saveClientSecret(HttpServletRequest paramHttpServletRequest, long paramLong, String paramString);
+
+ protected abstract long getAmount(HttpServletRequest paramHttpServletRequest, long paramLong);
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/stripe/package-info.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/stripe/package-info.java
new file mode 100644
index 00000000..65aae89d
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/stripe/package-info.java
@@ -0,0 +1 @@
+package it.acxent.bank.servlet.stripe;
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/xpay/GetXpayResponseSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/xpay/GetXpayResponseSvlt.java
new file mode 100644
index 00000000..0fc3825a
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/xpay/GetXpayResponseSvlt.java
@@ -0,0 +1,55 @@
+package it.acxent.bank.servlet.xpay;
+
+import it.acxent.bank.xpay.XpayResp;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public abstract class GetXpayResponseSvlt extends XpaySvlt {
+ protected abstract void preparePaymenResPage(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse, XpayResp paramXpayResp);
+
+ protected abstract void recordOrder(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse, XpayResp paramXpayResp);
+
+ protected void getResponse(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ XpayResp xpRes = new XpayResp(getApFull(req));
+ fillObject(req, xpRes);
+ xpRes.setBRAND(getRequestParameter(req, "$BRAND"));
+ if (xpRes.isMacRitornoOk()) {
+ if (xpRes.getEsito() != null && xpRes.getEsito().equals("OK")) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ recordOrder(req, res, xpRes);
+ req.setAttribute("XPAYResp", xpRes);
+ preparePaymenResPage(req, res, xpRes);
+ } else {
+ preparePaymenResPage(req, res, xpRes);
+ resetId_documentoXpay(req, res, xpRes);
+ setJspPageRelative(getJspKoPage(req, res), req);
+ }
+ callJsp(req, res);
+ } else {
+ xpRes.setEsito("KO");
+ preparePaymenResPage(req, res, xpRes);
+ resetId_documentoXpay(req, res, xpRes);
+ setJspPageRelative(getJspKoPage(req, res), req);
+ sendMessage(req, "ATTENZIONE!! Codice mac di controllo errato.");
+ req.setAttribute("XPAYResp", xpRes);
+ callJsp(req, res);
+ }
+ } catch (Exception e) {
+ setJspPageRelative(getJspErrorPage(req, res), req);
+ String temp = "ERRORE!!XPAY ! Risposta non valida: ";
+ sendMessage(req, temp);
+ handleDebug(temp, 2);
+ preparePaymenResPage(req, res, null);
+ callJsp(req, res);
+ }
+ }
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ getResponse(req, res);
+ }
+
+ protected void prepareSendRequest(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected abstract void resetId_documentoXpay(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse, XpayResp paramXpayResp);
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/xpay/XpaySvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/xpay/XpaySvlt.java
new file mode 100644
index 00000000..cc993d79
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/servlet/xpay/XpaySvlt.java
@@ -0,0 +1,115 @@
+package it.acxent.bank.servlet.xpay;
+
+import it.acxent.bank.infogroup.ShopnetResp;
+import it.acxent.bank.xpay.XpayReq;
+import it.acxent.servlet.AcServlet;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public abstract class XpaySvlt extends AcServlet {
+ protected static final String BEAN_XPAY_RES = "XPAYResp";
+
+ protected static final String CMD_GET_RES = "res";
+
+ protected static final String CMD_SEND_REQ = "send";
+
+ protected final void callJsp(HttpServletRequest req, HttpServletResponse res) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ try {
+ RequestDispatcher rd = getServletContext().getRequestDispatcher(getJspPage(req));
+ rd.forward((ServletRequest)req, (ServletResponse)res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected void getResponse(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected String getJspErrorPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("XPAY_PAY_OK").getTesto();
+ if (temp.isEmpty())
+ return getJspKoPage(req, res);
+ return temp;
+ }
+
+ protected String getJspOkPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("XPAY_PAY_OK").getTesto();
+ if (temp.isEmpty())
+ return "payRes.jsp";
+ return temp;
+ }
+
+ protected String getJspKoPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("XPAY_PAY_OK").getTesto();
+ if (temp.isEmpty())
+ return "payRes.jsp";
+ return temp;
+ }
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ String cmd = getCmd(req).toLowerCase();
+ try {
+ if (cmd.equals("send")) {
+ sendRequest(req, res);
+ } else if (cmd.equals("res")) {
+ getResponse(req, res);
+ } else {
+ sendRequest(req, res);
+ }
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected boolean isSecureServlet(HttpServletRequest req) {
+ return false;
+ }
+
+ protected void payKoUpdateOrder(HttpServletRequest req, HttpServletResponse res, ShopnetResp snRes) {}
+
+ protected void sendRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ String theUrl;
+ prepareSendRequest(req, res);
+ XpayReq xpayReq = new XpayReq(getApFull(req));
+ fillObject(req, xpayReq);
+ if (getParm("TEST").isTrue()) {
+ theUrl = xpayReq.getTestRequestUrl();
+ } else {
+ theUrl = xpayReq.getRequestUrl();
+ }
+ System.out.println(theUrl);
+ if (!theUrl.equals("")) {
+ res.sendRedirect(theUrl);
+ } else {
+ setJspPageRelative(getJspErrorPage(req, res), req);
+ String temp = "ERRORE!!XPAY Svlt! Impossibile creare url di richiesta!";
+ sendMessage(req, temp);
+ getResponse(req, res);
+ handleDebug(temp, 2);
+ callJsp(req, res);
+ }
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected String getUrlResponse(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("XPAY_URL_RESPONSE").getTesto();
+ if (temp.isEmpty())
+ return "RicevutaKC.abl";
+ return temp;
+ }
+
+ protected String getUrlResponseNull(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("XPAY_URL_RESPONSE_NULL").getTesto();
+ if (temp.isEmpty())
+ return "RicevutaKC.abl";
+ return temp;
+ }
+
+ protected abstract void prepareSendRequest(HttpServletRequest paramHttpServletRequest, HttpServletResponse paramHttpServletResponse);
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/setefi/SetefiReq.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/setefi/SetefiReq.java
new file mode 100644
index 00000000..95f20bf5
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/setefi/SetefiReq.java
@@ -0,0 +1,260 @@
+package it.acxent.bank.setefi;
+
+import it.acxent.bank._BankAdapter;
+import it.acxent.common.Parm;
+import it.acxent.common.StatusMsg;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+
+public class SetefiReq extends _BankAdapter {
+ public static final String LANG_CODE_IT = "ITA";
+
+ public static final String LANG_CODE_EN = "USA";
+
+ public static final String LANG_CODE_ES = "SPA";
+
+ public static final String LANG_CODE_FR = "FRA";
+
+ public static final String LANG_CODE_DE = "DEU";
+
+ public static final String DIV_CODE_EURO = "978";
+
+ public static final String P_MONETAONLINE_ID = "MONETAONLINE_ID";
+
+ public static final String DEFAULT_RESPONSE_URL = "MONETAONLINE_ID";
+
+ public static final String DEFAULT_RESPONSE_PAGE = "payResMO.jsp";
+
+ public static final String DIV_CODE_DOLLARL_HK = "103";
+
+ public static final String TEST_URL = "https://test.monetaonline.it/monetaweb/hosted/init/http";
+
+ public static final String REQ_URL = "https://test.monetaonline.it/monetaweb/hosted/init/http";
+
+ private String id;
+
+ private String trackid;
+
+ private String titolareCarta;
+
+ private String email;
+
+ private String lang;
+
+ private String responseurl;
+
+ private double amt;
+
+ private String password;
+
+ private String descPagamento;
+
+ private String divisa;
+
+ public static final String BEAN_MO_RES = "MOResp";
+
+ public static final String P_MONETAONLINE_RESPONSE_JSP = "MONETAONLINE_RESPONSE_JSP";
+
+ public static final String TEST_PASSWORD = "99999999";
+
+ public static final String TEST_ID = "99999999";
+
+ public static final String P_MONETAONLINE_RESPONSE_URL = "MONETAONLINE_RESPONSE_URL";
+
+ public static final String P_MONETAONLINE_PASSWORD = "MONETAONLINE_PASSWORD";
+
+ public static final String P_MONETAONLINE_RESPONSE_PAGE = "MONETAONLINE_RESPONSE_PAGE";
+
+ public static final String DIV_CODE_DOLLARI = "1";
+
+ public double getAmt() {
+ return this.amt;
+ }
+
+ public void setAmt(double myamount) {
+ this.amt = myamount;
+ }
+
+ public String getEmail() {
+ return (this.email == null) ? "" : this.email;
+ }
+
+ public void setEmail(String mybuyeremail) {
+ this.email = mybuyeremail;
+ }
+
+ public String getTitolareCarta() {
+ return (this.titolareCarta == null) ? "" : this.titolareCarta;
+ }
+
+ public void setTitolareCarta(String mybuyername) {
+ this.titolareCarta = mybuyername;
+ }
+
+ public String getCurrencycode() {
+ if (getDivisa().toLowerCase().equals("eu"))
+ return "978";
+ return "978";
+ }
+
+ public String getDescPagamento() {
+ return (this.descPagamento == null) ? "" : this.descPagamento;
+ }
+
+ public void setDescPagamento(String mycustominfo) {
+ this.descPagamento = mycustominfo;
+ }
+
+ private String getMylanguageCode() {
+ if (getLang().toLowerCase().equals("it"))
+ return "ITA";
+ if (getLang().toLowerCase().equals("en"))
+ return "USA";
+ if (getLang().toLowerCase().equals("es\t"))
+ return "SPA";
+ if (getLang().toLowerCase().equals("fr"))
+ return "FRA";
+ if (getLang().toLowerCase().equals("de"))
+ return "DEU";
+ return "";
+ }
+
+ public String getTrackid() {
+ return (this.trackid == null) ? "" : this.trackid;
+ }
+
+ public void setTrackid(String myshoptransactionID) {
+ this.trackid = myshoptransactionID;
+ }
+
+ public String getLang() {
+ return (this.lang == null) ? "" : this.lang;
+ }
+
+ public void setLang(String lang) {
+ this.lang = lang;
+ }
+
+ public static void initApplicationParms(ApplParmFull ap) {
+ boolean debug = true;
+ if (ap != null) {
+ DBAdapter.logDebug(debug, "Setefi initParms: start");
+ String l_tipoParm = "MONETAONLINE";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ Parm bean = new Parm(ap);
+ bean.findByCodice("MONETAONLINE_ID");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MONETAONLINE_ID");
+ bean.setDescrizione("MONETAONLINE_ID");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("99999999");
+ bean.setNota("ID MONETAONLINE CODICE DI PROVA: 99999999");
+ bean.save();
+ bean.findByCodice("MONETAONLINE_PASSWORD");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MONETAONLINE_PASSWORD");
+ bean.setDescrizione("MONETAONLINE_PASSWORD");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("99999999");
+ bean.setNota("PASSWORD MONETAONLINE PASSWORD DI PROVA: 99999999");
+ bean.save();
+ bean.findByCodice("MONETAONLINE_RESPONSE_URL");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MONETAONLINE_RESPONSE_URL");
+ bean.setDescrizione("MONETAONLINE_RESPONSE_URL");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("http://www.nomedominio.it/PayMO.abl");
+ bean.setNota("QUALCOSA DEL TIPO http://www.nomedominio.it/PayMO.abl E' l'url chiamata da setefi. Su moneta Online è sempre la stessa servlet!!");
+ bean.save();
+ bean.findByCodice("MONETAONLINE_RESPONSE_JSP");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MONETAONLINE_RESPONSE_JSP");
+ bean.setDescrizione("MONETAONLINE_RESPONSE_JSP");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("/payResMO.jsp");
+ bean.setNota("QUALCOSA DEL TIPO /payResMO.jsp. E' la pagina jsp dove visualizziamo il risultato.");
+ bean.save();
+ bean.findByCodice("MONETAONLINE_RESPONSE_PAGE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MONETAONLINE_RESPONSE_PAGE");
+ bean.setDescrizione("MONETAONLINE_RESPONSE_PAGE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("http://www.nomedominio.it/transazione_result-#-@.html");
+ bean.setNota("QUALCOSA DEL TIPO http://www.nomedominio.it/xxx_result-#-@.html. si userà una regola di rewrite rule dove # è il trackid mentre @ +è il paymentid Esempio rewrite rule: result,PayMO.abl,result,,@id_astaUtente@paymentid");
+ bean.save();
+ DBAdapter.logDebug(debug, "Setefi initParms: stop");
+ }
+ }
+
+ public String getId() {
+ return (this.id == null) ? "" : this.id.trim();
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public String getPassword() {
+ return (this.password == null) ? "" : this.password.trim();
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getResponseurl() {
+ return (this.responseurl == null) ? "" : this.responseurl.trim();
+ }
+
+ public void setResponseurl(String responseurl) {
+ this.responseurl = responseurl;
+ }
+
+ public String getRawdata() {
+ StringBuffer theUrl = new StringBuffer();
+ theUrl.append("id=");
+ theUrl.append(getId());
+ theUrl.append("&password=");
+ theUrl.append(getPassword());
+ theUrl.append("&action=4");
+ theUrl.append("&amt=");
+ theUrl.append(getAmt());
+ theUrl.append("¤cycode=");
+ theUrl.append(getCurrencycode());
+ theUrl.append("&langid=");
+ theUrl.append(getMylanguageCode());
+ theUrl.append("&responseurl=");
+ theUrl.append(getResponseurl());
+ theUrl.append("&errorurl=");
+ theUrl.append(getResponseurl());
+ theUrl.append("&trackid=");
+ theUrl.append(getTrackid());
+ if (!getDescPagamento().trim().isEmpty()) {
+ theUrl.append("&udf1=");
+ theUrl.append(getDescPagamento());
+ }
+ if (!getTitolareCarta().trim().isEmpty()) {
+ theUrl.append("&udf2=");
+ theUrl.append(getTitolareCarta() + ";" + getTitolareCarta());
+ }
+ return theUrl.toString();
+ }
+
+ public String getDivisa() {
+ return (this.divisa == null) ? "" : this.divisa.trim();
+ }
+
+ public void setDivisa(String divisa) {
+ this.divisa = divisa;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/setefi/SetefiResp.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/setefi/SetefiResp.java
new file mode 100644
index 00000000..2e32a4b2
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/setefi/SetefiResp.java
@@ -0,0 +1,115 @@
+package it.acxent.bank.setefi;
+
+import it.acxent.bank._BankAdapter;
+
+public class SetefiResp extends _BankAdapter {
+ private String trackid;
+
+ private String paymentid;
+
+ private String udf3;
+
+ private String udf1;
+
+ private String result;
+
+ private String auth;
+
+ private long id_ordine;
+
+ private String responsecode;
+
+ private String tranid;
+
+ private String udf4;
+
+ private String udf2;
+
+ public String getResponsecode() {
+ return (this.responsecode == null) ? "" : this.responsecode;
+ }
+
+ public void setResponsecode(String myalertcode) {
+ this.responsecode = myalertcode;
+ }
+
+ public String getTranid() {
+ return (this.tranid == null) ? "" : this.tranid;
+ }
+
+ public void setTranid(String myalertdescription) {
+ this.tranid = myalertdescription;
+ }
+
+ public String getAuth() {
+ return (this.auth == null) ? "" : this.auth;
+ }
+
+ public void setAuth(String myauthcode) {
+ this.auth = myauthcode;
+ }
+
+ public String getUdf2() {
+ return (this.udf2 == null) ? "" : this.udf2;
+ }
+
+ public void setUdf2(String mybuyeremail) {
+ this.udf2 = mybuyeremail;
+ }
+
+ public String getUdf3() {
+ return (this.udf3 == null) ? "" : this.udf3;
+ }
+
+ public void setUdf3(String mybuyername) {
+ this.udf3 = mybuyername;
+ }
+
+ public String getTrackid() {
+ return (this.trackid == null) ? "" : this.trackid;
+ }
+
+ public void setTrackid(String myshoplogin) {
+ this.trackid = myshoplogin;
+ }
+
+ public String getPaymentid() {
+ return this.paymentid;
+ }
+
+ public void setPaymentid(String myshoptrxID) {
+ this.paymentid = myshoptrxID;
+ }
+
+ public String getResult() {
+ return (this.result == null) ? "" : this.result;
+ }
+
+ public void setResult(String mytrxresult) {
+ this.result = mytrxresult;
+ }
+
+ public long getId_ordine() {
+ return this.id_ordine;
+ }
+
+ public void setId_ordine(long id_ordine) {
+ this.id_ordine = id_ordine;
+ }
+
+ public String getUdf1() {
+ return (this.udf1 == null) ? "" : this.udf1;
+ }
+
+ public void setUdf1(String udf1) {
+ this.udf1 = udf1;
+ }
+
+ public String getUdf4() {
+ return (this.udf4 == null) ? "" : this.udf4;
+ }
+
+ public void setUdf4(String udf4) {
+ this.udf4 = udf4;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/stripe/CreatePayment.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/stripe/CreatePayment.java
new file mode 100644
index 00000000..094442fa
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/stripe/CreatePayment.java
@@ -0,0 +1,12 @@
+package it.acxent.bank.stripe;
+
+import com.google.gson.annotations.SerializedName;
+
+public class CreatePayment {
+ @SerializedName("items")
+ Object[] items;
+
+ public Object[] getItems() {
+ return this.items;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/stripe/CreatePaymentResponse.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/stripe/CreatePaymentResponse.java
new file mode 100644
index 00000000..fc5b6f96
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/stripe/CreatePaymentResponse.java
@@ -0,0 +1,9 @@
+package it.acxent.bank.stripe;
+
+public class CreatePaymentResponse {
+ private String clientSecret;
+
+ public CreatePaymentResponse(String clientSecret) {
+ this.clientSecret = clientSecret;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/stripe/StripeResp.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/stripe/StripeResp.java
new file mode 100644
index 00000000..15a517a1
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/stripe/StripeResp.java
@@ -0,0 +1,106 @@
+package it.acxent.bank.stripe;
+
+import it.acxent.bank._BankAdapter;
+import it.acxent.common.Parm;
+import it.acxent.common.StatusMsg;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+
+public class StripeResp extends _BankAdapter {
+ public static final String STATUS_OK = "succeeded";
+
+ private static final long serialVersionUID = -1758842932626231725L;
+
+ private String payment_intent_client_secret;
+
+ private String redirect_status;
+
+ public static final String P_STRIPE_PUBLIC_KEY = "STRIPE_PUBLIC_KEY";
+
+ public static final String P_STRIPE_PRIVATE_KEY = "STRIPE_PRIVATE_KEY";
+
+ public static final String P_STRIPE_OK_PAGE = "STRIPE_OK_PAGE";
+
+ public static final String P_STRIPE_ERROR_PAGE = "STRIPE_ERROR_PAGE";
+
+ public static final String P_STRIPE_RETURN_URL = "STRIPE_RETURN_URL";
+
+ public static final String DEFAULT_OK_KO_PAGE = "documento.jsp";
+
+ public String getPayment_intent_client_secret() {
+ return (this.payment_intent_client_secret == null) ? "" : this.payment_intent_client_secret;
+ }
+
+ public void setPayment_intent_client_secret(String payment_intent_client_secret) {
+ this.payment_intent_client_secret = payment_intent_client_secret;
+ }
+
+ public String getRedirect_status() {
+ return (this.redirect_status == null) ? "" : this.redirect_status;
+ }
+
+ public void setRedirect_status(String redirect_status) {
+ this.redirect_status = redirect_status;
+ }
+
+ public static void initApplicationParms(ApplParmFull ap) {
+ boolean debug = false;
+ if (ap != null) {
+ DBAdapter.logDebug(debug, "STRIPE initParms: start");
+ String l_tipoParm = "STRIPE";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ Parm bean = new Parm(ap);
+ bean.findByCodice("STRIPE_PRIVATE_KEY");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("STRIPE_PRIVATE_KEY");
+ bean.setDescrizione("STRIPE_PRIVATE_KEY");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("sk_test_51MHqBEFFhtsn3P5AuY6fj2eSYzDUabXnSINJXzvztxBsZUCg8KbZXrkhKBgYpJV4zxcxSFrrD228AgA5bHj6kTAT00cwVDtxCH");
+ bean.setNota("SECRET KEY STRIPE");
+ bean.save();
+ bean.findByCodice("STRIPE_PUBLIC_KEY");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("STRIPE_PUBLIC_KEY");
+ bean.setDescrizione("STRIPE_PUBLIC_KEY");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("pk_test_51MHqBEFFhtsn3P5AVGKxfuDIKk9Na3FNvcf5WfuMEvcWDt794JTsDfJilOs8r3JGmhknmfS97f77we0vqB8w99fB004zcxkFdk");
+ bean.setNota("PUBLIC KEY STRIPE");
+ bean.save();
+ bean.findByCodice("STRIPE_RETURN_URL");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("STRIPE_RETURN_URL");
+ bean.setDescrizione("STRIPE_RETURN_URL");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("http://localhost/cc/StripeResponse.abl");
+ bean.setNota("URL DI RITORNO. DI SOLITO StripeResponse.abl");
+ bean.save();
+ bean.findByCodice("STRIPE_ERROR_PAGE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("STRIPE_ERROR_PAGE");
+ bean.setDescrizione("STRIPE_ERROR_PAGE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("documento.jsp");
+ bean.setNota("STRIPE_OK_PAGE");
+ bean.save();
+ bean.findByCodice("STRIPE_OK_PAGE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("STRIPE_OK_PAGE");
+ bean.setDescrizione("STRIPE_OK_PAGE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("documento.jsp");
+ bean.setNota("STRIPE_OK_PAGE");
+ bean.save();
+ DBAdapter.logDebug(debug, "STRIPE initParms: start");
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/stripe/package-info.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/stripe/package-info.java
new file mode 100644
index 00000000..f85d42e1
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/stripe/package-info.java
@@ -0,0 +1 @@
+package it.acxent.bank.stripe;
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/taglib/SellaObjTag.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/taglib/SellaObjTag.java
new file mode 100644
index 00000000..504dd2c1
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/taglib/SellaObjTag.java
@@ -0,0 +1,100 @@
+package it.acxent.bank.taglib;
+
+import it.acxent.common.Parm;
+import it.acxent.taglib.AbstractDbTag;
+import java.io.IOException;
+import java.io.Writer;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspTagException;
+
+public class SellaObjTag extends AbstractDbTag {
+ private String value;
+
+ private boolean condition = true;
+
+ protected int currentNestedValue;
+
+ private String codice;
+
+ private Parm parm;
+
+ protected static final String _WC = "_WC";
+
+ protected static final String _NESTVAL = "_WCNESTVAL";
+
+ public int doAfterBody() throws JspException {
+ try {
+ this.bodyContent.writeOut((Writer)this.bodyContent.getEnclosingWriter());
+ setNestedValue();
+ return 0;
+ } catch (IOException ex) {
+ throw new JspTagException(ex.toString());
+ }
+ }
+
+ public int doStartTag() {
+ this.currentNestedValue = getNestedValue();
+ this.pageContext.setAttribute("_WC" + this.currentNestedValue, new Boolean(
+ getWherecondition()));
+ if (getWherecondition())
+ return 2;
+ return 0;
+ }
+
+ protected int getNestedValue() {
+ if (this.pageContext.getAttribute("_WCNESTVAL") == null) {
+ this.pageContext.setAttribute("_WCNESTVAL", "1");
+ return 1;
+ }
+ int nv = Integer.parseInt((String)
+ this.pageContext.getAttribute("_WCNESTVAL"));
+ nv++;
+ this.pageContext.setAttribute("_WCNESTVAL", String.valueOf(nv));
+ return nv;
+ }
+
+ public boolean getWherecondition() {
+ getParm().findByCodice(getCodice());
+ if (this.parm.getDBState() == 1) {
+ if ((getParm().getValore().equals(getValue()) && getCondition()) || (
+ !getParm().getValore().equals(getValue()) && !getCondition()))
+ return true;
+ return false;
+ }
+ return false;
+ }
+
+ protected void setNestedValue() {
+ this.pageContext.setAttribute("_WCNESTVAL", String.valueOf(this.currentNestedValue));
+ }
+
+ public String getCodice() {
+ return this.codice;
+ }
+
+ public Parm getParm() {
+ if (this.parm == null)
+ this.parm = new Parm(getApFull());
+ return this.parm;
+ }
+
+ public void setCodice(String code) {
+ this.codice = code;
+ }
+
+ public String getValue() {
+ return (this.value == null) ? "" : this.value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public boolean getCondition() {
+ return this.condition;
+ }
+
+ public void setCondition(boolean condition) {
+ this.condition = condition;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/xpay/XpayReq.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/xpay/XpayReq.java
new file mode 100644
index 00000000..32e363bf
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/xpay/XpayReq.java
@@ -0,0 +1,340 @@
+package it.acxent.bank.xpay;
+
+import it.acxent.bank._BankAdapter;
+import it.acxent.common.Parm;
+import it.acxent.common.StatusMsg;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.reg.EcDc;
+import java.net.URLEncoder;
+
+public class XpayReq extends _BankAdapter {
+ public static final String LANG_CODE_IT = "ITA";
+
+ public static final String LANG_CODE_EN = "ENG";
+
+ public static final String LANG_CODE_ES = "SPA";
+
+ public static final String LANG_CODE_FR = "FRA";
+
+ public static final String LANG_CODE_DE = "GER";
+
+ public static final String LANG_CODE_ITA_ENG = "ITA-ENG";
+
+ public static final String LANG_CODE_JPN = "JPN";
+
+ public static final String DIV_CODE_LIRA = "18";
+
+ public static final String DIV_CODE_EURO = "242";
+
+ public static final String DIV_CODE_STERLINE = "2";
+
+ public static final String DIV_CODE_YEN = "71";
+
+ public static final String DIV_CODE_DOLLARL_HK = "103";
+
+ public static final String DIV_CODE_REAL = "234";
+
+ private String divisa;
+
+ private String codTrans;
+
+ private String mail;
+
+ private String importo;
+
+ private String languageId;
+
+ public static final String TEST_ALIAS = "payment_3444153";
+
+ public static final String P_XPAY_MAC_KEY = "XPAY_MAC_KEY";
+
+ public static final String P_XPAY_URL_RESPONSE = "XPAY_URL_RESPONSE";
+
+ public static final String P_XPAY_ALIAS = "XPAY_ALIAS";
+
+ public static final String P_XPAY_PAYMENT_OK_PAGE = "XPAY_PAY_OK";
+
+ public static final String P_XPAY_PAYMENT_ERROR_PAGE = "XPAY_PAY_KO";
+
+ public static final String P_XPAY_URL_RESPONSE_NULL = "XPAY_URL_RESPONSE_NULL";
+
+ public static final String TEST_MAC = "TLGHTOWIZXQPTIZRALWKG";
+
+ public static final String REQ_URL = "https://ecommerce.keyclient.it/ecomm/ecomm/DispatcherServlet";
+
+ public static final String TEST_REQ_URL = "https://coll-ecommerce.keyclient.it/ecomm/ecomm/DispatcherServlet";
+
+ public static final String DIV_CODE_DOLLARI = "1";
+
+ public XpayReq() {}
+
+ public XpayReq(ApplParmFull apFull) {
+ setAp(apFull);
+ }
+
+ public String getCodTrans() {
+ return (this.codTrans == null) ? "" : this.codTrans;
+ }
+
+ public void setCodTrans(String myamount) {
+ this.codTrans = myamount;
+ }
+
+ public String getImporto() {
+ return (this.importo == null) ? "" : this.importo;
+ }
+
+ public void setImporto(String mybuyeremail) {
+ this.importo = mybuyeremail;
+ }
+
+ public String getMail() {
+ return (this.mail == null) ? "" : this.mail;
+ }
+
+ public void setMail(String mybuyername) {
+ this.mail = mybuyername;
+ }
+
+ public String getDivisa() {
+ return (this.divisa == null) ? "" : this.divisa;
+ }
+
+ public void setDivisa(String mycurrency) {
+ this.divisa = mycurrency;
+ }
+
+ public String getAlias() {
+ return getParm("XPAY_ALIAS").getTesto();
+ }
+
+ private String getMylanguageCode() {
+ if (getLanguageId().toLowerCase().equals("it"))
+ return "ITA";
+ if (getLanguageId().toLowerCase().equals("en"))
+ return "ENG";
+ if (getLanguageId().toLowerCase().equals("es\t"))
+ return "SPA";
+ if (getLanguageId().toLowerCase().equals("fr"))
+ return "FRA";
+ if (getLanguageId().toLowerCase().equals("de"))
+ return "GER";
+ return "";
+ }
+
+ public String getMacEsempio() {
+ String temp = "codTrans=" + getCodTrans() + "divisa=" + getDivisa() + "importo=1" + getKey();
+ System.out.println("stringa mac: " + temp);
+ String res = "";
+ try {
+ res = EcDc.cryptSHA1Plain(temp);
+ System.out.println(res);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public String getMac() {
+ String temp = "codTrans=" + getCodTrans() + "divisa=" + getDivisa() + "importo=" + getImportoUrl() + getKey();
+ String res = "";
+ try {
+ res = EcDc.cryptSHA1Plain(temp);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public String getLanguageId() {
+ return (this.languageId == null) ? "" : this.languageId;
+ }
+
+ public void setLanguageId(String lang) {
+ this.languageId = lang;
+ }
+
+ public String getFullRequestUrl() {
+ StringBuffer theUrl = new StringBuffer("https://ecommerce.keyclient.it/ecomm/ecomm/DispatcherServlet");
+ theUrl.append("alias=");
+ theUrl.append(getAlias());
+ theUrl.append("&importo=");
+ theUrl.append(getImporto());
+ theUrl.append("&divisa=");
+ theUrl.append(getDivisa());
+ theUrl.append("&codTrans=");
+ theUrl.append(getCodTrans());
+ theUrl.append("&mail=");
+ theUrl.append(getMail());
+ theUrl.append("&mac=");
+ try {
+ theUrl.append(URLEncoder.encode(getMac(), "UTF-8"));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ theUrl.append("&languageId=");
+ theUrl.append(getLanguageId());
+ theUrl.append("&url=");
+ theUrl.append(getUrl());
+ if (!getUrl_back().isEmpty()) {
+ theUrl.append("&url_back=");
+ theUrl.append(getUrl_back());
+ }
+ return theUrl.toString();
+ }
+
+ public String getRequestUrl() {
+ StringBuffer theUrl = new StringBuffer("https://ecommerce.keyclient.it/ecomm/ecomm/DispatcherServlet");
+ theUrl.append("?alias=");
+ theUrl.append(getAlias());
+ theUrl.append("&importo=");
+ theUrl.append(getImportoUrl());
+ theUrl.append("&divisa=");
+ theUrl.append(getDivisa());
+ theUrl.append("&codTrans=");
+ theUrl.append(getCodTrans());
+ theUrl.append("&mail=");
+ theUrl.append(getMail());
+ theUrl.append("&mac=");
+ try {
+ theUrl.append(URLEncoder.encode(getMac(), "UTF-8"));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ theUrl.append("&languageId=");
+ theUrl.append(getLanguageId());
+ theUrl.append("&url=");
+ theUrl.append(getUrl());
+ if (!getUrl_back().isEmpty()) {
+ theUrl.append("&url_back=");
+ theUrl.append(getUrl_back());
+ }
+ return theUrl.toString();
+ }
+
+ public String getKey() {
+ return getParm("XPAY_MAC_KEY").getTesto();
+ }
+
+ public String getImportoUrl() {
+ if (this.importo == null)
+ return "0000";
+ String temp = this.importo;
+ if (temp.indexOf('.') < 0) {
+ temp = temp + "00";
+ } else if (temp.length() - temp.indexOf('.') < 3) {
+ temp = temp + "0";
+ }
+ return temp.replace(".", "");
+ }
+
+ public String getUrl() {
+ return getParm("XPAY_URL_RESPONSE").getTesto();
+ }
+
+ public String getUrl_back() {
+ return getParm("XPAY_URL_RESPONSE_NULL").getTesto();
+ }
+
+ public String getTestRequestUrl() {
+ StringBuffer theUrl = new StringBuffer("https://coll-ecommerce.keyclient.it/ecomm/ecomm/DispatcherServlet");
+ theUrl.append("?alias=");
+ theUrl.append("payment_3444153");
+ theUrl.append("&importo=1");
+ theUrl.append("&divisa=");
+ theUrl.append(getDivisa());
+ theUrl.append("&codTrans=");
+ theUrl.append(getCodTrans());
+ theUrl.append("&mail=");
+ theUrl.append(getMail());
+ theUrl.append("&mac=");
+ try {
+ theUrl.append(URLEncoder.encode(getMacEsempio(), "UTF-8"));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ theUrl.append("&languageId=");
+ theUrl.append(getLanguageId());
+ theUrl.append("&url=");
+ theUrl.append(getUrl());
+ if (!getUrl_back().isEmpty()) {
+ theUrl.append("&url_back=");
+ theUrl.append(getUrl_back());
+ }
+ return theUrl.toString();
+ }
+
+ public static void initApplicationParms(ApplParmFull ap) {
+ boolean debug = false;
+ if (ap != null) {
+ DBAdapter.logDebug(debug, "Xpay initParms: start");
+ String l_tipoParm = "XPAY";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ Parm bean = new Parm(ap);
+ bean.findByCodice("XPAY_PAY_KO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("XPAY_PAY_KO");
+ bean.setDescrizione("XPAY_PAY_KO");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payRes.jsp");
+ bean.setNota("XPAY_PAY_KO");
+ bean.save();
+ bean.findByCodice("XPAY_PAY_OK");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("XPAY_PAY_OK");
+ bean.setDescrizione("XPAY_PAY_OK");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payRes.jsp");
+ bean.setNota("XPAY_PAY_OK");
+ bean.save();
+ bean.findByCodice("XPAY_MAC_KEY");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("XPAY_MAC_KEY");
+ bean.setDescrizione("XPAY_MAC_KEY");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("TLGHTOWIZXQPTIZRALWKG");
+ if (bean.getNota().isEmpty())
+ bean.setNota("XPAY_MAC_KEY. mac di esempio: TLGHTOWIZXQPTIZRALWKG");
+ bean.save();
+ bean.findByCodice("XPAY_ALIAS");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("XPAY_ALIAS");
+ bean.setDescrizione("XPAY_ALIAS");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("payment_3444153");
+ if (bean.getNota().isEmpty())
+ bean.setNota("XPAY_MAC_KEY. ALIAS DI TEST: payment_3444153");
+ bean.save();
+ bean.findByCodice("XPAY_URL_RESPONSE_NULL");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("XPAY_URL_RESPONSE_NULL");
+ bean.setDescrizione("XPAY_URL_RESPONSE_NULL");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("http://localhost/td/RicevutaXPAY.abl");
+ bean.setNota("XPAY_PAY_OK");
+ bean.save();
+ bean.findByCodice("XPAY_URL_RESPONSE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("XPAY_URL_RESPONSE");
+ bean.setDescrizione("XPAY_URL_RESPONSE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().equals(""))
+ bean.setTesto("http://localhost/td/RicevutaXPAY.abl");
+ bean.setNota("XPAY_URL_RESPONSE");
+ bean.save();
+ DBAdapter.logDebug(debug, "Xpay initParms: false");
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/xpay/XpayResp.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/xpay/XpayResp.java
new file mode 100644
index 00000000..3e3300ee
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/xpay/XpayResp.java
@@ -0,0 +1,186 @@
+package it.acxent.bank.xpay;
+
+import it.acxent.bank._BankAdapter;
+import it.acxent.db.ApplParmFull;
+import it.acxent.reg.EcDc;
+
+public class XpayResp extends _BankAdapter {
+ private long id_ordine;
+
+ private String importo;
+
+ private String data;
+
+ private String divisa;
+
+ private String session_id;
+
+ private String codTrans;
+
+ private String orario;
+
+ private String esito;
+
+ private String codAut;
+
+ private String BRAND;
+
+ private String nome;
+
+ private String cognome;
+
+ private String email;
+
+ private String mac;
+
+ private String messaggio;
+
+ public static final String ESITO_OK = "OK";
+
+ public static final String ESITO_KO = "KO";
+
+ public XpayResp() {}
+
+ public XpayResp(ApplParmFull apFull) {
+ setAp(apFull);
+ }
+
+ public long getId_ordine() {
+ return this.id_ordine;
+ }
+
+ public void setId_ordine(long id_ordine) {
+ this.id_ordine = id_ordine;
+ }
+
+ public String getImporto() {
+ return (this.importo == null) ? "" : this.importo;
+ }
+
+ public void setImporto(String importo) {
+ this.importo = importo;
+ }
+
+ public String getData() {
+ return (this.data == null) ? "" : this.data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+
+ public String getDivisa() {
+ return (this.divisa == null) ? "" : this.divisa;
+ }
+
+ public void setDivisa(String divisa) {
+ this.divisa = divisa;
+ }
+
+ public String getSession_id() {
+ return (this.session_id == null) ? "" : this.session_id;
+ }
+
+ public void setSession_id(String session_id) {
+ this.session_id = session_id;
+ }
+
+ public String getCodTrans() {
+ return (this.codTrans == null) ? "" : this.codTrans;
+ }
+
+ public void setCodTrans(String codTrans) {
+ this.codTrans = codTrans;
+ }
+
+ public String getOrario() {
+ return (this.orario == null) ? "" : this.orario;
+ }
+
+ public void setOrario(String orario) {
+ this.orario = orario;
+ }
+
+ public String getEsito() {
+ return (this.esito == null) ? "" : this.esito;
+ }
+
+ public void setEsito(String esito) {
+ this.esito = esito;
+ }
+
+ public String getCodAut() {
+ return (this.codAut == null) ? "" : this.codAut;
+ }
+
+ public void setCodAut(String codAut) {
+ this.codAut = codAut;
+ }
+
+ public String getBRAND() {
+ return (this.BRAND == null) ? "" : this.BRAND;
+ }
+
+ public void setBRAND(String brand) {
+ this.BRAND = brand;
+ }
+
+ public String getNome() {
+ return (this.nome == null) ? "" : this.nome;
+ }
+
+ public void setNome(String nome) {
+ this.nome = nome;
+ }
+
+ public String getCognome() {
+ return (this.cognome == null) ? "" : this.cognome;
+ }
+
+ public void setCognome(String cognome) {
+ this.cognome = cognome;
+ }
+
+ public String getEmail() {
+ return (this.email == null) ? "" : this.email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getMac() {
+ return (this.mac == null) ? "" : this.mac;
+ }
+
+ public void setMac(String mac) {
+ this.mac = mac;
+ }
+
+ public String getMessaggio() {
+ return (this.messaggio == null) ? "" : this.messaggio.trim();
+ }
+
+ public void setMessaggio(String messaggio) {
+ this.messaggio = messaggio;
+ }
+
+ public boolean isMacRitornoOk() {
+ String temp = "codTrans=" + getCodTrans() + "esito=" + getEsito() + "importo=" + getImporto() + "divisa=" + getDivisa() + "data=" +
+ getData() + "orario=" + getOrario() + "codAut=" + getCodAut() + getKey();
+ String res = "";
+ try {
+ res = EcDc.cryptSHA1Plain(temp);
+ if (res.equals(getMac()))
+ return true;
+ return false;
+ } catch (Exception e) {
+ e.printStackTrace();
+ return false;
+ }
+ }
+
+ public String getKey() {
+ return getParm("XPAY_MAC_KEY").getTesto();
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/gtbill/GTBillReq.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/gtbill/GTBillReq.java
new file mode 100644
index 00000000..776a5c53
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/gtbill/GTBillReq.java
@@ -0,0 +1,134 @@
+package it.acxent.gtbill;
+
+import it.acxent.bank._BankAdapter;
+import it.acxent.common.Parm;
+import it.acxent.db.ApplParmFull;
+
+public class GTBillReq extends _BankAdapter {
+ public static final String P_GTBILL_MERCHANT_ID = "GTBILL_MERCHANT_ID";
+
+ public static final String P_GTBILL_SITE_ID = "GTBILL_SITE_ID";
+
+ public static final String P_GTBILL_RETURN_URL = "GTBILL_RETURN_URL";
+
+ public static final String DIV_CODE_EURO = "EUR";
+
+ public static final String DIV_CODE_DOLLARI = "USD";
+
+ public static final String DIV_CODE_STERLINE = "GBP";
+
+ public static final String DIV_CODE_CAN = "CAD";
+
+ public static final String DIV_CODE_REAL = "234";
+
+ private String mycurrencyid;
+
+ private String myamounttotal;
+
+ private String myamountshipping;
+
+ private String myitemname;
+
+ private String myitemquantity;
+
+ private String myitemamount;
+
+ private String myitemdesc;
+
+ public static final String FORM_URL_POST = "https://sale.GTBill.com/quickpay.aspx";
+
+ public static final String PROG_LANG_URL_POST = "https://sale.GTBill.com/quickpay2.aspx";
+
+ public static final String PROG_LANG_URL_POST_REDIRECT = "https://sale.GTBill.com/quickpay.aspx?refid=";
+
+ public static void initApplicationParms(ApplParmFull ap) {
+ if (ap != null) {
+ Parm bean = new Parm(ap);
+ String l_tipoParm = "GTBILL";
+ bean.findByCodice("GTBILL_MERCHANT_ID");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("GTBILL_MERCHANT_ID");
+ bean.setDescrizione("GTBILL_MERCHANT_ID");
+ bean.setFlgTipo(0L);
+ bean.setNota("MERCHANT ID ASSEGNATO DALLA BANCA");
+ bean.save();
+ bean.findByCodice("GTBILL_SITE_ID");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("GTBILL_SITE_ID");
+ bean.setDescrizione("GTBILL_SITE_ID");
+ bean.setFlgTipo(0L);
+ bean.setNota("SITE ID ASSEGNATO DALLA BANCA");
+ bean.save();
+ bean.findByCodice("GTBILL_RETURN_URL");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("GTBILL_RETURN_URL");
+ bean.setDescrizione("GTBILL_RETURN_URL");
+ bean.setFlgTipo(0L);
+ bean.setNota("URL AL QUALE SI DEVE RITORNARE DOPO IL PAGAMENTO");
+ bean.save();
+ }
+ }
+
+ public String getMyamounttotal() {
+ return (this.myamounttotal == null) ? "" :
+ this.myamounttotal.replace(".", ",").replace(",", ".");
+ }
+
+ public void setMyamounttotal(String myamount) {
+ this.myamounttotal = myamount;
+ }
+
+ public String getMycurrencyid() {
+ return (this.mycurrencyid == null) ? "" : this.mycurrencyid;
+ }
+
+ public void setMycurrencyid(String mycurrency) {
+ this.mycurrencyid = mycurrency;
+ }
+
+ public String getMyamountshipping() {
+ return (this.myamountshipping == null) ? "" :
+ this.myamountshipping;
+ }
+
+ public void setMyamountshipping(String myamountshipping) {
+ this.myamountshipping = myamountshipping;
+ }
+
+ public String getMyitemname() {
+ return (this.myitemname == null) ? "" : this.myitemname;
+ }
+
+ public void setMyitemname(String myitemname) {
+ this.myitemname = myitemname;
+ }
+
+ public String getMyitemquantity() {
+ return (this.myitemquantity == null) ? "" :
+ this.myitemquantity;
+ }
+
+ public void setMyitemquantity(String myitemquantity) {
+ this.myitemquantity = myitemquantity;
+ }
+
+ public String getMyitemamount() {
+ return (this.myitemamount == null) ? "" :
+ this.myitemamount.replace(".", ",").replace(",", ".");
+ }
+
+ public void setMyitemamount(String myitemamount) {
+ this.myitemamount = myitemamount;
+ }
+
+ public String getMyitemdesc() {
+ return (this.myitemdesc == null) ? "" : this.myitemdesc;
+ }
+
+ public void setMyitemdesc(String myitemdesc) {
+ this.myitemdesc = myitemdesc;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/gtbill/GTBillRes.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/gtbill/GTBillRes.java
new file mode 100644
index 00000000..2663f647
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/gtbill/GTBillRes.java
@@ -0,0 +1,158 @@
+package it.acxent.gtbill;
+
+import it.acxent.bank._BankAdapter;
+
+public class GTBillRes extends _BankAdapter {
+ private String myshoplogin;
+
+ private int mycurrency;
+
+ private float myamount;
+
+ private String myshoptrxID;
+
+ private String mybuyername;
+
+ private String mybuyeremail;
+
+ private String mytrxresult;
+
+ private String myauthcode;
+
+ private String myerrorcode;
+
+ private String myerrordescription;
+
+ private String myerrorbanktrxid;
+
+ private long id_ordine;
+
+ private String myalertcode;
+
+ private String myalertdescription;
+
+ private String mycustominfo;
+
+ public String getMyalertcode() {
+ return (this.myalertcode == null) ? "" : this.myalertcode;
+ }
+
+ public void setMyalertcode(String myalertcode) {
+ this.myalertcode = myalertcode;
+ }
+
+ public String getMyalertdescription() {
+ return (this.myalertdescription == null) ? "" :
+ this.myalertdescription;
+ }
+
+ public void setMyalertdescription(String myalertdescription) {
+ this.myalertdescription = myalertdescription;
+ }
+
+ public float getMyamount() {
+ return this.myamount;
+ }
+
+ public void setMyamount(float myamount) {
+ this.myamount = myamount;
+ }
+
+ public String getMyauthcode() {
+ return (this.myauthcode == null) ? "" : this.myauthcode;
+ }
+
+ public void setMyauthcode(String myauthcode) {
+ this.myauthcode = myauthcode;
+ }
+
+ public String getMybuyeremail() {
+ return (this.mybuyeremail == null) ? "" : this.mybuyeremail;
+ }
+
+ public void setMybuyeremail(String mybuyeremail) {
+ this.mybuyeremail = mybuyeremail;
+ }
+
+ public String getMybuyername() {
+ return (this.mybuyername == null) ? "" : this.mybuyername;
+ }
+
+ public void setMybuyername(String mybuyername) {
+ this.mybuyername = mybuyername;
+ }
+
+ public int getMycurrency() {
+ return this.mycurrency;
+ }
+
+ public void setMycurrency(int mycurrency) {
+ this.mycurrency = mycurrency;
+ }
+
+ public String getMycustominfo() {
+ return (this.mycustominfo == null) ? "" : this.mycustominfo;
+ }
+
+ public void setMycustominfo(String mycustominfo) {
+ this.mycustominfo = mycustominfo;
+ }
+
+ public String getMyerrorbanktrxid() {
+ return (this.myerrorbanktrxid == null) ? "" :
+ this.myerrorbanktrxid;
+ }
+
+ public void setMyerrorbanktrxid(String myerrorbanktrxid) {
+ this.myerrorbanktrxid = myerrorbanktrxid;
+ }
+
+ public String getMyerrorcode() {
+ return (this.myerrorcode == null) ? "" : this.myerrorcode;
+ }
+
+ public void setMyerrorcode(String myerrorcode) {
+ this.myerrorcode = myerrorcode;
+ }
+
+ public String getMyerrordescription() {
+ return (this.myerrordescription == null) ? "" :
+ this.myerrordescription;
+ }
+
+ public void setMyerrordescription(String myerrordescription) {
+ this.myerrordescription = myerrordescription;
+ }
+
+ public String getMyshoplogin() {
+ return (this.myshoplogin == null) ? "" : this.myshoplogin;
+ }
+
+ public void setMyshoplogin(String myshoplogin) {
+ this.myshoplogin = myshoplogin;
+ }
+
+ public String getMyshoptrxID() {
+ return (this.myshoptrxID == null) ? "" : this.myshoptrxID;
+ }
+
+ public void setMyshoptrxID(String myshoptrxID) {
+ this.myshoptrxID = myshoptrxID;
+ }
+
+ public String getMytrxresult() {
+ return (this.mytrxresult == null) ? "" : this.mytrxresult;
+ }
+
+ public void setMytrxresult(String mytrxresult) {
+ this.mytrxresult = mytrxresult;
+ }
+
+ public long getId_ordine() {
+ return this.id_ordine;
+ }
+
+ public void setId_ordine(long id_ordine) {
+ this.id_ordine = id_ordine;
+ }
+}
diff --git a/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/gtbill/servlet/GTBillSvlt.java b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/gtbill/servlet/GTBillSvlt.java
new file mode 100644
index 00000000..762e7fd1
--- /dev/null
+++ b/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/gtbill/servlet/GTBillSvlt.java
@@ -0,0 +1,115 @@
+package it.acxent.gtbill.servlet;
+
+import it.acxent.gtbill.GTBillReq;
+import it.acxent.servlet.AcServlet;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class GTBillSvlt extends AcServlet {
+ private static final long serialVersionUID = 6201212373211424420L;
+
+ protected static final String CMD_SEND_REQ = "send";
+
+ protected static final String CMD_GET_RES = "res";
+
+ protected static final String BEAN_SELLA_RES = "sellaResp";
+
+ protected final void callJsp(HttpServletRequest req, HttpServletResponse res) {
+ setJspPageRelative(getJspOkPage(req, res), req);
+ try {
+ RequestDispatcher rd = getServletContext()
+ .getRequestDispatcher(getJspPage(req));
+ rd.forward((ServletRequest)req, (ServletResponse)res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected void sendRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ GTBillReq gtbillreq = new GTBillReq();
+ fillObject(req, gtbillreq);
+ String theUrl = "https://sale.GTBill.com/quickpay2.aspx";
+ StringBuilder sb = new StringBuilder();
+ sb.append("?MerchantID=");
+ sb.append(getApFull().getParm("GTBILL_MERCHANT_ID"));
+ sb.append("&SiteID=");
+ sb.append(getApFull().getParm("GTBILL_SITE_ID"));
+ sb.append("&AmountTotal=");
+ sb.append(gtbillreq.getMyamounttotal());
+ sb.append("&CurrencyID=");
+ sb.append("EUR");
+ sb.append("&AmountShipping=");
+ sb.append(gtbillreq.getMyamountshipping());
+ sb.append("&ReturnURL=");
+ sb.append(getApFull().getParm("GTBILL_RETURN_URL"));
+ sb.append("&ItemAmount[0]=");
+ sb.append(gtbillreq.getMyitemamount());
+ sb.append("&ItemDesc[0]=");
+ sb.append(gtbillreq.getMyitemdesc());
+ sb.append("&ItemName[0]=");
+ sb.append(gtbillreq.getMyitemname());
+ sb.append("&ItemQuantity[0]=");
+ sb.append(gtbillreq.getMyitemquantity());
+ URL url = new URL(theUrl + theUrl);
+ System.out.println("startremotecmd: chiamata a " + theUrl +
+ sb.toString());
+ HttpURLConnection connection = (HttpURLConnection)
+ url.openConnection();
+ BufferedReader read = new BufferedReader(new InputStreamReader(
+ connection.getInputStream()));
+ String line = read.readLine();
+ String html = "";
+ while (line != null) {
+ html = html + html;
+ line = read.readLine();
+ }
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected String getCodiceEsercente(HttpServletRequest req) {
+ return getParm("COD_ESER_SELLA").getTesto();
+ }
+
+ protected String getJspErrorPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("SELLA_OK").getTesto();
+ if (temp.isEmpty())
+ return getJspKoPage(req, res);
+ return temp;
+ }
+
+ protected String getJspOkPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("SELLA_OK").getTesto();
+ if (temp.isEmpty())
+ return "payRes.jsp";
+ return temp;
+ }
+
+ protected String getJspKoPage(HttpServletRequest req, HttpServletResponse res) {
+ String temp = getParm("SELLA_OK").getTesto();
+ if (temp.isEmpty())
+ return "payRes.jsp";
+ return temp;
+ }
+
+ protected void processRequest(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ sendRequest(req, res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ protected boolean isSecureServlet(HttpServletRequest req) {
+ return false;
+ }
+}
diff --git a/decompiled-libs/www/acxent-checkvat-1.0.0/META-INF/MANIFEST.MF b/decompiled-libs/www/acxent-checkvat-1.0.0/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..e6558cdf
--- /dev/null
+++ b/decompiled-libs/www/acxent-checkvat-1.0.0/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Archiver-Version: Plexus Archiver
+Created-By: Apache Maven 3.8.7
+Built-By: jenkins
+Build-Jdk: 17.0.16
+
diff --git a/decompiled-libs/www/acxent-checkvat-1.0.0/META-INF/maven/it.acxent/acxent-checkvat/pom.properties b/decompiled-libs/www/acxent-checkvat-1.0.0/META-INF/maven/it.acxent/acxent-checkvat/pom.properties
new file mode 100644
index 00000000..5228021c
--- /dev/null
+++ b/decompiled-libs/www/acxent-checkvat-1.0.0/META-INF/maven/it.acxent/acxent-checkvat/pom.properties
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Mon Jul 07 23:51:17 CEST 2025
+artifactId=acxent-checkvat
+groupId=it.acxent
+version=1.0.0
diff --git a/decompiled-libs/www/acxent-checkvat-1.0.0/META-INF/maven/it.acxent/acxent-checkvat/pom.xml b/decompiled-libs/www/acxent-checkvat-1.0.0/META-INF/maven/it.acxent/acxent-checkvat/pom.xml
new file mode 100644
index 00000000..7ac54894
--- /dev/null
+++ b/decompiled-libs/www/acxent-checkvat-1.0.0/META-INF/maven/it.acxent/acxent-checkvat/pom.xml
@@ -0,0 +1,65 @@
+
+ 4.0.0
+ it.acxent
+ acxent-checkvat
+ 1.0.0
+
+ Check Vat Service
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.13.0
+
+ 11
+ 11
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ 3.7.0
+
+
+ org.apache.maven.plugins
+ maven-toolchains-plugin
+ 3.1.0
+
+
+
+ toolchain
+
+
+
+
+
+
+ 11
+
+
+
+
+
+
+
+
+ org.apache.axis
+ axis
+ 1.4
+
+
+ javax.xml.rpc
+ javax.xml.rpc-api
+ 1.1.2
+
+
+
+
+
+ github-repo
+ GitHub acolzi Apache Maven Packages
+ https://maven.pkg.github.com/acolzi/repo
+
+
+
\ No newline at end of file
diff --git a/decompiled-libs/www/acxent-checkvat-1.0.0/checkVat/services/vies/taxud/eu/europa/ec/CheckVatBindingStub.java b/decompiled-libs/www/acxent-checkvat-1.0.0/checkVat/services/vies/taxud/eu/europa/ec/CheckVatBindingStub.java
new file mode 100644
index 00000000..10fc5a3b
--- /dev/null
+++ b/decompiled-libs/www/acxent-checkvat-1.0.0/checkVat/services/vies/taxud/eu/europa/ec/CheckVatBindingStub.java
@@ -0,0 +1,381 @@
+package checkVat.services.vies.taxud.eu.europa.ec;
+
+import java.net.URL;
+import java.rmi.RemoteException;
+import java.util.Date;
+import java.util.Enumeration;
+import java.util.Map;
+import java.util.Vector;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.holders.BooleanHolder;
+import javax.xml.rpc.holders.StringHolder;
+import org.apache.axis.AxisFault;
+import org.apache.axis.NoEndPointException;
+import org.apache.axis.client.Call;
+import org.apache.axis.client.Stub;
+import org.apache.axis.constants.Style;
+import org.apache.axis.constants.Use;
+import org.apache.axis.description.OperationDesc;
+import org.apache.axis.description.ParameterDesc;
+import org.apache.axis.encoding.DeserializerFactory;
+import org.apache.axis.encoding.SerializerFactory;
+import org.apache.axis.encoding.XMLType;
+import org.apache.axis.encoding.ser.ArrayDeserializerFactory;
+import org.apache.axis.encoding.ser.ArraySerializerFactory;
+import org.apache.axis.encoding.ser.BaseDeserializerFactory;
+import org.apache.axis.encoding.ser.BaseSerializerFactory;
+import org.apache.axis.encoding.ser.BeanDeserializerFactory;
+import org.apache.axis.encoding.ser.BeanSerializerFactory;
+import org.apache.axis.encoding.ser.EnumDeserializerFactory;
+import org.apache.axis.encoding.ser.EnumSerializerFactory;
+import org.apache.axis.encoding.ser.SimpleDeserializerFactory;
+import org.apache.axis.encoding.ser.SimpleListDeserializerFactory;
+import org.apache.axis.encoding.ser.SimpleListSerializerFactory;
+import org.apache.axis.encoding.ser.SimpleSerializerFactory;
+import org.apache.axis.holders.DateHolder;
+import org.apache.axis.soap.SOAPConstants;
+import org.apache.axis.utils.JavaUtils;
+import types.checkVat.services.vies.taxud.eu.europa.ec.MatchCode;
+import types.checkVat.services.vies.taxud.eu.europa.ec.holders.MatchCodeHolder;
+
+public class CheckVatBindingStub extends Stub implements CheckVatPortType {
+ private Vector cachedSerClasses = new Vector();
+
+ private Vector cachedSerQNames = new Vector();
+
+ private Vector cachedSerFactories = new Vector();
+
+ private Vector cachedDeserFactories = new Vector();
+
+ static OperationDesc[] _operations = new OperationDesc[2];
+
+ static {
+ _initOperationDesc1();
+ }
+
+ private static void _initOperationDesc1() {
+ OperationDesc oper = new OperationDesc();
+ oper.setName("checkVat");
+ ParameterDesc param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "countryCode"), (byte)3, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "vatNumber"), (byte)3, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "requestDate"), (byte)2, new QName("http://www.w3.org/2001/XMLSchema", "date"), Date.class, false, false);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "valid"), (byte)2, new QName("http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class, false, false);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "name"), (byte)2, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+ param.setOmittable(true);
+ param.setNillable(true);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "address"), (byte)2, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+ param.setOmittable(true);
+ param.setNillable(true);
+ oper.addParameter(param);
+ oper.setReturnType(XMLType.AXIS_VOID);
+ oper.setStyle(Style.WRAPPED);
+ oper.setUse(Use.LITERAL);
+ _operations[0] = oper;
+ oper = new OperationDesc();
+ oper.setName("checkVatApprox");
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "countryCode"), (byte)3, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "vatNumber"), (byte)3, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderName"), (byte)3, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+ param.setOmittable(true);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderCompanyType"), (byte)3, new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "companyTypeCode"), String.class, false, false);
+ param.setOmittable(true);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderStreet"), (byte)3, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+ param.setOmittable(true);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderPostcode"), (byte)3, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+ param.setOmittable(true);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderCity"), (byte)3, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+ param.setOmittable(true);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "requesterCountryCode"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+ param.setOmittable(true);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "requesterVatNumber"), (byte)1, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+ param.setOmittable(true);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "requestDate"), (byte)2, new QName("http://www.w3.org/2001/XMLSchema", "date"), Date.class, false, false);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "valid"), (byte)2, new QName("http://www.w3.org/2001/XMLSchema", "boolean"), boolean.class, false, false);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderAddress"), (byte)2, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+ param.setOmittable(true);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderNameMatch"), (byte)2, new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "matchCode"), MatchCode.class, false, false);
+ param.setOmittable(true);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderCompanyTypeMatch"), (byte)2, new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "matchCode"), MatchCode.class, false, false);
+ param.setOmittable(true);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderStreetMatch"), (byte)2, new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "matchCode"), MatchCode.class, false, false);
+ param.setOmittable(true);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderPostcodeMatch"), (byte)2, new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "matchCode"), MatchCode.class, false, false);
+ param.setOmittable(true);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderCityMatch"), (byte)2, new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "matchCode"), MatchCode.class, false, false);
+ param.setOmittable(true);
+ oper.addParameter(param);
+ param = new ParameterDesc(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "requestIdentifier"), (byte)2, new QName("http://www.w3.org/2001/XMLSchema", "string"), String.class, false, false);
+ oper.addParameter(param);
+ oper.setReturnType(XMLType.AXIS_VOID);
+ oper.setStyle(Style.WRAPPED);
+ oper.setUse(Use.LITERAL);
+ _operations[1] = oper;
+ }
+
+ public CheckVatBindingStub() throws AxisFault {
+ this(null);
+ }
+
+ public CheckVatBindingStub(URL endpointURL, Service service) throws AxisFault {
+ this(service);
+ this.cachedEndpoint = endpointURL;
+ }
+
+ public CheckVatBindingStub(Service service) throws AxisFault {
+ if (service == null) {
+ this.service = new org.apache.axis.client.Service();
+ } else {
+ this.service = service;
+ }
+ ((org.apache.axis.client.Service)this.service).setTypeMappingVersion("1.2");
+ Class beansf = BeanSerializerFactory.class;
+ Class beandf = BeanDeserializerFactory.class;
+ Class enumsf = EnumSerializerFactory.class;
+ Class enumdf = EnumDeserializerFactory.class;
+ Class arraysf = ArraySerializerFactory.class;
+ Class arraydf = ArrayDeserializerFactory.class;
+ Class simplesf = SimpleSerializerFactory.class;
+ Class simpledf = SimpleDeserializerFactory.class;
+ Class simplelistsf = SimpleListSerializerFactory.class;
+ Class simplelistdf = SimpleListDeserializerFactory.class;
+ QName qName = new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "companyTypeCode");
+ this.cachedSerQNames.add(qName);
+ Class cls = String.class;
+ this.cachedSerClasses.add(cls);
+ this.cachedSerFactories.add(BaseSerializerFactory.createFactory(SimpleSerializerFactory.class, cls, qName));
+ this.cachedDeserFactories.add(BaseDeserializerFactory.createFactory(SimpleDeserializerFactory.class, cls, qName));
+ qName = new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "matchCode");
+ this.cachedSerQNames.add(qName);
+ Class clazz = MatchCode.class;
+ this.cachedSerClasses.add(clazz);
+ this.cachedSerFactories.add(enumsf);
+ this.cachedDeserFactories.add(enumdf);
+ }
+
+ protected Call createCall() throws RemoteException {
+ try {
+ Call _call = _createCall();
+ if (this.maintainSessionSet)
+ _call.setMaintainSession(this.maintainSession);
+ if (this.cachedUsername != null)
+ _call.setUsername(this.cachedUsername);
+ if (this.cachedPassword != null)
+ _call.setPassword(this.cachedPassword);
+ if (this.cachedEndpoint != null)
+ _call.setTargetEndpointAddress(this.cachedEndpoint);
+ if (this.cachedTimeout != null)
+ _call.setTimeout(this.cachedTimeout);
+ if (this.cachedPortName != null)
+ _call.setPortName(this.cachedPortName);
+ Enumeration keys = this.cachedProperties.keys();
+ while (keys.hasMoreElements()) {
+ String key = (String)keys.nextElement();
+ _call.setProperty(key, this.cachedProperties.get(key));
+ }
+ synchronized (this) {
+ if (firstCall()) {
+ _call.setEncodingStyle(null);
+ for (int i = 0; i < this.cachedSerFactories.size(); i++) {
+ Class cls = this.cachedSerClasses.get(i);
+ QName qName = this.cachedSerQNames.get(i);
+ Object x = this.cachedSerFactories.get(i);
+ if (x instanceof Class) {
+ Class sf = this.cachedSerFactories.get(i);
+ Class df = this.cachedDeserFactories.get(i);
+ _call.registerTypeMapping(cls, qName, sf, df, false);
+ } else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) {
+ SerializerFactory sf = this.cachedSerFactories.get(i);
+ DeserializerFactory df = this.cachedDeserFactories.get(i);
+ _call.registerTypeMapping(cls, qName, sf, df, false);
+ }
+ }
+ }
+ }
+ return _call;
+ } catch (Throwable _t) {
+ throw new AxisFault("Failure trying to get the Call object", _t);
+ }
+ }
+
+ public void checkVat(StringHolder countryCode, StringHolder vatNumber, DateHolder requestDate, BooleanHolder valid, StringHolder name, StringHolder address) throws RemoteException {
+ if (this.cachedEndpoint == null)
+ throw new NoEndPointException();
+ Call _call = createCall();
+ _call.setOperation(_operations[0]);
+ _call.setUseSOAPAction(true);
+ _call.setSOAPActionURI("");
+ _call.setEncodingStyle(null);
+ _call.setProperty("sendXsiTypes", Boolean.FALSE);
+ _call.setProperty("sendMultiRefs", Boolean.FALSE);
+ _call.setSOAPVersion((SOAPConstants)SOAPConstants.SOAP11_CONSTANTS);
+ _call.setOperationName(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "checkVat"));
+ setRequestHeaders(_call);
+ setAttachments(_call);
+ try {
+ Object _resp = _call.invoke(new Object[] { countryCode.value, vatNumber.value });
+ if (_resp instanceof RemoteException)
+ throw (RemoteException)_resp;
+ extractAttachments(_call);
+ Map _output = _call.getOutputParams();
+ try {
+ countryCode.value = (String)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "countryCode"));
+ } catch (Exception _exception) {
+ countryCode.value = (String)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "countryCode")), String.class);
+ }
+ try {
+ vatNumber.value = (String)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "vatNumber"));
+ } catch (Exception _exception) {
+ vatNumber.value = (String)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "vatNumber")), String.class);
+ }
+ try {
+ requestDate.value = (Date)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "requestDate"));
+ } catch (Exception _exception) {
+ requestDate.value = (Date)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "requestDate")), Date.class);
+ }
+ try {
+ valid.value = (Boolean)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "valid"));
+ } catch (Exception _exception) {
+ valid.value = (Boolean)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "valid")), boolean.class);
+ }
+ try {
+ name.value = (String)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "name"));
+ } catch (Exception _exception) {
+ name.value = (String)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "name")), String.class);
+ }
+ try {
+ address.value = (String)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "address"));
+ } catch (Exception _exception) {
+ address.value = (String)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "address")), String.class);
+ }
+ } catch (AxisFault axisFaultException) {
+ throw axisFaultException;
+ }
+ }
+
+ public void checkVatApprox(StringHolder countryCode, StringHolder vatNumber, StringHolder traderName, StringHolder traderCompanyType, StringHolder traderStreet, StringHolder traderPostcode, StringHolder traderCity, String requesterCountryCode, String requesterVatNumber, DateHolder requestDate, BooleanHolder valid, StringHolder traderAddress, MatchCodeHolder traderNameMatch, MatchCodeHolder traderCompanyTypeMatch, MatchCodeHolder traderStreetMatch, MatchCodeHolder traderPostcodeMatch, MatchCodeHolder traderCityMatch, StringHolder requestIdentifier) throws RemoteException {
+ if (this.cachedEndpoint == null)
+ throw new NoEndPointException();
+ Call _call = createCall();
+ _call.setOperation(_operations[1]);
+ _call.setUseSOAPAction(true);
+ _call.setSOAPActionURI("");
+ _call.setEncodingStyle(null);
+ _call.setProperty("sendXsiTypes", Boolean.FALSE);
+ _call.setProperty("sendMultiRefs", Boolean.FALSE);
+ _call.setSOAPVersion((SOAPConstants)SOAPConstants.SOAP11_CONSTANTS);
+ _call.setOperationName(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "checkVatApprox"));
+ setRequestHeaders(_call);
+ setAttachments(_call);
+ try {
+ Object _resp = _call.invoke(new Object[] { countryCode.value, vatNumber.value, traderName.value, traderCompanyType.value, traderStreet.value, traderPostcode.value, traderCity.value, requesterCountryCode, requesterVatNumber });
+ if (_resp instanceof RemoteException)
+ throw (RemoteException)_resp;
+ extractAttachments(_call);
+ Map _output = _call.getOutputParams();
+ try {
+ countryCode.value = (String)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "countryCode"));
+ } catch (Exception _exception) {
+ countryCode.value = (String)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "countryCode")), String.class);
+ }
+ try {
+ vatNumber.value = (String)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "vatNumber"));
+ } catch (Exception _exception) {
+ vatNumber.value = (String)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "vatNumber")), String.class);
+ }
+ try {
+ traderName.value = (String)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderName"));
+ } catch (Exception _exception) {
+ traderName.value = (String)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderName")), String.class);
+ }
+ try {
+ traderCompanyType.value = (String)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderCompanyType"));
+ } catch (Exception _exception) {
+ traderCompanyType.value = (String)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderCompanyType")), String.class);
+ }
+ try {
+ traderStreet.value = (String)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderStreet"));
+ } catch (Exception _exception) {
+ traderStreet.value = (String)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderStreet")), String.class);
+ }
+ try {
+ traderPostcode.value = (String)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderPostcode"));
+ } catch (Exception _exception) {
+ traderPostcode.value = (String)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderPostcode")), String.class);
+ }
+ try {
+ traderCity.value = (String)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderCity"));
+ } catch (Exception _exception) {
+ traderCity.value = (String)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderCity")), String.class);
+ }
+ try {
+ requestDate.value = (Date)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "requestDate"));
+ } catch (Exception _exception) {
+ requestDate.value = (Date)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "requestDate")), Date.class);
+ }
+ try {
+ valid.value = (Boolean)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "valid"));
+ } catch (Exception _exception) {
+ valid.value = (Boolean)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "valid")), boolean.class);
+ }
+ try {
+ traderAddress.value = (String)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderAddress"));
+ } catch (Exception _exception) {
+ traderAddress.value = (String)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderAddress")), String.class);
+ }
+ try {
+ traderNameMatch.value = (MatchCode)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderNameMatch"));
+ } catch (Exception _exception) {
+ traderNameMatch.value = (MatchCode)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderNameMatch")), MatchCode.class);
+ }
+ try {
+ traderCompanyTypeMatch.value = (MatchCode)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderCompanyTypeMatch"));
+ } catch (Exception _exception) {
+ traderCompanyTypeMatch.value = (MatchCode)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderCompanyTypeMatch")), MatchCode.class);
+ }
+ try {
+ traderStreetMatch.value = (MatchCode)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderStreetMatch"));
+ } catch (Exception _exception) {
+ traderStreetMatch.value = (MatchCode)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderStreetMatch")), MatchCode.class);
+ }
+ try {
+ traderPostcodeMatch.value = (MatchCode)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderPostcodeMatch"));
+ } catch (Exception _exception) {
+ traderPostcodeMatch.value = (MatchCode)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderPostcodeMatch")), MatchCode.class);
+ }
+ try {
+ traderCityMatch.value = (MatchCode)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderCityMatch"));
+ } catch (Exception _exception) {
+ traderCityMatch.value = (MatchCode)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "traderCityMatch")), MatchCode.class);
+ }
+ try {
+ requestIdentifier.value = (String)_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "requestIdentifier"));
+ } catch (Exception _exception) {
+ requestIdentifier.value = (String)JavaUtils.convert(_output.get(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "requestIdentifier")), String.class);
+ }
+ } catch (AxisFault axisFaultException) {
+ throw axisFaultException;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-checkvat-1.0.0/checkVat/services/vies/taxud/eu/europa/ec/CheckVatPortType.java b/decompiled-libs/www/acxent-checkvat-1.0.0/checkVat/services/vies/taxud/eu/europa/ec/CheckVatPortType.java
new file mode 100644
index 00000000..1853e2cb
--- /dev/null
+++ b/decompiled-libs/www/acxent-checkvat-1.0.0/checkVat/services/vies/taxud/eu/europa/ec/CheckVatPortType.java
@@ -0,0 +1,14 @@
+package checkVat.services.vies.taxud.eu.europa.ec;
+
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import javax.xml.rpc.holders.BooleanHolder;
+import javax.xml.rpc.holders.StringHolder;
+import org.apache.axis.holders.DateHolder;
+import types.checkVat.services.vies.taxud.eu.europa.ec.holders.MatchCodeHolder;
+
+public interface CheckVatPortType extends Remote {
+ void checkVat(StringHolder paramStringHolder1, StringHolder paramStringHolder2, DateHolder paramDateHolder, BooleanHolder paramBooleanHolder, StringHolder paramStringHolder3, StringHolder paramStringHolder4) throws RemoteException;
+
+ void checkVatApprox(StringHolder paramStringHolder1, StringHolder paramStringHolder2, StringHolder paramStringHolder3, StringHolder paramStringHolder4, StringHolder paramStringHolder5, StringHolder paramStringHolder6, StringHolder paramStringHolder7, String paramString1, String paramString2, DateHolder paramDateHolder, BooleanHolder paramBooleanHolder, StringHolder paramStringHolder8, MatchCodeHolder paramMatchCodeHolder1, MatchCodeHolder paramMatchCodeHolder2, MatchCodeHolder paramMatchCodeHolder3, MatchCodeHolder paramMatchCodeHolder4, MatchCodeHolder paramMatchCodeHolder5, StringHolder paramStringHolder9) throws RemoteException;
+}
diff --git a/decompiled-libs/www/acxent-checkvat-1.0.0/checkVat/services/vies/taxud/eu/europa/ec/CheckVatPortTypeProxy.java b/decompiled-libs/www/acxent-checkvat-1.0.0/checkVat/services/vies/taxud/eu/europa/ec/CheckVatPortTypeProxy.java
new file mode 100644
index 00000000..4da2eb12
--- /dev/null
+++ b/decompiled-libs/www/acxent-checkvat-1.0.0/checkVat/services/vies/taxud/eu/europa/ec/CheckVatPortTypeProxy.java
@@ -0,0 +1,64 @@
+package checkVat.services.vies.taxud.eu.europa.ec;
+
+import java.rmi.RemoteException;
+import javax.xml.rpc.ServiceException;
+import javax.xml.rpc.Stub;
+import javax.xml.rpc.holders.BooleanHolder;
+import javax.xml.rpc.holders.StringHolder;
+import org.apache.axis.holders.DateHolder;
+import types.checkVat.services.vies.taxud.eu.europa.ec.holders.MatchCodeHolder;
+
+public class CheckVatPortTypeProxy implements CheckVatPortType {
+ private String _endpoint = null;
+
+ private CheckVatPortType checkVatPortType = null;
+
+ public CheckVatPortTypeProxy() {
+ _initCheckVatPortTypeProxy();
+ }
+
+ public CheckVatPortTypeProxy(String endpoint) {
+ this._endpoint = endpoint;
+ _initCheckVatPortTypeProxy();
+ }
+
+ private void _initCheckVatPortTypeProxy() {
+ try {
+ this.checkVatPortType = new CheckVatServiceLocator().getcheckVatPort();
+ if (this.checkVatPortType != null)
+ if (this._endpoint != null) {
+ ((Stub)this.checkVatPortType)._setProperty("javax.xml.rpc.service.endpoint.address", this._endpoint);
+ } else {
+ this._endpoint = (String)((Stub)this.checkVatPortType)._getProperty("javax.xml.rpc.service.endpoint.address");
+ }
+ } catch (ServiceException e) {}
+ }
+
+ public String getEndpoint() {
+ return this._endpoint;
+ }
+
+ public void setEndpoint(String endpoint) {
+ this._endpoint = endpoint;
+ if (this.checkVatPortType != null)
+ ((Stub)this.checkVatPortType)._setProperty("javax.xml.rpc.service.endpoint.address", this._endpoint);
+ }
+
+ public CheckVatPortType getCheckVatPortType() {
+ if (this.checkVatPortType == null)
+ _initCheckVatPortTypeProxy();
+ return this.checkVatPortType;
+ }
+
+ public void checkVat(StringHolder countryCode, StringHolder vatNumber, DateHolder requestDate, BooleanHolder valid, StringHolder name, StringHolder address) throws RemoteException {
+ if (this.checkVatPortType == null)
+ _initCheckVatPortTypeProxy();
+ this.checkVatPortType.checkVat(countryCode, vatNumber, requestDate, valid, name, address);
+ }
+
+ public void checkVatApprox(StringHolder countryCode, StringHolder vatNumber, StringHolder traderName, StringHolder traderCompanyType, StringHolder traderStreet, StringHolder traderPostcode, StringHolder traderCity, String requesterCountryCode, String requesterVatNumber, DateHolder requestDate, BooleanHolder valid, StringHolder traderAddress, MatchCodeHolder traderNameMatch, MatchCodeHolder traderCompanyTypeMatch, MatchCodeHolder traderStreetMatch, MatchCodeHolder traderPostcodeMatch, MatchCodeHolder traderCityMatch, StringHolder requestIdentifier) throws RemoteException {
+ if (this.checkVatPortType == null)
+ _initCheckVatPortTypeProxy();
+ this.checkVatPortType.checkVatApprox(countryCode, vatNumber, traderName, traderCompanyType, traderStreet, traderPostcode, traderCity, requesterCountryCode, requesterVatNumber, requestDate, valid, traderAddress, traderNameMatch, traderCompanyTypeMatch, traderStreetMatch, traderPostcodeMatch, traderCityMatch, requestIdentifier);
+ }
+}
diff --git a/decompiled-libs/www/acxent-checkvat-1.0.0/checkVat/services/vies/taxud/eu/europa/ec/CheckVatService.java b/decompiled-libs/www/acxent-checkvat-1.0.0/checkVat/services/vies/taxud/eu/europa/ec/CheckVatService.java
new file mode 100644
index 00000000..7c9f1143
--- /dev/null
+++ b/decompiled-libs/www/acxent-checkvat-1.0.0/checkVat/services/vies/taxud/eu/europa/ec/CheckVatService.java
@@ -0,0 +1,13 @@
+package checkVat.services.vies.taxud.eu.europa.ec;
+
+import java.net.URL;
+import javax.xml.rpc.Service;
+import javax.xml.rpc.ServiceException;
+
+public interface CheckVatService extends Service {
+ String getcheckVatPortAddress();
+
+ CheckVatPortType getcheckVatPort() throws ServiceException;
+
+ CheckVatPortType getcheckVatPort(URL paramURL) throws ServiceException;
+}
diff --git a/decompiled-libs/www/acxent-checkvat-1.0.0/checkVat/services/vies/taxud/eu/europa/ec/CheckVatServiceLocator.java b/decompiled-libs/www/acxent-checkvat-1.0.0/checkVat/services/vies/taxud/eu/europa/ec/CheckVatServiceLocator.java
new file mode 100644
index 00000000..fe97f451
--- /dev/null
+++ b/decompiled-libs/www/acxent-checkvat-1.0.0/checkVat/services/vies/taxud/eu/europa/ec/CheckVatServiceLocator.java
@@ -0,0 +1,115 @@
+package checkVat.services.vies.taxud.eu.europa.ec;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.rmi.Remote;
+import java.util.HashSet;
+import java.util.Iterator;
+import javax.xml.namespace.QName;
+import javax.xml.rpc.ServiceException;
+import org.apache.axis.AxisFault;
+import org.apache.axis.EngineConfiguration;
+import org.apache.axis.client.Service;
+import org.apache.axis.client.Stub;
+
+public class CheckVatServiceLocator extends Service implements CheckVatService {
+ public CheckVatServiceLocator() {}
+
+ public CheckVatServiceLocator(EngineConfiguration config) {
+ super(config);
+ }
+
+ public CheckVatServiceLocator(String wsdlLoc, QName sName) throws ServiceException {
+ super(wsdlLoc, sName);
+ }
+
+ private String checkVatPort_address = "http://ec.europa.eu/taxation_customs/vies/services/checkVatService";
+
+ public String getcheckVatPortAddress() {
+ return this.checkVatPort_address;
+ }
+
+ private String checkVatPortWSDDServiceName = "checkVatPort";
+
+ public String getcheckVatPortWSDDServiceName() {
+ return this.checkVatPortWSDDServiceName;
+ }
+
+ public void setcheckVatPortWSDDServiceName(String name) {
+ this.checkVatPortWSDDServiceName = name;
+ }
+
+ public CheckVatPortType getcheckVatPort() throws ServiceException {
+ URL endpoint;
+ try {
+ endpoint = new URL(this.checkVatPort_address);
+ } catch (MalformedURLException e) {
+ throw new ServiceException(e);
+ }
+ return getcheckVatPort(endpoint);
+ }
+
+ public CheckVatPortType getcheckVatPort(URL portAddress) throws ServiceException {
+ try {
+ CheckVatBindingStub _stub = new CheckVatBindingStub(portAddress, this);
+ _stub.setPortName(getcheckVatPortWSDDServiceName());
+ return _stub;
+ } catch (AxisFault e) {
+ return null;
+ }
+ }
+
+ public void setcheckVatPortEndpointAddress(String address) {
+ this.checkVatPort_address = address;
+ }
+
+ public Remote getPort(Class serviceEndpointInterface) throws ServiceException {
+ try {
+ if (CheckVatPortType.class.isAssignableFrom(serviceEndpointInterface)) {
+ CheckVatBindingStub _stub = new CheckVatBindingStub(new URL(this.checkVatPort_address), this);
+ _stub.setPortName(getcheckVatPortWSDDServiceName());
+ return _stub;
+ }
+ } catch (Throwable t) {
+ throw new ServiceException(t);
+ }
+ throw new ServiceException("There is no stub implementation for the interface: " + ((serviceEndpointInterface == null) ? "null" : serviceEndpointInterface.getName()));
+ }
+
+ public Remote getPort(QName portName, Class serviceEndpointInterface) throws ServiceException {
+ if (portName == null)
+ return getPort(serviceEndpointInterface);
+ String inputPortName = portName.getLocalPart();
+ if ("checkVatPort".equals(inputPortName))
+ return getcheckVatPort();
+ Remote _stub = getPort(serviceEndpointInterface);
+ ((Stub)_stub).setPortName(portName);
+ return _stub;
+ }
+
+ public QName getServiceName() {
+ return new QName("urn:ec.europa.eu:taxud:vies:services:checkVat", "checkVatService");
+ }
+
+ private HashSet ports = null;
+
+ public Iterator getPorts() {
+ if (this.ports == null) {
+ this.ports = new HashSet();
+ this.ports.add(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat", "checkVatPort"));
+ }
+ return this.ports.iterator();
+ }
+
+ public void setEndpointAddress(String portName, String address) throws ServiceException {
+ if ("checkVatPort".equals(portName)) {
+ setcheckVatPortEndpointAddress(address);
+ } else {
+ throw new ServiceException(" Cannot set Endpoint Address for Unknown Port" + portName);
+ }
+ }
+
+ public void setEndpointAddress(QName portName, String address) throws ServiceException {
+ setEndpointAddress(portName.getLocalPart(), address);
+ }
+}
diff --git a/decompiled-libs/www/acxent-checkvat-1.0.0/it/acxent/checkVatService/CheckVatClient.java b/decompiled-libs/www/acxent-checkvat-1.0.0/it/acxent/checkVatService/CheckVatClient.java
new file mode 100644
index 00000000..95c68247
--- /dev/null
+++ b/decompiled-libs/www/acxent-checkvat-1.0.0/it/acxent/checkVatService/CheckVatClient.java
@@ -0,0 +1,88 @@
+package it.acxent.checkVatService;
+
+import checkVat.services.vies.taxud.eu.europa.ec.CheckVatPortTypeProxy;
+import java.sql.Date;
+import javax.xml.rpc.holders.BooleanHolder;
+import javax.xml.rpc.holders.StringHolder;
+import org.apache.axis.holders.DateHolder;
+
+public class CheckVatClient {
+ private String name;
+
+ private String address;
+
+ private String vatNumber;
+
+ private String countryCode;
+
+ private Date requestDate;
+
+ private boolean valid;
+
+ public CheckVatClient(String countryCode, String vatNumber) {
+ BooleanHolder validSH = new BooleanHolder();
+ DateHolder requestDateSH = new DateHolder();
+ StringHolder countryCodeSH = new StringHolder(countryCode);
+ StringHolder vatNumberSH = new StringHolder(vatNumber);
+ StringHolder nameSH = new StringHolder();
+ StringHolder addressSH = new StringHolder();
+ CheckVatPortTypeProxy service = new CheckVatPortTypeProxy();
+ try {
+ service.checkVat(countryCodeSH, vatNumberSH, requestDateSH, validSH, nameSH, addressSH);
+ setAddress(addressSH.value);
+ setName(nameSH.value);
+ setValid(validSH.value);
+ setRequestDate(new Date(requestDateSH.value.getTime()));
+ setCountryCode(countryCode);
+ setVatNumber(vatNumber);
+ } catch (Exception e) {}
+ }
+
+ public String getName() {
+ return (this.name == null) ? "" : this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getAddress() {
+ return (this.address == null) ? "" : this.address.trim();
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getVatNumber() {
+ return (this.vatNumber == null) ? "" : this.vatNumber;
+ }
+
+ public void setVatNumber(String vatNumber) {
+ this.vatNumber = vatNumber;
+ }
+
+ public String getCountryCode() {
+ return (this.countryCode == null) ? "" : this.countryCode;
+ }
+
+ public void setCountryCode(String countryCode) {
+ this.countryCode = countryCode;
+ }
+
+ public Date getRequestDate() {
+ return this.requestDate;
+ }
+
+ public void setRequestDate(Date requestDate) {
+ this.requestDate = requestDate;
+ }
+
+ public boolean getValid() {
+ return this.valid;
+ }
+
+ public void setValid(boolean valid) {
+ this.valid = valid;
+ }
+}
diff --git a/decompiled-libs/www/acxent-checkvat-1.0.0/types/checkVat/services/vies/taxud/eu/europa/ec/MatchCode.java b/decompiled-libs/www/acxent-checkvat-1.0.0/types/checkVat/services/vies/taxud/eu/europa/ec/MatchCode.java
new file mode 100644
index 00000000..fd8c1a5a
--- /dev/null
+++ b/decompiled-libs/www/acxent-checkvat-1.0.0/types/checkVat/services/vies/taxud/eu/europa/ec/MatchCode.java
@@ -0,0 +1,80 @@
+package types.checkVat.services.vies.taxud.eu.europa.ec;
+
+import java.io.ObjectStreamException;
+import java.io.Serializable;
+import java.util.HashMap;
+import javax.xml.namespace.QName;
+import org.apache.axis.description.TypeDesc;
+import org.apache.axis.encoding.Deserializer;
+import org.apache.axis.encoding.Serializer;
+import org.apache.axis.encoding.ser.EnumDeserializer;
+import org.apache.axis.encoding.ser.EnumSerializer;
+
+public class MatchCode implements Serializable {
+ private String _value_;
+
+ private static HashMap _table_ = new HashMap();
+
+ public static final String _value1 = "1";
+
+ public static final String _value2 = "2";
+
+ protected MatchCode(String value) {
+ this._value_ = value;
+ _table_.put(this._value_, this);
+ }
+
+ public static final MatchCode value1 = new MatchCode("1");
+
+ public static final MatchCode value2 = new MatchCode("2");
+
+ public String getValue() {
+ return this._value_;
+ }
+
+ public static MatchCode fromValue(String value) throws IllegalArgumentException {
+ MatchCode enumeration = (MatchCode)
+ _table_.get(value);
+ if (enumeration == null)
+ throw new IllegalArgumentException();
+ return enumeration;
+ }
+
+ public static MatchCode fromString(String value) throws IllegalArgumentException {
+ return fromValue(value);
+ }
+
+ public boolean equals(Object obj) {
+ return (obj == this);
+ }
+
+ public int hashCode() {
+ return toString().hashCode();
+ }
+
+ public String toString() {
+ return this._value_;
+ }
+
+ public Object readResolve() throws ObjectStreamException {
+ return fromValue(this._value_);
+ }
+
+ public static Serializer getSerializer(String mechType, Class _javaType, QName _xmlType) {
+ return new EnumSerializer(_javaType, _xmlType);
+ }
+
+ public static Deserializer getDeserializer(String mechType, Class _javaType, QName _xmlType) {
+ return new EnumDeserializer(_javaType, _xmlType);
+ }
+
+ private static TypeDesc typeDesc = new TypeDesc(MatchCode.class);
+
+ static {
+ typeDesc.setXmlType(new QName("urn:ec.europa.eu:taxud:vies:services:checkVat:types", "matchCode"));
+ }
+
+ public static TypeDesc getTypeDesc() {
+ return typeDesc;
+ }
+}
diff --git a/decompiled-libs/www/acxent-checkvat-1.0.0/types/checkVat/services/vies/taxud/eu/europa/ec/holders/MatchCodeHolder.java b/decompiled-libs/www/acxent-checkvat-1.0.0/types/checkVat/services/vies/taxud/eu/europa/ec/holders/MatchCodeHolder.java
new file mode 100644
index 00000000..67a412a0
--- /dev/null
+++ b/decompiled-libs/www/acxent-checkvat-1.0.0/types/checkVat/services/vies/taxud/eu/europa/ec/holders/MatchCodeHolder.java
@@ -0,0 +1,14 @@
+package types.checkVat.services.vies.taxud.eu.europa.ec.holders;
+
+import javax.xml.rpc.holders.Holder;
+import types.checkVat.services.vies.taxud.eu.europa.ec.MatchCode;
+
+public final class MatchCodeHolder implements Holder {
+ public MatchCode value;
+
+ public MatchCodeHolder() {}
+
+ public MatchCodeHolder(MatchCode value) {
+ this.value = value;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/AggAbiCab.java b/decompiled-libs/www/acxent-common-1.0.1/AggAbiCab.java
new file mode 100644
index 00000000..0efbd643
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/AggAbiCab.java
@@ -0,0 +1,32 @@
+import it.acxent.anag.AbiCab;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.ResParm;
+import it.acxent.util.DbConsole;
+
+public class AggAbiCab extends DbConsole {
+ public static void main(String[] args) {
+ AggAbiCab bean = new AggAbiCab();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "ctexpress";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ ResParm rp = new AbiCab(apTarget).importAbiCab("/Users/acolzi/Downloads/banche.csv");
+ System.out.println(rp.getMsg());
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/AggDocFiglio.java b/decompiled-libs/www/acxent-common-1.0.1/AggDocFiglio.java
new file mode 100644
index 00000000..af3f66a3
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/AggDocFiglio.java
@@ -0,0 +1,50 @@
+import it.acxent.contab.Documento;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+
+public class AggDocFiglio extends DbConsole {
+ public static void main(String[] args) {
+ AggDocFiglio bean = new AggDocFiglio();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "guidoreni";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ System.out.println("calcolo tot record....");
+ Vectumerator vec = new Documento(apTarget).findAll();
+ System.out.println("Tot Record: " + vec.getTotNumberOfRecords());
+ int updRec = 0;
+ while (vec.hasMoreElements()) {
+ Documento row = (Documento)vec.nextElement();
+ if (row.getId_documentoFiglio() != 0L)
+ updRec++;
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println("" + i + " " + i);
+ }
+ System.out.println("--- fine ---");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/AggiornaMagMovimento.java b/decompiled-libs/www/acxent-common-1.0.1/AggiornaMagMovimento.java
new file mode 100644
index 00000000..1de0d011
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/AggiornaMagMovimento.java
@@ -0,0 +1,189 @@
+import it.acxent.anag.MagFisico;
+import it.acxent.art.Articolo;
+import it.acxent.art.ArticoloCR;
+import it.acxent.art.ArticoloVariante;
+import it.acxent.contab.Movimento;
+import it.acxent.contab.RigaDocumento;
+import it.acxent.contab.RigaDocumentoP;
+import it.acxent.contab.RigaDocumentoPCR;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.ResParm;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Timestamp;
+import java.util.Calendar;
+
+public class AggiornaMagMovimento extends DbConsole {
+ public static void main(String[] args) {
+ AggiornaMagMovimento bean = new AggiornaMagMovimento();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ int i = 0, j = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String db = "guidoreni";
+ boolean step1 = true, step2 = true, step3 = true, step4 = true, step5 = true;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 60));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ long l_id_articolo = 0L;
+ ResParm rp = new ResParm(true);
+ int pagerow = 1000;
+ Timestamp start = new Timestamp(Calendar.getInstance().getTimeInMillis());
+ System.out.println("START: " + start.toString());
+ if (step1) {
+ System.out.println("Delete All Movimento");
+ Movimento mov = new Movimento(apTarget);
+ String sqlDeleteMov = "delete from MOVIMENTO ";
+ if (l_id_articolo > 0L)
+ sqlDeleteMov = sqlDeleteMov + " where id_articolo=" + sqlDeleteMov;
+ mov.delete(sqlDeleteMov);
+ i = 0;
+ System.out.println("Import All Movimento");
+ RigaDocumento rd = new RigaDocumento(apTarget);
+ long tot = rd.findAllPerRiordinoMagazzinoTot(l_id_articolo);
+ System.out.println("tot record: " + tot);
+ while ((long)j < tot / (long)pagerow + 1L) {
+ j++;
+ Vectumerator vec = rd.findAllPerRiordinoMagazzino(l_id_articolo, j, pagerow);
+ while (vec.hasMoreElements()) {
+ rd = (RigaDocumento)vec.nextElement();
+ rp = RigaDocumento.aggiornaMovimento(rd);
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println(i);
+ }
+ System.out.print("Tot: " + tot + " - Pag: " + j + " - Pag. Lette: " + j * pagerow);
+ }
+ }
+ Timestamp stop = new Timestamp(Calendar.getInstance().getTimeInMillis());
+ System.out.println("start 2: " + stop.toString());
+ if (step2) {
+ i = 0;
+ j = 0;
+ RigaDocumentoP rdp = new RigaDocumentoP(apTarget);
+ Vectumerator vec = rdp.findAll();
+ long tot = (long)vec.getTotNumberOfRecords();
+ System.out.println("Riga documento P: tot record: " + vec.getTotNumberOfRecords());
+ while ((long)j < tot / (long)pagerow + 1L) {
+ j++;
+ vec = rdp.findByCR(new RigaDocumentoPCR(), j, pagerow);
+ while (vec.hasMoreElements()) {
+ RigaDocumentoP row = (RigaDocumentoP)vec.nextElement();
+ if (row.getRigaDocumentoPrelevata().getDocumento().getTipoDocumento()
+ .getFlgTipologia() == 3L) {
+ Movimento mov = new Movimento(apTarget);
+ rp = mov.deleteP(row.getId_rigaDocumentoPrelevata());
+ mov.setId_articolo(row.getRigaDocumentoPrelevata().getId_articolo());
+ mov.setId_articoloVariante(row.getRigaDocumentoPrelevata().getId_articoloVariante());
+ mov.setId_articoloTaglia(row.getRigaDocumentoPrelevata().getId_articoloTaglia());
+ mov.setId_clifor(row.getRigaDocumentoPrelevata().getDocumento().getId_clifor());
+ MagFisico mf = new MagFisico(apTarget);
+ mf.findMagazzinoOrdinato();
+ mov.setId_magFisico(mf.getId_magFisico());
+ mov.setId_rigaDocumento(row.getId_rigaDocumento());
+ mov.setNr(-1.0D * row.getQuantitaPrelevata());
+ rp = mov.save();
+ } else {
+ System.out.println("!!! " + row.getRigaDocumentoPrelevata().getDocumento().getNumeroDocumentoCompleto());
+ row.superDelete();
+ }
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println(i);
+ }
+ }
+ }
+ stop = new Timestamp(Calendar.getInstance().getTimeInMillis());
+ System.out.println("start 3: " + stop.toString());
+ if (step3) {
+ i = 0;
+ j = 0;
+ Articolo art = new Articolo(apTarget);
+ ArticoloCR CR = new ArticoloCR();
+ CR.setFlgQta(1L);
+ CR.setQtaDa(1L);
+ CR.setQtaA(99999999L);
+ Vectumerator vec = art.findByCR(CR, 0, 0);
+ long tot = (long)vec.getTotNumberOfRecords();
+ Movimento mov = new Movimento(apTarget);
+ System.out.println("Articolio: tot record: " + vec.getTotNumberOfRecords());
+ while (vec.hasMoreElements()) {
+ Articolo row = (Articolo)vec.nextElement();
+ System.out.println(row.getNome());
+ if (row.getFlgUsaVarianti() == 1L) {
+ ArticoloVariante av = new ArticoloVariante(apTarget);
+ Vectumerator vecAv = av.findById_articolo(row.getId_articolo(), 0, 0, -1L, -1L);
+ while (vecAv.hasMoreElements()) {
+ ArticoloVariante rowAV = (ArticoloVariante)vecAv.nextElement();
+ Movimento.aggiornaDispo(apTarget, rowAV.getId_articolo(), rowAV.getId_articoloVariante(), 0L, 1L);
+ }
+ } else {
+ Movimento.aggiornaDispo(apTarget, row.getId_articolo(), 0L, 0L, 1L);
+ }
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println(i);
+ }
+ }
+ stop = new Timestamp(Calendar.getInstance().getTimeInMillis());
+ System.out.println("start 4: " + stop.toString());
+ if (step4) {
+ i = 0;
+ j = 0;
+ RigaDocumento rd = new RigaDocumento(apTarget);
+ Vectumerator vec = rd.findRigheDocumentoPrelevateDaStornare();
+ long tot = (long)vec.getTotNumberOfRecords();
+ Movimento mov = new Movimento(apTarget);
+ System.out.println("Righe documento ordine da stornare: tot record: " + vec.getTotNumberOfRecords());
+ while (vec.hasMoreElements()) {
+ RigaDocumento row = (RigaDocumento)vec.nextElement();
+ row.aggiornaMovimentoPareggioRigaPrelevata();
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println(i);
+ }
+ }
+ if (step5) {
+ i = 0;
+ j = 0;
+ RigaDocumento rd = new RigaDocumento(apTarget);
+ Vectumerator vec = rd.findRigheDocumentoPrelevateDaStornare();
+ long tot = (long)vec.getTotNumberOfRecords();
+ Movimento mov = new Movimento(apTarget);
+ System.out.println("Righe documento ordine da stornare: tot record: " + vec.getTotNumberOfRecords());
+ while (vec.hasMoreElements()) {
+ RigaDocumento row = (RigaDocumento)vec.nextElement();
+ row.aggiornaMovimentoPareggioRigaPrelevata();
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println(i);
+ }
+ }
+ stop = new Timestamp(Calendar.getInstance().getTimeInMillis());
+ System.out.println("STOP: " + start.toString());
+ System.out.println("DURATA: " + (double)(stop.getTime() - start.getTime()) / 60000.0D + " minuti");
+ System.out.println("Fine");
+ System.out.println(rp.getMsg());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/AggiornaMagRigaDocumento.java b/decompiled-libs/www/acxent-common-1.0.1/AggiornaMagRigaDocumento.java
new file mode 100644
index 00000000..ae727780
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/AggiornaMagRigaDocumento.java
@@ -0,0 +1,69 @@
+import it.acxent.contab.Documento;
+import it.acxent.contab.RigaDocumento;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.ResParm;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Timestamp;
+import java.util.Calendar;
+
+public class AggiornaMagRigaDocumento extends DbConsole {
+ public static void main(String[] args) {
+ AggiornaMagRigaDocumento bean = new AggiornaMagRigaDocumento();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ int i = 0, j = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String db = "ravinale";
+ boolean step1 = true, step2 = true, step3 = true, step4 = true, step5 = true;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 60));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ long l_id_articolo = 0L;
+ ResParm rp = new ResParm(true);
+ int pagerow = 1000;
+ Timestamp start = new Timestamp(Calendar.getInstance().getTimeInMillis());
+ System.out.println("START: " + start.toString());
+ if (step1) {
+ i = 0;
+ System.out.println("Import All Movimento");
+ RigaDocumento rd = new RigaDocumento(apTarget);
+ Vectumerator vec = rd.findByDocumento(51L, -1L, "", 0, 0, 0);
+ Documento documento = new Documento(apTarget);
+ documento.findByPrimaryKey(51L);
+ System.out.println("tot record: " + vec.getTotNumberOfRecords());
+ while (vec.hasMoreElements()) {
+ rd = (RigaDocumento)vec.nextElement();
+ System.out.println(rd.getArticoloVariante().getCodiceVariante() + " " + rd.getArticoloVariante().getCodiceVariante() + " " + rd.getArticoloVariante().getQuantitaEffettivaAv());
+ if (rd.getArticoloVariante().getQuantitaEffettivaAv() == 0.0D) {
+ rp = Documento.addRigaDocumento(documento, rd);
+ if (rd.getArticoloVariante().getQuantitaEffettivaAv() == 0.0D)
+ System.out.println("" +
+ rd.getArticoloVariante().getQuantitaEffettivaAv() + " " + rd.getArticoloVariante().getQuantitaEffettivaAv());
+ }
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println(i);
+ }
+ }
+ Timestamp stop = new Timestamp(Calendar.getInstance().getTimeInMillis());
+ stop = new Timestamp(Calendar.getInstance().getTimeInMillis());
+ System.out.println("STOP: " + start.toString());
+ System.out.println("DURATA: " + (double)(stop.getTime() - start.getTime()) / 60000.0D + " minuti");
+ System.out.println("Fine");
+ System.out.println(rp.getMsg());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/AggiornaRDMOV.java b/decompiled-libs/www/acxent-common-1.0.1/AggiornaRDMOV.java
new file mode 100644
index 00000000..48c2ae5d
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/AggiornaRDMOV.java
@@ -0,0 +1,77 @@
+import it.acxent.contab.RigaDocumento;
+import it.acxent.contab.RigaDocumentoCR;
+import it.acxent.contab.RigaDocumentoP;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.ResParm;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Timestamp;
+import java.util.Calendar;
+
+public class AggiornaRDMOV extends DbConsole {
+ public static void main(String[] args) {
+ AggiornaRDMOV bean = new AggiornaRDMOV();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ int i = 0, j = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String db = "guidoreni14";
+ boolean step1 = false, step2 = true, step3 = true, step4 = true, step5 = true;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 60));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ long l_id_articolo = 0L;
+ ResParm rp = new ResParm(true);
+ int pagerow = 1000;
+ Timestamp start = new Timestamp(Calendar.getInstance().getTimeInMillis());
+ System.out.println("START: " + start.toString());
+ if (step1) {
+ System.out.println("CICLO RIGA DOCUMENTO");
+ i = 0;
+ RigaDocumento rd = new RigaDocumento(apTarget);
+ RigaDocumentoCR CR = new RigaDocumentoCR(apTarget);
+ int nrighe = 100000;
+ int recordCancellati = 0;
+ int npag = 1;
+ Vectumerator vec;
+ while ((vec = rd.findByCR(CR, npag, nrighe)).hasMoreElements()) {
+ npag++;
+ while (vec.hasMoreElements()) {
+ RigaDocumento row = (RigaDocumento)vec.nextElement();
+ rp = row.saveMagSuRIgaDocumento();
+ if (!rp.getStatus())
+ System.out.println(rp.getMsg());
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println("" + i + " PAG. " + i + " / " + npag);
+ }
+ }
+ }
+ Timestamp stop = new Timestamp(Calendar.getInstance().getTimeInMillis());
+ System.out.println("STOP: " + start.toString());
+ System.out.println("DURATA: " + (double)(stop.getTime() - start.getTime()) / 60000.0D + " minuti");
+ start = stop;
+ if (step2) {
+ RigaDocumentoP rdp = new RigaDocumentoP(apTarget);
+ rdp.aggiustaOrdiniSuRD();
+ }
+ stop = new Timestamp(Calendar.getInstance().getTimeInMillis());
+ System.out.println("STOP: " + start.toString());
+ System.out.println("DURATA: " + (double)(stop.getTime() - start.getTime()) / 60000.0D + " minuti");
+ System.out.println("Fine");
+ System.out.println(rp.getMsg());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/AggiustaArticoloUsato.java b/decompiled-libs/www/acxent-common-1.0.1/AggiustaArticoloUsato.java
new file mode 100644
index 00000000..0607276f
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/AggiustaArticoloUsato.java
@@ -0,0 +1,108 @@
+import it.acxent.art.Articolo;
+import it.acxent.art.ArticoloCR;
+import it.acxent.art.ArticoloUsato;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class AggiustaArticoloUsato extends DbConsole {
+ public static void main(String[] args) {
+ AggiustaArticoloUsato bean = new AggiustaArticoloUsato();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "tf19";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ Articolo bean = new Articolo(apTarget);
+ System.out.println("ciclo articoli");
+ ArticoloCR CR = new ArticoloCR();
+ CR.setFlgOrderBy(1L);
+ CR.setFlgUsato(99L);
+ CR.setFlgEscludiWeb(-1L);
+ long currentidAU = 0L;
+ Vectumerator vec = bean.findByCR(CR, 0, 0);
+ ArticoloUsato au = new ArticoloUsato(apTarget);
+ System.out.println("Tot Record: " + vec.getTotNumberOfRecords());
+ boolean daInvertire = false;
+ while (vec.hasMoreElements()) {
+ Articolo row = (Articolo)vec.nextElement();
+ Vectumerator vecAU = au.findByArticoloOrdineManuale(row.getId_articolo());
+ currentidAU = 0L;
+ daInvertire = false;
+ while (vecAU.hasMoreElements()) {
+ ArticoloUsato rowAU = (ArticoloUsato)vecAU.nextElement();
+ if (rowAU.getId_articoloUsato() > currentidAU) {
+ currentidAU = rowAU.getId_articoloUsato();
+ continue;
+ }
+ System.out.println("DA INVERTIRE articolo: " + row.getId_articolo() + " " + row.getCodice());
+ daInvertire = true;
+ break;
+ }
+ if (daInvertire) {
+ vecAU.moveFirst();
+ while (vecAU.hasMoreElements()) {
+ ArticoloUsato rowAU2 = (ArticoloUsato)vecAU.nextElement();
+ ArticoloUsato rowNew = new ArticoloUsato(apTarget);
+ rowNew.findByPrimaryKey(rowAU2.getId_articoloUsato());
+ rowNew.setDBState(0);
+ rowNew.setId_articoloUsato(0L);
+ rowNew.save();
+ rowAU2.delete();
+ }
+ }
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println("" + i + " / " + i);
+ }
+ System.out.println("fine ciclo \n" + msg.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/ArrotondaArticoli.java b/decompiled-libs/www/acxent-common-1.0.1/ArrotondaArticoli.java
new file mode 100644
index 00000000..43e6a38d
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/ArrotondaArticoli.java
@@ -0,0 +1,80 @@
+import it.acxent.art.Articolo;
+import it.acxent.art.ArticoloCR;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class ArrotondaArticoli extends DbConsole {
+ public static void main(String[] args) {
+ ArrotondaArticoli bean = new ArrotondaArticoli();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "guidoreni";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ Articolo bean = new Articolo(apTarget);
+ ArticoloCR CR = new ArticoloCR();
+ CR.setId_iva((long)bean.getParm("CODICE_IVA_STD_VEND").getNumeroInt());
+ Vectumerator vec = bean.findByCR(CR, 0, 0);
+ System.out.println("ciclo articoli");
+ System.out.println("Tot Record: " + vec.getTotNumberOfRecords());
+ while (vec.hasMoreElements()) {
+ Articolo row = (Articolo)vec.nextElement();
+ row.arrotondaPrezzoPubblicoConIva();
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println(i);
+ }
+ System.out.println("fine ciclo \n" + msg.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(
+ st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(
+ st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/ArticoliPulisciImmagini.java b/decompiled-libs/www/acxent-common-1.0.1/ArticoliPulisciImmagini.java
new file mode 100644
index 00000000..370c0964
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/ArticoliPulisciImmagini.java
@@ -0,0 +1,78 @@
+import it.acxent.art.Articolo;
+import it.acxent.art.ArticoloCR;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class ArticoliPulisciImmagini extends DbConsole {
+ public static void main(String[] args) {
+ ArticoliPulisciImmagini bean = new ArticoliPulisciImmagini();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "tf19xxxxxx";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ Articolo bean = new Articolo(apTarget);
+ System.out.println("ciclo articoli");
+ ArticoloCR CR = new ArticoloCR();
+ CR.setFlgEscludiWeb(0L);
+ Vectumerator vec = bean.findByCR(CR, 0, 0);
+ System.out.println("Tot Record: " + vec.getTotNumberOfRecords());
+ while (vec.hasMoreElements()) {
+ Articolo row = (Articolo)vec.nextElement();
+ row.deleteImmaginiSporche();
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println("" + i + " / " + i);
+ }
+ System.out.println("fine ciclo \n" + msg.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/ArticoliSistemaCodiciAlternativi.java b/decompiled-libs/www/acxent-common-1.0.1/ArticoliSistemaCodiciAlternativi.java
new file mode 100644
index 00000000..1790c76e
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/ArticoliSistemaCodiciAlternativi.java
@@ -0,0 +1,85 @@
+import it.acxent.art.Articolo;
+import it.acxent.art.ArticoloCR;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.ResParm;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class ArticoliSistemaCodiciAlternativi extends DbConsole {
+ public static void main(String[] args) {
+ ArticoliSistemaCodiciAlternativi bean = new ArticoliSistemaCodiciAlternativi();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "cc";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ Articolo bean = new Articolo(apTarget);
+ ArticoloCR CR = new ArticoloCR();
+ Vectumerator vec = bean.findByCR(CR, 0, 0);
+ System.out.println("ciclo articoli sistema codici alternativi");
+ System.out.println("Tot Record: " + vec.getTotNumberOfRecords());
+ while (vec.hasMoreElements()) {
+ Articolo row = (Articolo)vec.nextElement();
+ String codiciAltDB = row.getCodiciAlternativi();
+ row.aggiornaCodiciAlternativi(true);
+ if (!codiciAltDB.equals(row.getCodiciAlternativi()))
+ System.out.println("\n" + row.getCodice() + " " + codiciAltDB + " --> " + row.getCodiciAlternativi());
+ if (row.getCodiciAlternativi().isEmpty()) {
+ ResParm rp = row.delete();
+ System.out.println("\n" + row.getCodice() + " cancellato: " + rp.getStatus());
+ }
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println("" + i + "/" + i);
+ }
+ System.out.println("fine ciclo \n" + msg.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/ArticoliTipoAcc.java b/decompiled-libs/www/acxent-common-1.0.1/ArticoliTipoAcc.java
new file mode 100644
index 00000000..338179f5
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/ArticoliTipoAcc.java
@@ -0,0 +1,91 @@
+import it.acxent.art.Articolo;
+import it.acxent.art.ArticoloCR;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class ArticoliTipoAcc extends DbConsole {
+ public static void main(String[] args) {
+ ArticoliTipoAcc bean = new ArticoliTipoAcc();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "guidoreni";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ long l_id_tipoAcc = 196L;
+ long l_id_tipoAccOrig = 214L;
+ long l_id_tipoAccCompat = 229L;
+ temp = getCi().readLine("id_tipo accessorio root (" + l_id_tipoAcc + "):");
+ if (!temp.isEmpty())
+ l_id_tipoAcc = Long.valueOf(temp);
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ Articolo bean = new Articolo(apTarget);
+ System.out.println("ciclo articoli");
+ ArticoloCR CR = new ArticoloCR(apTarget);
+ CR.setId_tipo(l_id_tipoAcc);
+ Vectumerator vec = bean.findByCR(CR, 0, 0);
+ System.out.println("Tot Record: " + vec.getTotNumberOfRecords());
+ while (vec.hasMoreElements()) {
+ Articolo row = (Articolo)vec.nextElement();
+ if (row.getTipo().getId_tipoPadre() == l_id_tipoAccCompat) {
+ row.setId_tipoAccessorio(2L);
+ } else {
+ row.setId_tipoAccessorio(5L);
+ }
+ row.save();
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println(i);
+ }
+ System.out.println("fine ciclo \n" + msg.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(
+ st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(
+ st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/ArticoliUnisciEan.java b/decompiled-libs/www/acxent-common-1.0.1/ArticoliUnisciEan.java
new file mode 100644
index 00000000..d89136a5
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/ArticoliUnisciEan.java
@@ -0,0 +1,64 @@
+import it.acxent.art.Articolo;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class ArticoliUnisciEan extends DbConsole {
+ public static void main(String[] args) {
+ ArticoliUnisciEan bean = new ArticoliUnisciEan();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "cc";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ Articolo bean = new Articolo(apTarget);
+ System.out.println("ciclo articoli");
+ bean.unisciArticoliByCodiceEan();
+ System.out.println("fine ciclo \n" + msg.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/CCArticoliEAN.java b/decompiled-libs/www/acxent-common-1.0.1/CCArticoliEAN.java
new file mode 100644
index 00000000..a3726a3c
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/CCArticoliEAN.java
@@ -0,0 +1,142 @@
+import it.acxent.art.Articolo;
+import it.acxent.art.ArticoloCR;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.ResParm;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class CCArticoliEAN extends DbConsole {
+ public static void main(String[] args) {
+ CCArticoliEAN bean = new CCArticoliEAN();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "ccxx";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ Articolo bean = new Articolo(apTarget);
+ System.out.println("ciclo articoli con ean duplicati... li cancello.....");
+ String idArticoli = "82982,82864,82860,82865,82984,82985,82988,82987,82989,82990,82991,82994,82995,82577,82997,82998,83000,83002,82571,83004,82573,83005,83006,82666,83007,82675,83008,83009,83010,83011,83012,83013,83014,83015,83016,83017,83020,82674,83022,83023,83025,83026,83027,83028,83029,83030,83032,83033,83034,83037,83038,83039,83040,83041,83042,83043,83045,82603,83046,83047,83048,82678,83049,83050,83051,83052,83053,82673,83054,83056,83057,83058,83059,83060,83061,83064,83065,83066,83068,83070,83071,83072,83073,83074,83088,83091,84673,83094,83095,83096,83097,83098,82602,83099,83100,83364,83101,82830,85396,82833,82836,82828,85400,83104,83105,83106,85395,85401,85391,85388,83112,83114,83115,84828,84829,84832,82641,83131,82834,83133";
+ StringTokenizer st = new StringTokenizer(idArticoli, ",");
+ long noEs = 0L, escg = 0L;
+ StringBuilder s_noEs = new StringBuilder();
+ StringBuilder s_escg = new StringBuilder();
+ StringBuilder s_ebay = new StringBuilder();
+ Articolo row = new Articolo(apTarget);
+ Articolo art = new Articolo(apTarget);
+ ArticoloCR CR = new ArticoloCR(apTarget);
+ while (st.hasMoreTokens()) {
+ long l_id_articolo = Long.parseLong(st.nextToken());
+ row.findByPrimaryKey(l_id_articolo);
+ if (row.getId_articolo() > 0L)
+ if (row.getCodiciAlternativi().indexOf("ES_") >= 0) {
+ if (row.getCodiciAlternativi().indexOf("CG_") >= 0) {
+ System.out.println("da cancellare ma sie esprinet che cgross... controllare: flgvis:" +
+ row.getFlgEscludiWeb() + " " + row.getCodice());
+ escg++;
+ s_escg.append(row.getId_articolo());
+ s_escg.append(",");
+ if (!row.getCodiceEan().isEmpty()) {
+ CR.setCodiceEan(row.getCodiceEan());
+ Vectumerator vect = art.findByCR(CR, 0, 0);
+ while (vect.hasMoreElements()) {
+ Articolo articolo = (Articolo)vect.nextElement();
+ if (articolo.getFlgEscludiWeb() > 0L)
+ articolo.delete();
+ }
+ }
+ } else if (row.isEbayPubblicato()) {
+ System.out.println("da cancellare ma su ebay......");
+ s_ebay.append(row.getId_articolo());
+ s_ebay.append(",");
+ } else {
+ System.out.println("Cancello: flgvis:" + row.getFlgEscludiWeb() + " " + row.getCodice());
+ row.delete();
+ }
+ } else {
+ noEs++;
+ s_noEs.append(row.getId_articolo());
+ s_noEs.append(",");
+ if (!row.getCodiceEan().isEmpty()) {
+ CR.setCodiceEan(row.getCodiceEan());
+ Vectumerator vect = art.findByCR(CR, 0, 0);
+ while (vect.hasMoreElements()) {
+ Articolo articolo = (Articolo)vect.nextElement();
+ if (articolo.getFlgEscludiWeb() > 0L) {
+ articolo.delete();
+ System.out.println("*");
+ continue;
+ }
+ if (articolo.getCodiciAlternativi().indexOf("ES_") >= 0) {
+ if (row.isEbayPubblicato()) {
+ System.out.println("no es .. trovato es su ebay......");
+ s_ebay.append(row.getId_articolo());
+ s_ebay.append(",");
+ continue;
+ }
+ System.out.println("*X " + articolo.getCodice());
+ ResParm rp = articolo.delete();
+ if (!rp.getStatus())
+ System.out.println("ERR " + rp.getMsg());
+ }
+ }
+ }
+ }
+ row.save();
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println(i);
+ }
+ System.out.println("\n-----" + noEs + " no esprinet:\n" + s_noEs.toString());
+ System.out.println("\n-----" + escg + " es+cg:\n" + s_escg.toString());
+ System.out.println("\n-----ebay:\n" + s_ebay.toString());
+ System.out.println("fine ciclo \n" + msg.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/CancellaArticoliNonTrovati.java b/decompiled-libs/www/acxent-common-1.0.1/CancellaArticoliNonTrovati.java
new file mode 100644
index 00000000..22cc5331
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/CancellaArticoliNonTrovati.java
@@ -0,0 +1,68 @@
+import it.acxent.art.Articolo;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class CancellaArticoliNonTrovati extends DbConsole {
+ public static void main(String[] args) {
+ CancellaArticoliNonTrovati bean = new CancellaArticoliNonTrovati();
+ long numArtNonTrovati = 30L;
+ if (args.length >= 1)
+ numArtNonTrovati = (long)Long.valueOf(args[0]).intValue();
+ System.out.println(numArtNonTrovati);
+ bean.doImport(numArtNonTrovati);
+ System.exit(0);
+ }
+
+ public void doImport(long numArtNonTrovati) {
+ String db = "cc";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ Articolo bean = new Articolo(apTarget);
+ System.out.println("ciclo articoli");
+ bean.cancellaArticoliVecchiCC(numArtNonTrovati);
+ System.out.println("fine ciclo \n" + msg.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/ClearImgArt.java b/decompiled-libs/www/acxent-common-1.0.1/ClearImgArt.java
new file mode 100644
index 00000000..a3d05391
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/ClearImgArt.java
@@ -0,0 +1,54 @@
+import it.acxent.art.Articolo;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.ResParm;
+import it.acxent.util.DbConsole;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class ClearImgArt extends DbConsole {
+ public static void main(String[] args) {
+ ClearImgArt bean = new ClearImgArt();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "cc";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, null, "root", "root", 1, 10, 300));
+ ApplParmFull apTarget8 = new ApplParmFull(new ApplParm(17, "//" + hostname + ":3308/" + db, null, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ Articolo bean = new Articolo(apTarget);
+ ResParm rp = Articolo.clearImg(bean);
+ System.out.println(rp.getMsg());
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/CrontabDbcomune.java b/decompiled-libs/www/acxent-common-1.0.1/CrontabDbcomune.java
new file mode 100644
index 00000000..52896670
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/CrontabDbcomune.java
@@ -0,0 +1,31 @@
+import it.acxent.common.CrontabInterface;
+import it.acxent.common.Parm;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+
+public class CrontabDbcomune implements CrontabInterface {
+ public ResParm crontabJob(ApplParmFull ap) {
+ ResParm rp = new ResParm(true);
+ StringBuffer msg = new StringBuffer("\n################# Inizio crontab Giornaliera ACXENTDBCOMUNE (" +
+ DBAdapter.getNow().toString() + ")\n#################");
+ long t0 = System.currentTimeMillis();
+ Parm parm = new Parm(ap);
+ rp = parm.svuotaCartellaTmp();
+ msg.append(rp.getMsg());
+ msg.append("\n################# Fine crontab Giornaliera ACXENTDBCOMUNE (" + DBAdapter.getNow().toString() + ")\n#################");
+ long tn = System.currentTimeMillis();
+ long duration = (tn - t0) / 60000L;
+ msg.append("Durata aggiornamento: " + duration + " minuti.");
+ rp.setMsg(msg.toString());
+ return rp;
+ }
+
+ public static void main(String[] args) {
+ ApplParm ap = new ApplParm(3, "//localhost/coavedb2", "root", "root");
+ ResParm rp = new CrontabDbcomune().crontabJob(new ApplParmFull(ap));
+ System.out.println(rp.getMsg());
+ System.exit(0);
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/DelArticoliEan14.java b/decompiled-libs/www/acxent-common-1.0.1/DelArticoliEan14.java
new file mode 100644
index 00000000..19b276e3
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/DelArticoliEan14.java
@@ -0,0 +1,78 @@
+import it.acxent.art.Articolo;
+import it.acxent.art.ArticoloCR;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class DelArticoliEan14 extends DbConsole {
+ public static void main(String[] args) {
+ DelArticoliEan14 bean = new DelArticoliEan14();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "cc";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ Articolo bean = new Articolo(apTarget);
+ System.out.println("ciclo articoli");
+ ArticoloCR CR = new ArticoloCR();
+ CR.setFlgEscludiWeb(0L);
+ Vectumerator vec = bean.findArticoliEan14();
+ System.out.println("Tot Record: " + vec.getTotNumberOfRecords());
+ while (vec.hasMoreElements()) {
+ Articolo row = (Articolo)vec.nextElement();
+ row.delete();
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println("" + i + " / " + i);
+ }
+ System.out.println("fine ciclo \n" + msg.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/ExportCliforCsv.java b/decompiled-libs/www/acxent-common-1.0.1/ExportCliforCsv.java
new file mode 100644
index 00000000..c224bd31
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/ExportCliforCsv.java
@@ -0,0 +1,68 @@
+import it.acxent.anag.Clifor;
+import it.acxent.anag.CliforCR;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class ExportCliforCsv extends DbConsole {
+ public static void main(String[] args) {
+ ExportCliforCsv bean = new ExportCliforCsv();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "guidoreni14";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ Clifor clifor = new Clifor(apTarget);
+ CliforCR CR = new CliforCR(apTarget);
+ CR.setFlgTipo("C");
+ System.out.println("creo csv cliente");
+ clifor.creaFileCvs(CR);
+ System.out.println("Creato file " + CR.getFileName());
+ System.out.println("creo csv fornitore");
+ CR.setFlgTipo("F");
+ clifor.creaFileCvs(CR);
+ System.out.println("Creato file " + CR.getFileName());
+ System.out.println("fine");
+ System.exit(0);
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/ImportArticoliXls.java b/decompiled-libs/www/acxent-common-1.0.1/ImportArticoliXls.java
new file mode 100644
index 00000000..efd0376b
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/ImportArticoliXls.java
@@ -0,0 +1,104 @@
+import it.acxent.anag.Iva;
+import it.acxent.anag.ListinoArticolo;
+import it.acxent.art.Articolo;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.ResParm;
+import it.acxent.util.DbConsole;
+import it.acxent.util.StringTokenizer;
+import java.io.BufferedReader;
+import java.io.FileReader;
+
+public class ImportArticoliXls extends DbConsole {
+ public static void main(String[] args) {
+ ImportArticoliXls bean = new ImportArticoliXls();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String currentLine = "";
+ String hostname = "83.149.159.155";
+ String db = "guidoreni14";
+ String fileCsv = "/Users/acolzi/Documents/_f3/work/guidoreni/importArticoliXls/4464-DT.csv";
+ boolean importArticoli = false;
+ String temp = "";
+ temp = getCi().readLine("importArticoli(" + importArticoli + "):");
+ if (!temp.isEmpty())
+ importArticoli = temp.equals("y");
+ ApplParmFull ap = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ ap.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ int numBanche = 0, numClienti = 0;
+ if (importArticoli) {
+ i = 0;
+ System.out.println("\nimportArticoli");
+ Articolo articolo = new Articolo(ap);
+ BufferedReader reader = new BufferedReader(new FileReader(fileCsv));
+ if (reader != null) {
+ int numbToken = 0;
+ int colcodice = 0, coldescrizione = 1, colid_tipo = 8, colprice = 6, colmarca = 9, coldescTecnica = 5;
+ StringBuffer currentArticolo = new StringBuffer();
+ for (int j = 0; j < 1; j++)
+ reader.readLine();
+ while ((currentLine = reader.readLine()) != null) {
+ StringTokenizer st = new StringTokenizer(currentLine, ";");
+ String codice = st.getToken(colcodice);
+ String descrizione = st.getToken(coldescrizione);
+ String id_tipo = st.getToken(colid_tipo);
+ String price = st.getToken(colprice);
+ String marca = st.getToken(colmarca);
+ String descTecnica = st.getToken(coldescTecnica);
+ articolo = new Articolo(ap);
+ articolo.findArticoloByCodice(codice);
+ if (articolo.getDBState() == 0) {
+ articolo.setCodice(codice);
+ articolo.setNome(descrizione);
+ articolo.setId_tipo(Long.valueOf(id_tipo).longValue());
+ articolo.setId_marca(Long.valueOf(marca).longValue());
+ articolo.setId_tipoAccessorio(5L);
+ articolo.setId_iva(6L);
+ articolo.setDescTxtLang("descrizione", "it", descrizione);
+ articolo.setDescTxtLang("descrizioneTecnica", "it", descTecnica);
+ ResParm rp = articolo.superSave();
+ if (rp.getStatus()) {
+ ListinoArticolo listinoArticoloBase = articolo.getListinoArticoloBase();
+ listinoArticoloBase.setId_articolo(articolo.getId_articolo());
+ listinoArticoloBase.setId_listino(articolo.getListinoBase().getId_listino());
+ listinoArticoloBase.setPrezzoLA(Iva.scorporaIva(Double.parseDouble(price.replaceAll(",", ".")), 22.0D));
+ rp = listinoArticoloBase.save();
+ } else {
+ System.out.println(rp.getMsg());
+ }
+ } else {
+ ResParm rp = new ResParm(true);
+ System.out.println(codice);
+ if (rp.getStatus()) {
+ ListinoArticolo listinoArticoloBase = articolo.getListinoArticoloBase();
+ listinoArticoloBase.setId_articolo(articolo.getId_articolo());
+ listinoArticoloBase.setId_listino(articolo.getListinoBase().getId_listino());
+ listinoArticoloBase.setPrezzoLA(Iva.scorporaIva(Double.parseDouble(price.replaceAll(",", ".")), 22.0D));
+ rp = listinoArticoloBase.save();
+ } else {
+ System.out.println(rp.getMsg());
+ }
+ }
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println("" + i + " / ");
+ }
+ }
+ System.out.println("fine ciclo \n\n\n\n\n\n\n\n\n\n\n" + msg.toString());
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.out.println(currentLine);
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/META-INF/MANIFEST.MF b/decompiled-libs/www/acxent-common-1.0.1/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..e886b975
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/META-INF/MANIFEST.MF
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+Archiver-Version: Plexus Archiver
+Created-By: Apache Maven 3.8.7
+Built-By: jenkins
+Build-Jdk: 17.0.17
+
diff --git a/decompiled-libs/www/acxent-common-1.0.1/META-INF/maven/it.acxent/acxent-common/pom.properties b/decompiled-libs/www/acxent-common-1.0.1/META-INF/maven/it.acxent/acxent-common/pom.properties
new file mode 100644
index 00000000..bed60151
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/META-INF/maven/it.acxent/acxent-common/pom.properties
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Tue Jul 08 00:00:32 CEST 2025
+artifactId=acxent-common
+groupId=it.acxent
+version=1.0.1
diff --git a/decompiled-libs/www/acxent-common-1.0.1/META-INF/maven/it.acxent/acxent-common/pom.xml b/decompiled-libs/www/acxent-common-1.0.1/META-INF/maven/it.acxent/acxent-common/pom.xml
new file mode 100644
index 00000000..6ed2e845
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/META-INF/maven/it.acxent/acxent-common/pom.xml
@@ -0,0 +1,140 @@
+
+ 4.0.0
+ it.acxent
+ acxent-common
+ 1.0.1
+ core 43
+ Acxent Common DB
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.13.0
+
+ 11
+ 11
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+ 3.7.0
+
+
+ org.apache.maven.plugins
+ maven-toolchains-plugin
+ 3.1.0
+
+
+
+ toolchain
+
+
+
+
+
+
+ 11
+
+
+
+
+
+
+
+
+ github-repo
+ GitHub Repository
+ https://maven.pkg.github.com/acolzi/repo
+
+
+
+
+
+ github-repo
+ GitHub acolzi Apache Maven Packages
+ https://maven.pkg.github.com/acolzi/repo
+
+
+
+
+ com.stripe
+ stripe-java
+ 22.29.0
+
+
+ it.acxent
+ acxent-bank
+ 1.0.1
+
+
+
+ it.acxent
+ acxent-checkvat
+ 1.0.0
+
+
+ com.google.api-client
+ google-api-client
+ 2.2.0
+
+
+ org.apache.commons
+ commons-lang3
+ 3.12.0
+
+
+ net.ifok.image
+ image4j
+ 0.7.2
+
+
+
+ it.acxent
+ ebaysdk-calls
+ 0.0.2
+
+
+ it.acxent
+ ebaysdk-core
+ 0.0.3
+
+
+
+ javax.xml.ws
+ jaxws-api
+ 2.3.1
+
+
+ com.sun.xml.ws
+ jaxws-rt
+ 2.3.3
+
+
+
+ com.google.zxing
+ core
+ 3.5.2
+
+
+ com.google.zxing
+ javase
+ 3.5.2
+
+
+
+
+ it.acxent
+ acxent-skebby
+ 1.0
+
+
+ it.acxent
+ acxent-core
+ 1.0.1
+
+
+
+
+
\ No newline at end of file
diff --git a/decompiled-libs/www/acxent-common-1.0.1/SalvaAmzFeatPrice.java b/decompiled-libs/www/acxent-common-1.0.1/SalvaAmzFeatPrice.java
new file mode 100644
index 00000000..2d9e5cad
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/SalvaAmzFeatPrice.java
@@ -0,0 +1,57 @@
+import it.acxent.art.AmzFeaturedPrice;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class SalvaAmzFeatPrice extends DbConsole {
+ public static void main(String[] args) {
+ SalvaAmzFeatPrice bean = new SalvaAmzFeatPrice();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "cc";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost:3308";
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ AmzFeaturedPrice afp = new AmzFeaturedPrice(apTarget);
+ afp.findByPrimaryKey(2L);
+ afp.save();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/SalvaArticoli.java b/decompiled-libs/www/acxent-common-1.0.1/SalvaArticoli.java
new file mode 100644
index 00000000..c3a2fa2a
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/SalvaArticoli.java
@@ -0,0 +1,81 @@
+import it.acxent.art.Articolo;
+import it.acxent.art.ArticoloCR;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class SalvaArticoli extends DbConsole {
+ public static void main(String[] args) {
+ SalvaArticoli bean = new SalvaArticoli();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "cc";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "10.0.0.5";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ Articolo bean = new Articolo(apTarget);
+ System.out.println("ciclo articoli");
+ ArticoloCR CR = new ArticoloCR();
+ CR.setId_tipo(52L);
+ Vectumerator vec = bean.findByCR(CR, 0, 0);
+ System.out.println("Tot Record: " + vec.getTotNumberOfRecords());
+ while (vec.hasMoreElements()) {
+ Articolo row = (Articolo)vec.nextElement();
+ if (row.getFlgControlloCostoAggArt() == 0L) {
+ System.out.println(row.getCodice() + " " + row.getCodice());
+ row.save();
+ }
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println("" + i + " / " + i);
+ }
+ System.out.println("fine ciclo \n" + msg.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/SalvaArticoliPerListino.java b/decompiled-libs/www/acxent-common-1.0.1/SalvaArticoliPerListino.java
new file mode 100644
index 00000000..e5723f46
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/SalvaArticoliPerListino.java
@@ -0,0 +1,88 @@
+import it.acxent.anag.Listino;
+import it.acxent.anag.ListinoArticolo;
+import it.acxent.art.Articolo;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class SalvaArticoliPerListino extends DbConsole {
+ public static void main(String[] args) {
+ SalvaArticoliPerListino bean = new SalvaArticoliPerListino();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "guidoreni";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "www.lanificiozanieri.eu";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ Articolo bean = new Articolo(apTarget);
+ System.out.println("ciclo articoli");
+ Vectumerator vec = bean.findAll();
+ Listino lis = Listino.dammiListinoBase(apTarget);
+ System.out.println("Tot Record: " + vec.getTotNumberOfRecords());
+ while (vec.hasMoreElements()) {
+ Articolo row = (Articolo)vec.nextElement();
+ ListinoArticolo la = new ListinoArticolo(apTarget);
+ la.findByArticoloListino(row.getId_articolo(), lis.getId_listino());
+ la.setId_articolo(row.getId_articolo());
+ la.setId_listino(lis.getId_listino());
+ la.setPrezzoOffertaLA(row.getImportListinoPrezzoOfferta());
+ la.setDataScadenzaOffertaLA(row.getImportListinoDataScadenzaOfferta());
+ la.setAbbuonoPrezzoPubblicoLA(row.getImportListinoAbbuonoPrezzoPubblico());
+ la.setPercLA(row.getImportListinoPercSconto());
+ la.setDataCambiamentoPrezzoLA(row.getImportListinoDataCambiamentoPrezzo());
+ la.setAbbuonoPrezzoPubblicoLA(row.getImportAbbuonoPrezzoPubblico());
+ la.save();
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println(i);
+ }
+ System.out.println("fine ciclo \n" + msg.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/SalvaArticoliVariante.java b/decompiled-libs/www/acxent-common-1.0.1/SalvaArticoliVariante.java
new file mode 100644
index 00000000..791d3a54
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/SalvaArticoliVariante.java
@@ -0,0 +1,78 @@
+import it.acxent.art.ArticoloVariante;
+import it.acxent.art.ArticoloVarianteCR;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class SalvaArticoliVariante extends DbConsole {
+ public static void main(String[] args) {
+ SalvaArticoliVariante bean = new SalvaArticoliVariante();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "ravinale";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ ArticoloVariante bean = new ArticoloVariante(apTarget);
+ System.out.println("ciclo articoli varianti");
+ ArticoloVarianteCR CR = new ArticoloVarianteCR();
+ CR.setFlgEscludiWeb(0L);
+ Vectumerator vec = bean.findByCR(CR, 0, 0);
+ System.out.println("Tot Record: " + vec.getTotNumberOfRecords());
+ while (vec.hasMoreElements()) {
+ ArticoloVariante row = (ArticoloVariante)vec.nextElement();
+ row.save();
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println(i);
+ }
+ System.out.println("fine ciclo \n" + msg.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/SalvaDtess.java b/decompiled-libs/www/acxent-common-1.0.1/SalvaDtess.java
new file mode 100644
index 00000000..27c4cd78
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/SalvaDtess.java
@@ -0,0 +1,81 @@
+import it.acxent.contab.Documento;
+import it.acxent.contab.DocumentoCR;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class SalvaDtess extends DbConsole {
+ public static void main(String[] args) {
+ SalvaDtess bean = new SalvaDtess();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "tex";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ Documento bean = new Documento(apTarget);
+ System.out.println("ciclo Documento");
+ DocumentoCR CR = new DocumentoCR();
+ CR.setId_tipoDocumento(24L);
+ Vectumerator vec = bean.findByCR(CR, 0, 0);
+ System.out.println("Tot Record: " + vec.getTotNumberOfRecords());
+ while (vec.hasMoreElements()) {
+ Documento row = (Documento)vec.nextElement();
+ System.out.print(row.getStatoLavorazione() + " ---> ");
+ row.setFlgStatoLavorazione(0L);
+ row.save();
+ System.out.println(row.getStatoLavorazione());
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println(i);
+ }
+ System.out.println("fine ciclo \n" + msg.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/SalvaTessuti.java b/decompiled-libs/www/acxent-common-1.0.1/SalvaTessuti.java
new file mode 100644
index 00000000..6aafd1a0
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/SalvaTessuti.java
@@ -0,0 +1,79 @@
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.tex.anag.ArticoloTessuto;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class SalvaTessuti extends DbConsole {
+ public static void main(String[] args) {
+ SalvaTessuti bean = new SalvaTessuti();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "tf19";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ ArticoloTessuto bean = new ArticoloTessuto(apTarget);
+ System.out.println("ciclo tessuti");
+ Vectumerator vec = bean.findAll();
+ System.out.println("Tot Record: " + vec.getTotNumberOfRecords());
+ while (vec.hasMoreElements()) {
+ ArticoloTessuto row = (ArticoloTessuto)vec.nextElement();
+ if (row.getCodiceAT().length() < 4) {
+ row.setCodiceAT(DBAdapter.zeroLeft(row.getCodiceAT(), 4));
+ row.superSave();
+ }
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println(i);
+ }
+ System.out.println("fine ciclo \n" + msg.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/SalvaTipi.java b/decompiled-libs/www/acxent-common-1.0.1/SalvaTipi.java
new file mode 100644
index 00000000..11e8a07c
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/SalvaTipi.java
@@ -0,0 +1,80 @@
+import it.acxent.art.Tipo;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.net.URLEncoder;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class SalvaTipi extends DbConsole {
+ public static void main(String[] args) {
+ SalvaTipi bean = new SalvaTipi();
+ System.out.println(URLEncoder.encode("e:/public"));
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "guidoreni";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ Tipo bean = new Tipo(apTarget);
+ bean.update("UPDATE ARTICOLO SET flgEscludiWebArt=-1");
+ System.out.println("ciclo tipi ");
+ Vectumerator vec = bean.findAll();
+ System.out.println("Tot Record: " + vec.getTotNumberOfRecords());
+ while (vec.hasMoreElements()) {
+ Tipo row = (Tipo)vec.nextElement();
+ row.save();
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println(i);
+ }
+ System.out.println("\n" + msg.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(
+ st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(
+ st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/SaveDocumento.java b/decompiled-libs/www/acxent-common-1.0.1/SaveDocumento.java
new file mode 100644
index 00000000..e999870a
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/SaveDocumento.java
@@ -0,0 +1,54 @@
+import it.acxent.contab.Documento;
+import it.acxent.contab.DocumentoCR;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Timer;
+import it.acxent.util.Vectumerator;
+
+public class SaveDocumento extends DbConsole {
+ public static void main(String[] args) {
+ SaveDocumento bean = new SaveDocumento();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "ncc";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost:3308";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(17, "//" + hostname + "/" + db, db, "root", "root", 1, 10, 300));
+ apTarget.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ DocumentoCR CR = new DocumentoCR();
+ Vectumerator vec = new Documento(apTarget).findByCR(CR, 0, 0);
+ System.out.println("TOT RECORD: " + vec.getTotNumberOfRecords());
+ Timer timer = new Timer();
+ timer.start();
+ while (vec.hasMoreElements()) {
+ Documento row = (Documento)vec.nextElement();
+ row.superSave();
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println("" + i + " /" + i + " " + vec.getTotNumberOfRecords());
+ }
+ timer.stop();
+ System.out.println(timer.getDurata());
+ System.out.println("\n\n ------------- Fine ---------------");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/TestExport.java b/decompiled-libs/www/acxent-common-1.0.1/TestExport.java
new file mode 100644
index 00000000..5e1d10e1
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/TestExport.java
@@ -0,0 +1,69 @@
+import it.acxent.common.DescTxtLang;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.ResParm;
+import it.acxent.util.DbConsole;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class TestExport extends DbConsole {
+ public static void main(String[] args) {
+ TestExport bean = new TestExport();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "guidoreni";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ String dbTarget = "gaias";
+ System.out.println("Db: " + db);
+ ApplParmFull apSource = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ apSource.setDebug(false);
+ ApplParmFull apTarget = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + dbTarget, "root", "root", 1, 10, 300));
+ apSource.setDebug(false);
+ try {
+ DescTxtLang bean = new DescTxtLang(apSource);
+ DescTxtLang beant = new DescTxtLang(apTarget);
+ ResParm rp = beant.xmlImport("/Users/acolzi/test.xml");
+ System.out.println(rp.getMsg());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(
+ st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(
+ st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/TestMysql8.java b/decompiled-libs/www/acxent-common-1.0.1/TestMysql8.java
new file mode 100644
index 00000000..b7f94151
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/TestMysql8.java
@@ -0,0 +1,78 @@
+import it.acxent.contab.Documento;
+import it.acxent.contab.DocumentoCR;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.ResParm;
+import it.acxent.util.DbConsole;
+import it.acxent.util.Vectumerator;
+import java.sql.Time;
+import java.util.StringTokenizer;
+
+public class TestMysql8 extends DbConsole {
+ public static void main(String[] args) {
+ TestMysql8 bean = new TestMysql8();
+ bean.doImport();
+ System.exit(0);
+ }
+
+ public void doImport() {
+ String db = "cc";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParmFull apTarget57 = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "cc", "root", "root", 1, 10, 300));
+ ApplParmFull apTarget8 = new ApplParmFull(new ApplParm(17, "//" + hostname + ":3308/" + db, db, "root", "root", 1, 10, 300));
+ apTarget57.setDebug(false);
+ apTarget8.setDebug(false);
+ StringBuffer msg = new StringBuffer();
+ try {
+ Documento bean = new Documento(apTarget57);
+ bean.findByPrimaryKey(2306L);
+ System.out.println(bean.getDescRecordHeader());
+ System.out.println(bean.getDescRecordLine());
+ System.out.println("" + bean.getId_documento() + " " + bean.getId_documento());
+ ResParm rp = bean.save();
+ System.out.println(rp.getMsg());
+ Vectumerator vec = bean.findByCR(new DocumentoCR(), 1, 10);
+ System.out.println(bean.getDescRecordHeader());
+ while (vec.hasMoreElements()) {
+ Documento row = (Documento)vec.nextElement();
+ System.out.println(row.getDescRecordLine());
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ protected Time getTimeFromString(String theTime) {
+ try {
+ if (theTime.matches("[0-9][0-9][0-9][0-9]"))
+ theTime = theTime.substring(0, 2) + ":" + theTime.substring(0, 2);
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ if (theTime.matches("[0-9]{1,2}+:[0-9]{1,2}+:[0-9]{1,2}+")) {
+ StringTokenizer st = new StringTokenizer(theTime, ":");
+ int hour = Integer.parseInt(st.nextToken());
+ int min = Integer.parseInt(st.nextToken());
+ int sec = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
+ return new Time((long)((hour - 1) * 3600000 + min * 60000 + sec * 1000));
+ }
+ return null;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/TestReflection.java b/decompiled-libs/www/acxent-common-1.0.1/TestReflection.java
new file mode 100644
index 00000000..5cbb9257
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/TestReflection.java
@@ -0,0 +1,95 @@
+import it.acxent.cc.Attivita;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.util.DbConsole;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.sql.Date;
+import java.sql.Time;
+
+public class TestReflection extends DbConsole {
+ public static void main(String[] args) {
+ new TestReflection().test();
+ }
+
+ private static boolean isNotEmpty(Object valueUpd, Class> tipo) {
+ boolean ret = false;
+ if (valueUpd != null) {
+ String sclass = valueUpd.getClass().getName();
+ if (sclass.indexOf("Long") > 0 || sclass.indexOf("Double") > 0 || sclass.indexOf("String") > 0 || sclass.indexOf("Date") > 0 ||
+ sclass.indexOf("Time") > 0)
+ if (tipo.getName() == "long") {
+ if ((Long)valueUpd == 0L || (Long)valueUpd == -1L) {
+ ret = false;
+ } else {
+ ret = true;
+ }
+ } else if (tipo.getName() == "double") {
+ if ((Double)valueUpd == 0.0D) {
+ ret = false;
+ } else {
+ ret = true;
+ }
+ } else if (tipo.getName().indexOf("String") > 0) {
+ if (((String)valueUpd).equals("") || ((String)valueUpd).isEmpty()) {
+ ret = false;
+ } else {
+ ret = true;
+ }
+ } else if (tipo.getName().indexOf("Date") > 0) {
+ Date data = (Date)valueUpd;
+ if (data == null) {
+ ret = false;
+ } else {
+ ret = true;
+ }
+ } else if (tipo.getName().indexOf("Time") > 0) {
+ if ((Time)valueUpd == null) {
+ ret = false;
+ } else {
+ ret = true;
+ }
+ }
+ }
+ return ret;
+ }
+
+ private static Object getFunctionName(String functionName, Class> tipo, CRAdapter thiss) {
+ Object value = null;
+ try {
+ Method method = thiss.getClass().getMethod(functionName);
+ value = method.invoke(thiss);
+ } catch (SecurityException e) {
+
+ } catch (NoSuchMethodException e) {
+
+ } catch (IllegalArgumentException e) {
+
+ } catch (IllegalAccessException e) {
+
+ } catch (InvocationTargetException e) {}
+ return value;
+ }
+
+ public void test() {
+ String db = "fotoeventi4";
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ String hostname = "localhost:3308";
+ String temp = getCi().readLine("Hostname (" + hostname + "):");
+ if (!temp.isEmpty())
+ hostname = temp;
+ temp = getCi().readLine("Database name (" + db + "):");
+ if (!temp.isEmpty())
+ db = temp;
+ System.out.println("Db: " + db);
+ ApplParm ap = new ApplParm(17, "//" + hostname + "/" + db, db, "root", "root", 1, 10, 300);
+ ApplParmFull apTarget = new ApplParmFull(ap);
+ apTarget.setDebug(false);
+ Attivita attivita = new Attivita(apTarget);
+ DBAdapter.checkSerializable(attivita);
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/com/ablia/anag/package-info.java b/decompiled-libs/www/acxent-common-1.0.1/com/ablia/anag/package-info.java
new file mode 100644
index 00000000..96c8bd47
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/com/ablia/anag/package-info.java
@@ -0,0 +1 @@
+package it.acxent.anag;
\ No newline at end of file
diff --git a/decompiled-libs/www/acxent-common-1.0.1/com/ablia/anag/versionLog.txt b/decompiled-libs/www/acxent-common-1.0.1/com/ablia/anag/versionLog.txt
new file mode 100644
index 00000000..c2fca80c
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/com/ablia/anag/versionLog.txt
@@ -0,0 +1,249 @@
+AblDBCom_2_329_1_250523
+25-05-2022 OrderedRowids e AblServlet.setOrderedIdOnSession per gesione avanti indietro per qualsiasi ricerca (SpeseDetraiviliSvlt)
+25-05-2023 8xmille + fix getAttach
+16-05-2023 face + news visibili
+25-03-2023 AMAZON... allineamento.. .manca publish
+23-02-2023 aggiunto dati scontrino felettronica. Magazzino tessuti e filati ...
+17-02-2023 fix articolo.findbycr codicialternativi senza spezzettare i token
+22-01-2023 cc
+18-11-2022 icecat, bulk update e bartolini
+14-07-2022 social login google + blacklist mailer cc
+17-06-2022 implementazione import runner.it framework cc
+02-05-2022 nazione con importo minimo per carrello + articolo con sconto troppo alto
+29-03-2022 Trovaprezzi trust program
+17-03-2022 Trovaprezzi
+15-03-2022 CartSvlt gestione listaTipoPagmaneto con personalizzazione per il cliente... CliforTipoPagamento...
+28-02-2022 registro iva OSS
+21-02-2022 report documenti e servizi (molli). salvato report righe documento che non so....
+18-02-2022 articolo... desc search adesso contiene anche le caratteristiche...
+09-02-2022 Contrassegno ravinale e gestione costo contrassegno su tipo pagamento...
+06-02-2022 Marca tagOfferta. Corretto auto offerte. aggiunto gestione promo su marca tramite tagOfferta
+04-02-2022 Articolo.getLingCcInfo(CR) per mail info.....
+29-01-2022 Salvataggio documento e riga documento con controllo emsta.Articolo gestito correttamente aggiornamento percentuale effettiva di ricarico
+19-01-2022 CC crea sitemap tramite crontab
+14-01-2022 getImportLinkFornitoreEan...
+14-11-2021 CC gestione iva cee extracee corretta (da verificare con vivarelli)
+8-07-2021 ean su variante, sconto offerta framework CC, iva regime margine, abilita articolo_fornitore su fornitore
+13-06-2021 descPayment su cart... framweork cc
+07-06-2021 gestione costo spedizione con percentile
+17-03-2021 gestione kit framework cc + invio ip e timestamp su mail framework cc
+12-02-2021 risitemato gestione lang... non ancora ottimale perché dipende ta classe jsp.Ab e da _V4/_inc_lang.jsp
+18-01-2021 cc in linea e funzionante. Ultima cosa mail da documento e bcc su mail dal sito
+27-06-2020 implemEntazione attivita cc
+15-11-2018 catalogo articolo con scelta risoluzione
+23-10-2018 aggiunto parametro per esplicitare campo codice in stampa della riga senza articolo in db (atelier). Nuovo campo codiceIdentificativoFE su clifor per fattura elettronica
+13-10-2018 stampa catalogo articoli con filtro su quantità. corretto ricerca per quantità fino a variante. da fare fino a taglie
+10-09-2018 CORRETTO CONTROLLO PROTOCOLLO DOCUMENTO
+13-09-2018 corretto getFlgUdm su riga documento
+31-07-2018 corretto taglib banner con rewriterule ad,Banner.abl,go,,@id e convertStringToLink su f3.jar
+11-05-2018 aggiunto gestione blog e corretto baco per altri file (templatemsg nonfunzionava più)
+13-12-2017 aggiunto ordinamento righe documenti in stampa e edit
+08-11-2017 duplica articolo, aggiornamenti V4
+02-10-2017 catalogo prodotti + gestione taglie!!!
+14-06-2017 aggiustato magazzino su articolo variante. reso quantitaW inutile.... da togliere???
+14-02-2017 corretto creazione scadenze. Messo vincoli se sono state generate distinte riba. MUI IMPORTANTE
+22-11-2016 listino con 3 sconti + altro atelier
+10-11-2016 corretto baco listino base
+12-10-2016 banner con w e h stringhe
+07-09-2016 nuovo listino. eseguire sql fino a 144, eseguire salvaarticoloperlistino, rinominare dir immagini varianti in _imgArt/_var/
+14-07-2016 aggiustamento findwebByarticolocr su articolo variante. Xpay
+24-06-2016 riba + documento.sendmail corretto
+13-06-2016 aggiustato per propagazione codice utente. Report movimenti compatto
+10-05-2016 documentosvl aggiustato invio mail per CR.Corretto ordinamento fatture (per data riferimento solo per fatt. e nc del fornitore)
+12-04-2016 nuova addrigadocumento. lista documento ordinata per datariferimento se fattura fornitore
+05-04-2016 Nazione + zona + documento + imgusr
+23-02-2016 bannerlisttag
+28-01-2016 articolofornitore.findById_articoloFornitore
+27-01-2016 corretto stampa slip. log separati
+28-10-2015 tolto gestione pagerow su prenotazione perchè dava fastidio a cassa che su dettaglio non ha salto pagina
+27-10-2015 calcolaQuantita su articolo variante
+20-10-2015 numero righe documento su prenotazione corretto
+20-10-2015 corretto nuvoletta con lista articoli variante Movimento.findSaldiArticoloVarianteTagliaByCR
+13-10-2015 allineamento per guidoreni. Corretto lista documento pagamento su refresh documento
+27-07-2015 report pdf pagamento corretto (numeri fornitori). Ordinamento documento pagamento dipendente da attivo/passivo
+23-07-2015 super su documento
+30-06-2015 banner tag css
+24-06-2015 newssvlt _getTimeline
+24-06-2015 corretto aggiornamento stato prenotazione (forse)
+23-05-2015 corretto errore salvataggio documento nell'impostazione del pagamento
+15-06-2015 corretto errore salvataggio riga documento nella creazione dei figli. Da verificare le qta prenotazioni in caso di scarico parziale
+12-06-2015 controllo errori guidoreni
+11-06-2015 stampe documento pagamento
+05-06-2015 corretto documento pagamento
+01-06-2015 riferimento su tipodocumento e creazione documentopdf solo se necessario
+22-05-2015 AGGIUSTATO CONTROLLO EMSTA DOCUMENTI
+18-05-2015 attivata gestione stampa provvisoria nel caso di blocco salvataggio documento dopo la stampa, modificata gestione pagamenti: inserito tipo di pagamento (acconto/saldo)
+11-05-2015 corretto sms sender
+05-05-2015 corretto aggiornamento flgDispo su cancellazione riga documento
+28-04-2015 corretto preleva documento: rifatto cancella movimenti:cancella solo i movimenti relativi ai magazzini movimentati. ottimizzato metodo Documento.addRigaDocumentoDaPrelevare
+24-04-2015 corretto aggiornamento stato prenotazione su modifica e cancella righe prenotazione
+10-04-2015 corretto chiamate listaRigheOrdini e figli su DocumentoSvlt. Corretto aggiornamento dispo si cancellazione riga
+08-04-2015 correzione flgEmettiFatturaDaScontrino e stampe fattura
+23-03-2015 nuova versione stampa documenti
+19-03-2015 corretto impegno + varie
+12-03-2015 agg. vari. corretto quantitamagazzinohtml (salvataggio)
+10-03-2015 correzione aggiornadispo per azzeramento quantitàhtml
+05-03-2015 ShowTemplateMsgWww ripristinato per tuttofoto
+03-03-2015 gestione scadenza pwd
+23-02-2015 banca e swift
+17-02-2015 correzione gestione divieto di salvataggio se stampata. Prima data disponibile documento da xx a emessa. corretto datastampa doc su stampe massive
+09-02-2015 CaratteristicaArticolo.getVal(lang)
+07-01-2015 articolo.creaFileCvs corretto imprecisione csv
+06-01-2015 alcune modifiche per regime margine tf + inizio pagamenti per coave
+16-12-2014 gestione prenotazioni fast
+11-12-2014 scale image : aggiunto watermark con immagine
+03-12-2014 ottimizzata ricerca articoli e stringa magazzino
+28-11-2014 aggiunto flag su articoloVariante per l'aggiornamento di zanieri
+27-11-2014 gestione invio mail news agli utenti abilitati tramite il flag flgNews e lista di visualizzazione invii utenti
+26-11-2014 associazione users clifor + flgNews su users e associativa NEWS_USERS
+25-11-2014 invio fattura tramite link offuscato
+17-11-2014 allineamento con updateCart su f3.jar
+14-11-2014 newsletter corretto baco, modificato campo indirizzo, email unique + abbuono su articolo solo per visualizzazione
+13-11-2014 guidoreni gestione slip con contatore slip stampate su rigadocumento + data documento su movimento
+07-11-2014 gestione mailNewsletter
+29-10-2014 aggiunto orderby su news
+09-10-2014 campo mail in coda messaggi
+25-09-2014 aggiornamento templatemsg
+31-07-2014 Aggiornamnento interfaccia CartItemInterface
+24-07-2014 corretto ordine lista taglie per sito web
+22-07-2014 modriga tolto autoadd
+17-07-2014 testato magazzino e documento con magazzino in movimento e senza magazzino. Manca cassa e gestione magazzino taglie
+03-07-2014 gestione parametro usa magazzino su articolo, articolvariante e riga documento
+02-07-2014 corretto bug gestione tipologia fornitore (tolta tabella TIPOLOGIA_FORNITORE e gestita con CLIFOR_TIPO_CLIFOR)
+24-06-2014 fix ricerca clifor x regione atelier
+09-05-2014 magazzino nuovo:
+ aggiunto flgInterno su mag_fisico
+aggiunto flgInternoPartenza e Arrivo su causale magazzino: verificare le nuovi causali magazzino
+aggiunto tipologie articoli dove mettiamo le unità di misura. Aggiunta combo su articolo.
+
+
+28-03-2014 news aggiornate
+13-03-2014 agg. vari atelier + inizio magazzino 2
+24-02-2014 campi dinamici su cosa messaggi
+17-02-2014 nuova gestione stati prenotazione + aggiornamento nuove pagine di amministrazione
+10-12-2013 taglib vetrina findrandomarticolo aggiunto escliudiweb
+03-12-2013 modificato flgDocumentoVerificato su clifor e aggiunte costanti
+28-11-2013 nuova versione news
+11-11-2013 nuova gestione listini. Da testare guidoreni. Nuova gestione news (lingue+ v3)
+28-10-2013 logon utente www controllo partita iva. left join disponibilità su articolo.findser
+16-10-2013 findFigli con select .. in(select..) molto lenta con mysql5.5. Ottimizzato isUnDocumentoFiglio.
+15-10-2013 da prenotazione a cassa verificato + gestione acconto!!!
+01-10-2013 aggiornamento articolo.findv con union per gestione tagle. Manca findSer con union!!!
+30-09-2013 AGGIORNAMENTI VARI mail fabio. gestione taglie.
+30-07-2013 AGGIORNAMENTI VARI... RIPARAZIONI + STRINGCASE.
+27-07-2013 modificato Documento->applicaListinoByClifor per ricalcolare il prezzo offerta sull'amministrazione.
+26-07-2013 nuova gestione legami righe fatture.
+03-07-2013 logRecord + varie.
+01-07-2013 corretto creaDocumentofiglio: qta su doc padre.
+30-06-2013 corretto creaDocumentofiglio: metteva qta=0..
+28-06-2013 modifiche varie fabio su cassa nuova
+18-06-2013 modifiche su nuova cassa + varie
+13-06-2013 aggiunto filtro per operatore su lista documenti
+13-06-2013 cambiato orientamento stampa report giornaliero in orizzontale
+13-06-2013 aggiunte colonne ntel e operatore su report giornaliero e fatto raggruppamento per tipologia
+13-06-2013 inserita notaBarcode su creazione documenti figli
+13-06-2013 cambiato ordinamento lista articoli cassa
+13-06-2013 stampa su scontrino aliquota iva non standard
+10-06-2013 chiusura cassa + ifvetrina
+07-06-2013 gestione cassa verificato +varie shopping www
+04-06-2013 gestione cassa.... da verificare
+28-05-2013 indici tipo + correzioni varie
+25-05-2013 corretto creazione doc figli (gestione disponibilità nel caso di movimentazione magazzino). Lista prenotazioni default aperte
+24-05-2013 gestione lingue su tipo pagamento. flgRitiroNegozio su documento e flgAblìilita negozio e corriere su tipo pagamento
+14-05-2013 gestione lingue su articolo variante.. correzioni
+13-05-2013 gestione lingue su caratteristiche e liste
+09-05-2013 allineamento nuovo carrello f3.jar Abl_14_39_24_090513
+08-05-2013 tolto definitivamente nominativo da clifor
+06-05-2013 CatalogoSvlt. Gestito caso in cui sul dettaglio voglio comunque vedere l'articolo (passo act=articolo)
+28-04-2013 tipo con immagini. Desc in lingua su tipo e articolo
+23-04-2013 tipo con descrizioni in lingua
+15-04-2013
+27-03-2013 aggiornamenti wwwguidoreni tolto telefono da intestazione fattura
+14-02-2013 aggiornamenti wwwguidoreni + tipo con ggArticoloEscludiweb
+06-02-2013 flgNascondi su tipo documento + campi agg. su clifor
+29-01-2013 aggiornamento www guidoreni. articoli non dispon. su web
+24-01-2013 aggiornamento www guidoreni
+07-12-2012 coda messaggi addimginterface
+30-11-2012 crea doc figlio funziona solo da document che hanno scaricato a quelli che non hanno scaricato. Da gestire ordini web
+15-11-2012 ecom.. aggiornamento ricerca prenotazioni
+12-11-2012 ecom.. aggiornamento carrello e correzione listini su cassa
+12-11-2012 ecom.. aggiornamento tipo accessori
+16-10-2012 allineamento nuova versione f3.jar
+28-09-2012 modifiche www e coave
+24-07-2012 banner testuali
+24-07-2012 correzioni guidoreni. stampa zebra. gestione ricerca compatibilità
+29-06-2012 varie correzioni guidoreni
+12-04-2012 clifor.getNominativoCompleto
+05-04-2012 corretto ricerche su categorie e liste dovuto a _it
+15-04-2012 corretto code messaggi. Corretto gestione immagini su articoli. Find articoli searchtxt anche su marca
+22-02-2012 aggiunto deleteForce su documenti
+13-02-2012 varie correzioni documenti per guidoreni
+10-02-2012 CORRETTO CODA MESSAGGI(GESTIONE TIMESTAMP PRIMA DI UNO SHOW BEAN). MAIUSCOLE AUTOMATICHE SU CLIFOR
+03-02-2012 aggiunto getTotale su RigaRegistroIva
+13-01-2012 coda messaggi con numero immagini quasi libero..
+10-01-2012 data pagamento documento
+29-12-2011 varie correzioni e aggiornamenti per guidoreni
+02-12-2011 varie correzioni tra cui legame documento padre su riga documento
+15-11-2011 corretto calcolo iva per valori in testata
+02-11-2011 getStringValueCase asis per allegati
+02-11-2011 tolto toUpperCase su Clifor.getCognome. Dipende giustamente da getStringValueCase
+31-10-2011 corretto ottimizzazione ricerca coda messaggi per sql server
+06-10-2011 Iva. aggiunto id_ivaDoc su documenti. Aggiornato fattura professionista
+16-09-2011 Iva. rinominati parametri standard iva. distinziona c/acq e c/vendita
+16-09-2011 ArticoloFornitore.getCostoIvato corretto arrotondamenti per 21%
+08-09-2011 corretto tot record articoli, eliminazione disponibilita se =0 (caso scarico), gestione reverse charge+varie
+03-08-2011 flgNoListino + corretto errori cash e prenotazioni
+13-07-2011 aggiunti CodaMessaggi.findByEmailTemplateMsg
+13-07-2011 corretto CodaMessaggi.sendMsg.\n
+17-06-2011 aggiunto getVersionLog e getSoftwareVersionLog\n
+
+17-06-2011 controlo contatori con anno e prog iniziale
+
+03-06-2011 corretto intestazioni fatture (getId_clifor() >0)
+
+26-05-2011 imei riparazione cancellazione logica articoli altre
+correzioni
+
+25-05-2011 spostato cracodamsg su clifor creazione coda da file di
+email (su templatemsg) 1_34 corretto ricerca coda messaggi
+ottimizzata per ms-sql
+
+24-05-2011 aggiustamento coda messaggi per ms-sql
+
+16-05-2011 corretto ricerca articolo (findtot)
+
+11-05-2011 report movimenti + messaggi movimenti su carta tim
+(nascosto preche' fatto sui documenti), fix ricerca movimenti ricerca
+movimenti per anno tolto rettangoli default stampa fattura3
+
+07-05-2011 aggiunto creazione cvs in articolo.findbycr . sparito dopo
+ottimizzazione
+
+04-05-2011 coda messaggi con openMailtag
+
+27-04-2010 ottimizzazione ricerca articoli e movimenti aggiustato
+invio sms corretto carico massivo 1_26 corretto presso
+nell'intestazione documenti
+
+20-04-2011 gestione allegati clienti, documenti, articolo, + tipi
+allegati
+
+25-03-2011 alegato articolo in ordine alfabetico
+
+09-03-2011 corretto random banner
+
+07-03-2011 AGGIUNTO GESTIONE BANNER
+
+23-02-2011 ottimizzata ricerca documento.findtotrecord. sul mac non
+funzionave ed effetivamente era una ciofeca
+
+23-02-2011 baco enorme sulla cassa. mi scorporava l'iva
+
+22-02-2011 aggiornamento tipo, logo documenti, carico articoli non in
+magazzino considerando il valore su tipo, varie guidoreni
+
+28-01-2011 aggiornamento clifor decriciozne comune, cap comune ecc
+ecc AGGIORNAMENTO DESTINAZIONI DIEVERSI COME SOPRA CODA MESSAGGI
+OTTIMIZZAZIONE RICERCA
+
+10-01-2011 ultime modifiche prenotazioni guidoreni
\ No newline at end of file
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/AbiCab.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/AbiCab.java
new file mode 100644
index 00000000..6c7a84c9
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/AbiCab.java
@@ -0,0 +1,233 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class AbiCab extends DBAdapter implements Serializable {
+ private static final long serialVersionUID = 1460974609869L;
+
+ private long id_abiCab;
+
+ private String descrizione;
+
+ private String agenzia;
+
+ private String indirizzo;
+
+ private String cap;
+
+ private String abi;
+
+ private String cab;
+
+ private String bic;
+
+ private String codiceAlt;
+
+ private String localita;
+
+ private String provincia;
+
+ public AbiCab(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public AbiCab() {}
+
+ public void setId_abiCab(long newId_abiCab) {
+ this.id_abiCab = newId_abiCab;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setAgenzia(String newAgenzia) {
+ this.agenzia = newAgenzia;
+ }
+
+ public void setIndirizzo(String newIndirizzo) {
+ this.indirizzo = newIndirizzo;
+ }
+
+ public void setCap(String newCapZona) {
+ this.cap = newCapZona;
+ }
+
+ public void setAbi(String newAbi) {
+ this.abi = newAbi;
+ }
+
+ public void setCab(String newCab) {
+ this.cab = newCab;
+ }
+
+ public void setBic(String newBic) {
+ this.bic = newBic;
+ }
+
+ public void setCodiceAlt(String newCodiceAlt) {
+ this.codiceAlt = newCodiceAlt;
+ }
+
+ public long getId_abiCab() {
+ return this.id_abiCab;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public String getAgenzia() {
+ return (this.agenzia == null) ? "" : this.agenzia.trim();
+ }
+
+ public String getIndirizzo() {
+ return (this.indirizzo == null) ? "" : this.indirizzo.trim();
+ }
+
+ public String getCap() {
+ return (this.cap == null) ? "" : this.cap.trim();
+ }
+
+ public String getAbi() {
+ return (this.abi == null) ? "" : this.abi.trim();
+ }
+
+ public String getCab() {
+ return (this.cab == null) ? "" : this.cab.trim();
+ }
+
+ public String getBic() {
+ return (this.bic == null) ? "" : this.bic.trim();
+ }
+
+ public String getCodiceAlt() {
+ return (this.codiceAlt == null) ? "" : this.codiceAlt.trim();
+ }
+
+ protected ResParm checkDeleteCascade() {
+ return new ResParm(true);
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(AbiCabCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from ABI_CAB AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public void findByAbiCab(String l_abi, String l_cab) {
+ String s_Sql_Find = "select A.* from ABI_CAB AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("A.abi='" + l_abi + "'");
+ wc.addWc("A.cab='" + l_cab + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ }
+ }
+
+ public ResParm importAbiCab(String fileName) {
+ ResParm rp = new ResParm(true);
+ int i = 0;
+ int se1 = 10;
+ int se2 = 100;
+ StringBuffer msg = new StringBuffer();
+ try {
+ BufferedReader reader = new BufferedReader(new FileReader(fileName));
+ if (reader != null) {
+ reader.readLine();
+ String currentLine;
+ while ((currentLine = reader.readLine()) != null) {
+ StringTokenizer st = new StringTokenizer(currentLine, ";", '"');
+ String abi = st.getToken(0);
+ String cab = st.getToken(1);
+ String istituto = st.getToken(2);
+ String sportello = st.getToken(3);
+ String indirizzo = st.getToken(4);
+ String localita = st.getToken(5);
+ String cap = st.getToken(6);
+ String prov = st.getToken(7);
+ AbiCab bean = new AbiCab(getApFull());
+ bean.findByAbiCab(abi, cab);
+ bean.setAbi(abi);
+ bean.setCab(cab);
+ bean.setDescrizione(istituto);
+ bean.setAgenzia(sportello);
+ bean.setIndirizzo(indirizzo);
+ bean.setLocalita(localita);
+ bean.setCap(cap);
+ bean.setProvincia(prov);
+ rp = bean.save();
+ if (!rp.getStatus())
+ break;
+ i++;
+ if (se1 > 0 && i % se1 == 0)
+ System.out.print(".");
+ if (se2 > 0 && i % se2 == 0)
+ System.out.println(i);
+ }
+ if (rp.getStatus()) {
+ rp.setMsg("Inserite o aggiornate " + i + " records.");
+ } else {
+ rp.setMsg("ERRORE! " + rp.getMsg() + "\nRecord numero " + i);
+ }
+ }
+ } catch (Exception e) {
+ rp.setStatus(false);
+ rp.setMsg(e);
+ }
+ return rp;
+ }
+
+ public String getLocalita() {
+ return (this.localita == null) ? "" : this.localita.trim();
+ }
+
+ public void setLocalita(String localita) {
+ this.localita = localita;
+ }
+
+ public String getProvincia() {
+ return (this.provincia == null) ? "" : this.provincia.trim();
+ }
+
+ public void setProvincia(String provincia) {
+ this.provincia = provincia;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/AbiCabCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/AbiCabCR.java
new file mode 100644
index 00000000..d78b6162
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/AbiCabCR.java
@@ -0,0 +1,102 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class AbiCabCR extends CRAdapter {
+ private long id_abiCab;
+
+ private String descrizione;
+
+ private String agenzia;
+
+ private String indirizzo;
+
+ private String capZona;
+
+ private String abi;
+
+ private String cab;
+
+ private String bic;
+
+ private String codiceAlt;
+
+ public AbiCabCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public AbiCabCR() {}
+
+ public void setId_abiCab(long newId_abiCab) {
+ this.id_abiCab = newId_abiCab;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setAgenzia(String newAgenzia) {
+ this.agenzia = newAgenzia;
+ }
+
+ public void setIndirizzo(String newIndirizzo) {
+ this.indirizzo = newIndirizzo;
+ }
+
+ public void setCapZona(String newCapZona) {
+ this.capZona = newCapZona;
+ }
+
+ public void setAbi(String newAbi) {
+ this.abi = newAbi;
+ }
+
+ public void setCab(String newCab) {
+ this.cab = newCab;
+ }
+
+ public void setBic(String newBic) {
+ this.bic = newBic;
+ }
+
+ public void setCodiceAlt(String newCodiceAlt) {
+ this.codiceAlt = newCodiceAlt;
+ }
+
+ public long getId_abiCab() {
+ return this.id_abiCab;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public String getAgenzia() {
+ return (this.agenzia == null) ? "" : this.agenzia.trim();
+ }
+
+ public String getIndirizzo() {
+ return (this.indirizzo == null) ? "" : this.indirizzo.trim();
+ }
+
+ public String getCapZona() {
+ return (this.capZona == null) ? "" : this.capZona.trim();
+ }
+
+ public String getAbi() {
+ return (this.abi == null) ? "" : this.abi.trim();
+ }
+
+ public String getCab() {
+ return (this.cab == null) ? "" : this.cab.trim();
+ }
+
+ public String getBic() {
+ return (this.bic == null) ? "" : this.bic.trim();
+ }
+
+ public String getCodiceAlt() {
+ return (this.codiceAlt == null) ? "" : this.codiceAlt.trim();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/AllegatoClifor.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/AllegatoClifor.java
new file mode 100644
index 00000000..b2942ca5
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/AllegatoClifor.java
@@ -0,0 +1,205 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.File;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class AllegatoClifor extends _AnagAdapter implements Serializable {
+ private static final long serialVersionUID = 8911811275285647807L;
+
+ private long id_allegatoClifor;
+
+ private long id_clifor;
+
+ private long id_tipoAllegatoClifor;
+
+ private String nomeFile;
+
+ private Clifor clifor;
+
+ private TipoAllegatoClifor tipoAllegatoClifor;
+
+ private String descrizioneAllegato;
+
+ private long flgDefault;
+
+ public AllegatoClifor(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public AllegatoClifor() {}
+
+ public void setId_allegatoClifor(long newId_allegatoClifor) {
+ this.id_allegatoClifor = newId_allegatoClifor;
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public void setId_tipoAllegatoClifor(long newId_tipoAllegatoClifor) {
+ this.id_tipoAllegatoClifor = newId_tipoAllegatoClifor;
+ setTipoAllegatoClifor(null);
+ }
+
+ public void setNomeFile(String newNomeFile) {
+ this.nomeFile = newNomeFile;
+ }
+
+ public long getId_allegatoClifor() {
+ return this.id_allegatoClifor;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public long getId_tipoAllegatoClifor() {
+ return this.id_tipoAllegatoClifor;
+ }
+
+ public String getNomeFile() {
+ return (this.nomeFile == null) ? "" : this.nomeFile.trim();
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class, getId_clifor());
+ return this.clifor;
+ }
+
+ public void setTipoAllegatoClifor(TipoAllegatoClifor newTipoAllegatoClifor) {
+ this.tipoAllegatoClifor = newTipoAllegatoClifor;
+ }
+
+ public TipoAllegatoClifor getTipoAllegatoClifor() {
+ this.tipoAllegatoClifor = (TipoAllegatoClifor)getSecondaryObject(this.tipoAllegatoClifor, TipoAllegatoClifor.class,
+ getId_tipoAllegatoClifor());
+ return this.tipoAllegatoClifor;
+ }
+
+ protected void deleteCascade() {
+ new File(getPathAllegato() + getPathAllegato()).delete();
+ }
+
+ public Vectumerator findByCR(AllegatoCliforCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from ALLEGATO_CLIFOR AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public void findByCliforNomeFile(long l_id_clifor, String l_id_nomeFile) {
+ String s_Sql_Find = "select A.* from ALLEGATO_CLIFOR AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ wc.addWc("A.nomeFile='" + l_id_nomeFile + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public Vectumerator findByCliforTipo(long l_id_clifor, long l_id_tipoAllegatoClifor, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from ALLEGATO_CLIFOR AS A";
+ String s_Sql_Order = " order by A.nomeFile";
+ WcString wc = new WcString();
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ if (l_id_tipoAllegatoClifor > 0L)
+ wc.addWc("A.id_tipoAllegatoClifor=" + l_id_tipoAllegatoClifor);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getNomeFileSuDisco() {
+ return "" + getId_clifor() + "_" + getId_clifor();
+ }
+
+ public String getDescrizioneAllegato() {
+ return (this.descrizioneAllegato == null) ? "" : this.descrizioneAllegato;
+ }
+
+ public void setDescrizioneAllegato(String descrizioneAllegato) {
+ this.descrizioneAllegato = descrizioneAllegato;
+ }
+
+ protected int getStringValueCase(String l_colomnName) {
+ return 0;
+ }
+
+ public long getFlgDefault() {
+ return this.flgDefault;
+ }
+
+ public void setFlgDefault(long flgDefault) {
+ this.flgDefault = flgDefault;
+ }
+
+ public void findByCliforDefault(long l_id_clifor) {
+ String s_Sql_Find = "select A.* from ALLEGATO_CLIFOR AS A";
+ String s_Sql_Order = " order by A.nomeFile";
+ WcString wc = new WcString();
+ wc.addWc("A.id_clifor = " + l_id_clifor);
+ wc.addWc("A.flgDefault = 1");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ protected void prepareSave(PreparedStatement ps) throws SQLException {
+ if (getFlgDefault() == 1L) {
+ AllegatoClifor ac = new AllegatoClifor(getApFull());
+ Vectumerator vec = new Vectumerator();
+ vec = ac.findByCliforTipo(getId_clifor(), 0L, 0, 0);
+ while (vec.hasMoreElements()) {
+ ac = (AllegatoClifor)vec.nextElement();
+ ac.setFlgDefault(0L);
+ ac.save();
+ }
+ }
+ super.prepareSave(ps);
+ }
+
+ public String getNomeFileCompletoSuDisco() {
+ return getPathAllegato() + getPathAllegato();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/AllegatoCliforCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/AllegatoCliforCR.java
new file mode 100644
index 00000000..8f6dcb3a
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/AllegatoCliforCR.java
@@ -0,0 +1,80 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class AllegatoCliforCR extends CRAdapter {
+ private long id_allegatoClifor;
+
+ private long id_clifor;
+
+ private long id_tipoAllegatoClifor;
+
+ private String nomeFile;
+
+ private Clifor clifor;
+
+ private TipoAllegatoClifor tipoAllegatoClifor;
+
+ public AllegatoCliforCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public AllegatoCliforCR() {}
+
+ public void setId_allegatoClifor(long newId_allegatoClifor) {
+ this.id_allegatoClifor = newId_allegatoClifor;
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public void setId_tipoAllegatoClifor(long newId_tipoAllegatoClifor) {
+ this.id_tipoAllegatoClifor = newId_tipoAllegatoClifor;
+ setTipoAllegatoClifor(null);
+ }
+
+ public void setNomeFile(String newNomeFile) {
+ this.nomeFile = newNomeFile;
+ }
+
+ public long getId_allegatoClifor() {
+ return this.id_allegatoClifor;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public long getId_tipoAllegatoClifor() {
+ return this.id_tipoAllegatoClifor;
+ }
+
+ public String getNomeFile() {
+ return (this.nomeFile == null) ? "" : this.nomeFile.trim();
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class,
+
+ getId_clifor());
+ return this.clifor;
+ }
+
+ public void setTipoAllegatoClifor(TipoAllegatoClifor newTipoAllegatoClifor) {
+ this.tipoAllegatoClifor = newTipoAllegatoClifor;
+ }
+
+ public TipoAllegatoClifor getTipoAllegatoClifor() {
+ this.tipoAllegatoClifor = (TipoAllegatoClifor)getSecondaryObject(this.tipoAllegatoClifor, TipoAllegatoClifor.class,
+
+ getId_tipoAllegatoClifor());
+ return this.tipoAllegatoClifor;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Aspetto.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Aspetto.java
new file mode 100644
index 00000000..51dc75ce
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Aspetto.java
@@ -0,0 +1,64 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class Aspetto extends _AnagAdapter implements Serializable {
+ private long id_aspetto;
+
+ private String descrizione;
+
+ public Aspetto(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Aspetto() {}
+
+ public void setId_aspetto(long newId_aspetto) {
+ this.id_aspetto = newId_aspetto;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_aspetto() {
+ return this.id_aspetto;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(AspettoCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from ASPETTO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/AspettoCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/AspettoCR.java
new file mode 100644
index 00000000..3d967e82
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/AspettoCR.java
@@ -0,0 +1,32 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class AspettoCR extends CRAdapter {
+ private long id_aspetto;
+
+ private String descrizione;
+
+ public AspettoCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public AspettoCR() {}
+
+ public void setId_aspetto(long newId_aspetto) {
+ this.id_aspetto = newId_aspetto;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_aspetto() {
+ return this.id_aspetto;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Banca.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Banca.java
new file mode 100644
index 00000000..0aeeb9f6
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Banca.java
@@ -0,0 +1,460 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class Banca extends DBAdapter implements Serializable {
+ private static final long serialVersionUID = 1423651664351L;
+
+ private long id_banca;
+
+ private long id_comune;
+
+ private String descrizione;
+
+ private String iban;
+
+ private String indirizzo;
+
+ private String telefono;
+
+ private String email;
+
+ private String abi;
+
+ private String capZona;
+
+ private double importoRiba;
+
+ private Comune comune;
+
+ private String codiceAlt;
+
+ private String agenzia;
+
+ private String cab;
+
+ private String bic;
+
+ private String numeroConto;
+
+ private long ordine;
+
+ private long flgDefaultBonifico;
+
+ private long flgVisualizzaPresentazione;
+
+ public Banca(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Banca() {}
+
+ public void setId_banca(long newId_banca) {
+ this.id_banca = newId_banca;
+ }
+
+ public void setId_comune(long newId_comune) {
+ this.id_comune = newId_comune;
+ setComune(null);
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setIban(String newIban) {
+ this.iban = newIban;
+ }
+
+ public void setIndirizzo(String newIndirizzo) {
+ this.indirizzo = newIndirizzo;
+ }
+
+ public void setTelefono(String newTelefono) {
+ this.telefono = newTelefono;
+ }
+
+ public void setEmail(String newEmail) {
+ this.email = newEmail;
+ }
+
+ public void setBic(String newBic) {
+ this.bic = newBic;
+ }
+
+ public void setCapZona(String newCapZona) {
+ this.capZona = newCapZona;
+ }
+
+ public long getId_banca() {
+ return this.id_banca;
+ }
+
+ public long getId_comune() {
+ return this.id_comune;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public String getIban() {
+ return (this.iban == null) ? "" : this.iban.trim();
+ }
+
+ public String getIndirizzo() {
+ return (this.indirizzo == null) ? "" : this.indirizzo.trim();
+ }
+
+ public String getTelefono() {
+ return (this.telefono == null) ? "" : this.telefono.trim();
+ }
+
+ public String getEmail() {
+ return (this.email == null) ? "" : this.email.trim();
+ }
+
+ public String getBic() {
+ return (this.bic == null) ? "" : this.bic.trim();
+ }
+
+ public String getCapZona() {
+ return (this.capZona == null) ? "" : this.capZona.trim();
+ }
+
+ public void setComune(Comune newComune) {
+ this.comune = newComune;
+ }
+
+ public Comune getComune() {
+ this.comune = (Comune)getSecondaryObject(this.comune, Comune.class, getId_comune());
+ return this.comune;
+ }
+
+ protected ResParm checkDeleteCascade() {
+ return new ResParm(true);
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(BancaCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from BANCA AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getCodiceAlt() {
+ return (this.codiceAlt == null) ? "" : this.codiceAlt.trim();
+ }
+
+ public void setCodiceAlt(String codieAlt) {
+ this.codiceAlt = codieAlt;
+ }
+
+ public String getAgenzia() {
+ return (this.agenzia == null) ? "" : this.agenzia.trim();
+ }
+
+ public void setAgenzia(String agenzia) {
+ this.agenzia = agenzia;
+ }
+
+ public String getAbi() {
+ if (this.abi == null &&
+ getIban().length() >= 11)
+ this.abi = getIban().substring(6, 11);
+ return (this.abi == null) ? "" : this.abi.trim();
+ }
+
+ public void setAbi(String abi) {
+ this.abi = abi;
+ }
+
+ public String getCab() {
+ if (this.cab == null &&
+ getIban().length() >= 15)
+ this.cab = getIban().substring(11, 15);
+ return (this.cab == null) ? "" : this.cab.trim();
+ }
+
+ public void setCab(String cab) {
+ this.cab = cab;
+ }
+
+ public String getNumeroConto() {
+ return (this.numeroConto == null) ? "" : this.numeroConto.trim();
+ }
+
+ public void setNumeroConto(String numeroConto) {
+ this.numeroConto = numeroConto;
+ }
+
+ public void findByCodiceAlt(String codiceAlt) {
+ String s_Sql_Find = "select A.* from BANCA AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("A.codiceAlt='" + codiceAlt + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ }
+ }
+
+ public String getConto() {
+ if (getIban().length() > 16)
+ return getIban().substring(16, getIban().length());
+ return "";
+ }
+
+ public long getOrdine() {
+ return this.ordine;
+ }
+
+ public void setOrdine(long ordine) {
+ this.ordine = ordine;
+ }
+
+ public Vectumerator findByOrdine() {
+ String s_Sql_Find = "select A.* from BANCA AS A";
+ String s_Sql_Order = " ORDER BY ordine";
+ WcString wc = new WcString();
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public ResParm settaOrdineMeno() {
+ ResParm rp = new ResParm(true);
+ Banca banca = new Banca(getApFull());
+ banca.findPrecedenteByOrdine(getOrdine());
+ if (banca.getDBState() == 1) {
+ long l_ordine = banca.getOrdine();
+ banca.setOrdine(getOrdine());
+ rp = banca.save();
+ setOrdine(l_ordine);
+ rp.append(save());
+ }
+ return rp;
+ }
+
+ public ResParm settaOrdinePiu() {
+ ResParm rp = new ResParm(true);
+ Banca banca = new Banca(getApFull());
+ banca.findSuccessivoByOrdine(getOrdine());
+ if (banca.getDBState() == 1) {
+ long l_ordine = banca.getOrdine();
+ banca.setOrdine(getOrdine());
+ rp = banca.save();
+ setOrdine(l_ordine);
+ rp.append(save());
+ }
+ return rp;
+ }
+
+ public double getImportoRiba() {
+ return this.importoRiba;
+ }
+
+ public void setImportoRiba(double importoRiba) {
+ this.importoRiba = importoRiba;
+ }
+
+ public void findPrecedenteByOrdine(long l_ordine) {
+ String s_Sql_Find = "select A.* from BANCA AS A";
+ String s_Sql_Order = " ORDER BY ordine desc";
+ WcString wc = new WcString();
+ wc.addWc("A.ordine<" + l_ordine);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ }
+ }
+
+ public void findSuccessivoByOrdine(long l_ordine) {
+ String s_Sql_Find = "select A.* from BANCA AS A";
+ String s_Sql_Order = " ORDER BY ordine asc";
+ WcString wc = new WcString();
+ wc.addWc("A.ordine>" + l_ordine);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ }
+ }
+
+ public long getFlgDefaultBonifico() {
+ return this.flgDefaultBonifico;
+ }
+
+ public void setFlgDefaultBonifico(long flgDefaultBonifico) {
+ this.flgDefaultBonifico = flgDefaultBonifico;
+ }
+
+ public ResParm save() {
+ if (getFlgDefaultBonifico() == 1L);
+ return super.save();
+ }
+
+ public void findBancaDefault() {
+ String s_Sql_Find = "select A.* from BANCA AS A";
+ String s_Sql_Order = " ORDER BY ordine";
+ WcString wc = new WcString();
+ wc.addWc("A.flgDefaultBonifico=1");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ }
+ }
+
+ protected ResParm resetDefaultBancaBonifico() {
+ String sql = "update BANCA set flgDefaultBonifico = null";
+ return update(sql);
+ }
+
+ public long getFlgVisualizzaPresentazione() {
+ return this.flgVisualizzaPresentazione;
+ }
+
+ public void setFlgVisualizzaPresentazione(long flgVisualizzaPresentazione) {
+ this.flgVisualizzaPresentazione = flgVisualizzaPresentazione;
+ }
+
+ public ResParm resetPresentazioneRibaAuto() {
+ String sql = "update BANCA set flgVisualizzaPresentazione = 0,ordine = 0";
+ return update(sql);
+ }
+
+ public Vectumerator findByOrdineVisibili() {
+ String s_Sql_Find = "select A.* from BANCA AS A";
+ String s_Sql_Order = " ORDER BY ordine";
+ WcString wc = new WcString();
+ wc.addWc("A.flgVisualizzaPresentazione=1");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public Vectumerator findNonVisibili() {
+ String s_Sql_Find = "select A.* from BANCA AS A";
+ String s_Sql_Order = " ORDER BY A.descrizione";
+ WcString wc = new WcString();
+ wc.addWc("(A.flgVisualizzaPresentazione is null or A.flgVisualizzaPresentazione =0)");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public ResParm addBancaAPresentazioneRibaAuto() {
+ if (getId_banca() > 0L) {
+ setFlgVisualizzaPresentazione(1L);
+ setOrdine(getMaxOrdine() + 1L);
+ return save();
+ }
+ return new ResParm(false, "ERRORE! Non puoi aggiungere una banca nulla alla presentazione riba!");
+ }
+
+ public ResParm rimuoviBancaAPresentazioneRibaAuto() {
+ if (getId_banca() > 0L) {
+ setFlgVisualizzaPresentazione(0L);
+ setOrdine(0L);
+ return save();
+ }
+ return new ResParm(false, "ERRORE! Non puoi togliere una banca nulla alla presentazione riba!");
+ }
+
+ public long getMaxOrdine() {
+ String s_Sql_Find = "select max(A.ordine) as _max from BANCA AS A";
+ String s_Sql_Order = " ORDER BY ordine asc";
+ WcString wc = new WcString();
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return (long)getMax(stmt);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return -1L;
+ }
+ }
+
+ public String getDescrizioneScript() {
+ return DBAdapter.prepareScriptString(getDescrizione());
+ }
+
+ public String getBancheDefaultBonificoDesc() {
+ StringBuilder sb = new StringBuilder();
+ String s_Sql_Find = "select A.* from BANCA AS A";
+ String s_Sql_Order = " ORDER BY ordine";
+ WcString wc = new WcString();
+ wc.addWc("A.flgDefaultBonifico=1");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ Vectumerator vec = findRows(stmt);
+ while (vec.hasMoreElements()) {
+ Banca row = (Banca)vec.nextElement();
+ sb.append(row.getDescrizione());
+ sb.append(" ");
+ sb.append(row.getIban());
+ if (vec.hasMoreElements())
+ sb.append(" - ");
+ }
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ }
+ return sb.toString();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/BancaCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/BancaCR.java
new file mode 100644
index 00000000..3e6c2daf
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/BancaCR.java
@@ -0,0 +1,116 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class BancaCR extends CRAdapter {
+ private long id_banca;
+
+ private long id_comune;
+
+ private String descrizione;
+
+ private String iban;
+
+ private String indirizzo;
+
+ private String telefono;
+
+ private String email;
+
+ private String bic;
+
+ private String capZona;
+
+ private Comune comune;
+
+ public BancaCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public BancaCR() {}
+
+ public void setId_banca(long newId_banca) {
+ this.id_banca = newId_banca;
+ }
+
+ public void setId_comune(long newId_comune) {
+ this.id_comune = newId_comune;
+ setComune(null);
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setIban(String newIban) {
+ this.iban = newIban;
+ }
+
+ public void setIndirizzo(String newIndirizzo) {
+ this.indirizzo = newIndirizzo;
+ }
+
+ public void setTelefono(String newTelefono) {
+ this.telefono = newTelefono;
+ }
+
+ public void setEmail(String newEmail) {
+ this.email = newEmail;
+ }
+
+ public void setBic(String newBic) {
+ this.bic = newBic;
+ }
+
+ public void setCapZona(String newCapZona) {
+ this.capZona = newCapZona;
+ }
+
+ public long getId_banca() {
+ return this.id_banca;
+ }
+
+ public long getId_comune() {
+ return this.id_comune;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public String getIban() {
+ return (this.iban == null) ? "" : this.iban.trim();
+ }
+
+ public String getIndirizzo() {
+ return (this.indirizzo == null) ? "" : this.indirizzo.trim();
+ }
+
+ public String getTelefono() {
+ return (this.telefono == null) ? "" : this.telefono.trim();
+ }
+
+ public String getEmail() {
+ return (this.email == null) ? "" : this.email.trim();
+ }
+
+ public String getBic() {
+ return (this.bic == null) ? "" : this.bic.trim();
+ }
+
+ public String getCapZona() {
+ return (this.capZona == null) ? "" : this.capZona.trim();
+ }
+
+ public void setComune(Comune newComune) {
+ this.comune = newComune;
+ }
+
+ public Comune getComune() {
+ this.comune = (Comune)getSecondaryObject(this.comune, Comune.class,
+
+ getId_comune());
+ return this.comune;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CausaleTrasporto.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CausaleTrasporto.java
new file mode 100644
index 00000000..4dd26fc8
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CausaleTrasporto.java
@@ -0,0 +1,66 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class CausaleTrasporto extends _AnagAdapter implements Serializable {
+ private long id_causaleTrasporto;
+
+ private String descrizione;
+
+ public CausaleTrasporto(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public CausaleTrasporto() {}
+
+ public void setId_causaleTrasporto(long newId_causaleMagazzino) {
+ this.id_causaleTrasporto = newId_causaleMagazzino;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_causaleTrasporto() {
+ return this.id_causaleTrasporto;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" :
+ this.descrizione.trim();
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(CausaleTrasportoCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from CAUSALE_TRASPORTO AS A";
+ String s_Sql_Order = " order by A.descrizione";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find +
+ wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CausaleTrasportoCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CausaleTrasportoCR.java
new file mode 100644
index 00000000..f5d2ec0e
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CausaleTrasportoCR.java
@@ -0,0 +1,32 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class CausaleTrasportoCR extends CRAdapter {
+ private long id_causaleTrasporto;
+
+ private String descrizione;
+
+ public CausaleTrasportoCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public CausaleTrasportoCR() {}
+
+ public void setId_causaleTrasporto(long newId_causaleMagazzino) {
+ this.id_causaleTrasporto = newId_causaleMagazzino;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_causaleTrasporto() {
+ return this.id_causaleTrasporto;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Cliente.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Cliente.java
new file mode 100644
index 00000000..49260497
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Cliente.java
@@ -0,0 +1,40 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.Vectumerator;
+
+public class Cliente extends Clifor {
+ private static final long serialVersionUID = 486912705000890691L;
+
+ private long id_cliente;
+
+ public Cliente() {}
+
+ public Cliente(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public String getTableBeanName() {
+ return "CLIFOR";
+ }
+
+ public String getFlgTipo() {
+ return "C";
+ }
+
+ public Vectumerator findByCR(ClienteCR CR, int pageNumber, int pageRows) {
+ return findByCR(CR, pageNumber, pageRows);
+ }
+
+ public long getId_cliente() {
+ return getId_clifor();
+ }
+
+ public void setId_cliente(long id_cliente) {
+ setId_clifor(id_cliente);
+ }
+
+ protected String sqlStringfindAll() {
+ return "select * from CLIFOR where id_clifor>1 and flgTipo='C' order by cognome, nome";
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ClienteCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ClienteCR.java
new file mode 100644
index 00000000..ec6195cd
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ClienteCR.java
@@ -0,0 +1,25 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+
+public class ClienteCR extends CliforCR {
+ private long id_cliente;
+
+ public ClienteCR() {}
+
+ public ClienteCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public String getFlgTipo() {
+ return "C";
+ }
+
+ public long getId_cliente() {
+ return getId_clifor();
+ }
+
+ public void setId_cliente(long id_cliente) {
+ setId_clifor(id_cliente);
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Clifor.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Clifor.java
new file mode 100644
index 00000000..f0264f20
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Clifor.java
@@ -0,0 +1,2741 @@
+package it.acxent.anag;
+
+import com.lowagie.text.Cell;
+import com.lowagie.text.Chunk;
+import com.lowagie.text.Document;
+import com.lowagie.text.Element;
+import com.lowagie.text.Font;
+import com.lowagie.text.HeaderFooter;
+import com.lowagie.text.PageSize;
+import com.lowagie.text.Paragraph;
+import com.lowagie.text.Phrase;
+import com.lowagie.text.Rectangle;
+import com.lowagie.text.Table;
+import com.lowagie.text.pdf.PdfWriter;
+import it.acxent.anag.tr.PersonaCarico;
+import it.acxent.brt.api.json.PudoAddress;
+import it.acxent.cart.Cart;
+import it.acxent.checkVatService.CheckVatClient;
+import it.acxent.contab.Documento;
+import it.acxent.db.AddImgInterface;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.fattele.FEDatiAnagraficiInterface;
+import it.acxent.fattele.FESedeInterface;
+import it.acxent.newsletter.CodaMessaggi;
+import it.acxent.newsletter.TemplateMsg;
+import it.acxent.util.CodiceFiscale;
+import it.acxent.util.FileMailingListManager;
+import it.acxent.util.FileWr;
+import it.acxent.util.PdfFontFactory;
+import it.acxent.util.SimpleDateFormat;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.awt.Color;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.Serializable;
+import java.sql.Date;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.text.NumberFormat;
+import java.util.Calendar;
+
+public class Clifor extends _AnagAdapter implements Serializable, CliforInterface, AddImgInterface, FEDatiAnagraficiInterface, FESedeInterface {
+ private static final long serialVersionUID = -3173766478494140671L;
+
+ public static final long DOCUMENTO_NON_VERIFICATO = 0L;
+
+ public static final long DOCUMENTO_NON_VALIDO = 10L;
+
+ public static final long DOCUMENTO_IN_SCADENZA = 15L;
+
+ public static final long DOCUMENTO_SCADUTO = 20L;
+
+ public static final long DOCUMENTO_VERIFICATO = 30L;
+
+ public static final long STATO_CIVILE_NESSUNO = 0L;
+
+ public static final long STATO_CIVILE_CELIBE_NUBILE = 1L;
+
+ public static final long STATO_CIVILE_CONIUGATO = 2L;
+
+ public static final long STATO_CIVILE_SEPARATO = 3L;
+
+ public static final long STATO_CIVILE_DIVORZIATO = 4L;
+
+ public static final long STATO_CONFERMA_DATI_NON_VERIFICATO = 0L;
+
+ public static final long STATO_CONFERMA_DATI_DA_VERIFICARE = 1L;
+
+ public static final long STATO_CONFERMA_DATI_VERIFICATO = 9L;
+
+ private long id_tipoPagamento;
+
+ private String codiceAlt;
+
+ private long flgValido;
+
+ private String flgTipo;
+
+ private long flgAzienda;
+
+ private String cellulare;
+
+ private String contatto;
+
+ private String nome;
+
+ private String indirizzo;
+
+ private String numeroCivico;
+
+ private long id_comune;
+
+ private long id_comuneNascita;
+
+ private String id_nazione;
+
+ private Date dataNascita;
+
+ public static final String TIPO_TUTTI = "";
+
+ public static final String TIPO_CLIENTE = "C";
+
+ public static final String TIPO_FORNITORE = "F";
+
+ public static final String TIPO_RUBRICA = "R";
+
+ private String codFisc;
+
+ private String pIva;
+
+ private String capZona;
+
+ private String fax;
+
+ private String telefono;
+
+ private String nota;
+
+ private String imgTmst;
+
+ private long flgPrivComunicazione;
+
+ private long flgPrivSensibili;
+
+ private long flgPrivTrattamento;
+
+ private long flgSesso;
+
+ private String www;
+
+ private Date dataRegistrazioneDI;
+
+ private String dichiarazioneIntento;
+
+ private long flgRC;
+
+ private TipoPagamento tipoPagamento;
+
+ private Comune comune;
+
+ private Comune comuneNascita;
+
+ private Nazione nazione;
+
+ private String codFiscCalc;
+
+ private String iban;
+
+ private String eMail;
+
+ private String descrizioneComune;
+
+ private String bancaDesc;
+
+ private long id_listino;
+
+ private Listino listino;
+
+ private long closeCommand;
+
+ private DestinazioneDiversa currentDD;
+
+ private Clifor cliforDup;
+
+ private long id_cliforDup;
+
+ private long flgMl = 1L;
+
+ private String provinciaComune;
+
+ private String capComune;
+
+ private String cognome;
+
+ private long flgSplitPayment;
+
+ private String codiceCartaFidelity;
+
+ private String descrizioneComuneNascita;
+
+ private String telefonoAmm;
+
+ private String cellulareAmm;
+
+ private String eMailAmm;
+
+ private String telefonoAltro;
+
+ private String cellulareAltro;
+
+ private String descrizioneAltroContatto;
+
+ private String eMailAltro;
+
+ private String numeroDocumento;
+
+ private Date dataScadenzaDocumento;
+
+ private double percProvvigione;
+
+ private long id_clifor;
+
+ private String notaPerCliente;
+
+ private long flgDocumentoVerificato;
+
+ private long flgNascondiWeb;
+
+ private String zona;
+
+ private String importPrefissoCodice;
+
+ private String importLinkFornitore;
+
+ private String importLinkFornitoreEan;
+
+ private long id_bancaAzienda;
+
+ private Banca bancaAzienda;
+
+ private String abi;
+
+ private String bic;
+
+ private String cab;
+
+ private double speseIncasso;
+
+ private long flgUsaContrattoOre;
+
+ private Clifor agente;
+
+ private long id_respCommerciale;
+
+ private Clifor respCommerciale;
+
+ private double percAgente;
+
+ private double percRespCommerciale;
+
+ private String pec;
+
+ private String descAggiuntiva;
+
+ private String codiceIdentificativoFE;
+
+ private long flgPA;
+
+ private double costoOrarioAssistenza;
+
+ private long id_agente;
+
+ private long flgArt8;
+
+ private long flgAbilitaAF;
+
+ private long flgUsato;
+
+ private String provinciaComuneNascita;
+
+ private long flgTaxFree;
+
+ private double valoreMinimoAbilitaAF;
+
+ private long flgStatoCivile;
+
+ private long id_ottoxmille;
+
+ private Ottoxmille ottoxmille;
+
+ private String cf5xmille;
+
+ private String codice2xmille;
+
+ private double costoSpedizioneAggiuntivo;
+
+ private long id_usersResponsabile;
+
+ private Users usersResponsabile;
+
+ private long flgStatoConfermaDati;
+
+ private long flgStatoConfermaDatiDb;
+
+ private double prezzoCatenaAlMt;
+
+ private long annoCorrente;
+
+ private long id_usersAttivita;
+
+ private Users usersAttivita;
+
+ private long flgEscludi;
+
+ private long flgBlacklist;
+
+ private String notaBlacklist;
+
+ public Clifor(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public double getPercentualeProvvigioneAgente() {
+ double perc = 0.0D;
+ if (getId_agente() > 0L)
+ if (getPercAgente() > 0.0D) {
+ perc = getPercAgente();
+ } else {
+ CliforTipoClifor ctc = new CliforTipoClifor(getApFull());
+ ctc.findByCliforTipologia(getId_agente(), 1L);
+ if (ctc.getDBState() == 1)
+ perc = ctc.getPercProvvigione();
+ }
+ return perc;
+ }
+
+ public double getPercentualeProvvigioneRespCommerciale() {
+ double perc = 0.0D;
+ if (getPercRespCommerciale() > 0.0D) {
+ perc = getPercRespCommerciale();
+ } else if (getId_respCommerciale() > 0L) {
+ CliforTipoClifor ctc = new CliforTipoClifor(getApFull());
+ ctc.findByCliforTipologia(getId_respCommerciale(), 3L);
+ if (ctc.getPercProvvigione() > 0.0D)
+ perc = ctc.getPercProvvigione();
+ } else {
+ CliforTipoClifor ctc = new CliforTipoClifor(getApFull());
+ ctc.findByCliforTipologia(getId_agente(), 1L);
+ if (ctc.getClifor().getPercRespCommerciale() > 0.0D) {
+ perc = ctc.getClifor().getPercRespCommerciale();
+ } else {
+ long id_respCommerciale = ctc.getClifor().getId_respCommerciale();
+ ctc = new CliforTipoClifor(getApFull());
+ ctc.findByCliforTipologia(id_respCommerciale, 3L);
+ if (ctc.getDBState() == 1)
+ perc = ctc.getPercProvvigione();
+ }
+ }
+ return perc;
+ }
+
+ public Clifor() {}
+
+ public void setId_clifor(long newId_cliFor) {
+ this.id_clifor = newId_cliFor;
+ }
+
+ public void setId_tipoPagamento(long newId_tipoPagamento) {
+ this.id_tipoPagamento = newId_tipoPagamento;
+ setTipoPagamento(null);
+ }
+
+ public void setCodiceAlt(String newCodiceAlt) {
+ this.codiceAlt = newCodiceAlt;
+ }
+
+ public void setFlgValido(long newFlgValido) {
+ this.flgValido = newFlgValido;
+ }
+
+ public void setFlgTipo(String newFlgTipo) {
+ this.flgTipo = newFlgTipo;
+ }
+
+ public void setFlgEscludi(long newFlgEscludi) {
+ this.flgEscludi = newFlgEscludi;
+ }
+
+ public void setCognome(String newCognome) {
+ this.cognome = newCognome;
+ }
+
+ public void setContatto(String newContatto) {
+ this.contatto = newContatto;
+ }
+
+ public void setNome(String newNome) {
+ this.nome = newNome;
+ }
+
+ public void setIndirizzo(String newIndirizzo) {
+ this.indirizzo = newIndirizzo;
+ }
+
+ public void setNumeroCivico(String newNumeroCivico) {
+ this.numeroCivico = newNumeroCivico;
+ }
+
+ public void setId_comune(long newId_comune) {
+ this.id_comune = newId_comune;
+ setComune(null);
+ }
+
+ public void setId_nazione(String newId_nazione) {
+ this.id_nazione = newId_nazione;
+ setNazione(null);
+ }
+
+ public void setDataNascita(Date newDataNascita) {
+ this.dataNascita = newDataNascita;
+ }
+
+ public void setCodFisc(String newCodFisc) {
+ this.codFisc = newCodFisc;
+ }
+
+ public void setPIva(String newPIva) {
+ this.pIva = newPIva;
+ }
+
+ public void setEMail(String newEMail) {
+ this.eMail = newEMail;
+ }
+
+ public void setFax(String newFax) {
+ this.fax = newFax;
+ }
+
+ public void setTelefono(String newTelefono) {
+ this.telefono = newTelefono;
+ }
+
+ public void setNota(String newNota) {
+ this.nota = newNota;
+ }
+
+ public void setImgTmst(String newImgTmst) {
+ this.imgTmst = newImgTmst;
+ }
+
+ public void setFlgPrivComunicazione(long newFlgPrivComunicazione) {
+ this.flgPrivComunicazione = newFlgPrivComunicazione;
+ }
+
+ public void setFlgPrivSensibili(long newFlgPrivSensibili) {
+ this.flgPrivSensibili = newFlgPrivSensibili;
+ }
+
+ public void setFlgPrivTrattamento(long newFlgPrivTrattamento) {
+ this.flgPrivTrattamento = newFlgPrivTrattamento;
+ }
+
+ public void setFlgSesso(long newFlgSesso) {
+ this.flgSesso = newFlgSesso;
+ }
+
+ public void setWww(String newWww) {
+ this.www = newWww;
+ }
+
+ public void setDataRegistrazioneDI(Date newDataRegistrazioneDI) {
+ this.dataRegistrazioneDI = newDataRegistrazioneDI;
+ }
+
+ public void setDichiarazioneIntento(String newDichiarazioneIntento) {
+ this.dichiarazioneIntento = newDichiarazioneIntento;
+ }
+
+ public void setFlgArt8(long newFlgArt8) {
+ this.flgArt8 = newFlgArt8;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public long getId_tipoPagamento() {
+ return this.id_tipoPagamento;
+ }
+
+ public String getCodiceAlt() {
+ return (this.codiceAlt == null) ? "" : this.codiceAlt.trim();
+ }
+
+ public long getFlgValido() {
+ return this.flgValido;
+ }
+
+ public String getFlgTipo() {
+ return (this.flgTipo == null) ? "" : this.flgTipo.trim();
+ }
+
+ public static final String getTipo(String l_flgTipo) {
+ if (l_flgTipo.equals("C"))
+ return "Cliente";
+ if (l_flgTipo.equals("F"))
+ return "Fornitore";
+ if (l_flgTipo.equals("R"))
+ return "Contatto";
+ return "??";
+ }
+
+ public static final String getStatoCivile(long l_flgStatoCivile) {
+ if (l_flgStatoCivile == 1L)
+ return "Celibe/Nubile";
+ if (l_flgStatoCivile == 2L)
+ return "Coniugato";
+ if (l_flgStatoCivile == 4L)
+ return "Divorziato";
+ if (l_flgStatoCivile == 3L)
+ return "Separato";
+ return "";
+ }
+
+ public static final String getStatoConfermaDati(long l_flgStatoConfermaDati) {
+ if (l_flgStatoConfermaDati == 1L)
+ return "Da Verificare";
+ if (l_flgStatoConfermaDati == 9L)
+ return "Verificato";
+ if (l_flgStatoConfermaDati == 0L)
+ return "Non Verificato";
+ return "";
+ }
+
+ public final String getStatoConfermaDati() {
+ return getStatoConfermaDati(getFlgStatoConfermaDati());
+ }
+
+ public String getStatoCivile() {
+ return getStatoCivile(getFlgStatoCivile());
+ }
+
+ public String getTipo() {
+ return getTipo(getFlgTipo());
+ }
+
+ public long getFlgAzienda() {
+ return this.flgAzienda;
+ }
+
+ public String getDescrizioneCompleta() {
+ if (getId_clifor() != 0L) {
+ if (getParm("ANAG_DESC_COMPLETA_CON_TIPO").isTrue()) {
+ StringBuffer stringBuffer = new StringBuffer(getFlgTipo() + " - ");
+ if (!getCodiceAlt().isEmpty()) {
+ stringBuffer.append(getCodiceAlt());
+ stringBuffer.append(" ");
+ }
+ stringBuffer.append(getNominativoCompleto());
+ return stringBuffer.toString();
+ }
+ StringBuffer temp = new StringBuffer();
+ if (!getCodiceAlt().isEmpty()) {
+ temp.append(getCodiceAlt());
+ temp.append(" ");
+ }
+ temp.append(getNominativoCompleto());
+ return temp.toString();
+ }
+ return "";
+ }
+
+ public String getCognomeNome() {
+ return (getCognome() + " " + getCognome()).trim();
+ }
+
+ public String getContatto() {
+ return (this.contatto == null) ? "" : this.contatto.trim();
+ }
+
+ public String getNome() {
+ return (this.nome == null) ? "" : this.nome.trim();
+ }
+
+ public String getIndirizzo() {
+ return (this.indirizzo == null) ? "" : this.indirizzo.trim();
+ }
+
+ public String getIndirizzoCompleto() {
+ return getIndirizzo() + " " + getIndirizzo() + " " + getNumeroCivico() + " " + (getCapZona().isEmpty() ? getCapComune() : getCapZona()) + " (" +
+ getDescrizioneComune() + ")";
+ }
+
+ public String getIndirizzoCompletoHtml() {
+ return getIndirizzoCompleto().replaceAll("\n", " ");
+ }
+
+ public String getNumeroCivico() {
+ return (this.numeroCivico == null) ? "" : this.numeroCivico.trim();
+ }
+
+ public long getId_comune() {
+ return this.id_comune;
+ }
+
+ public String getId_nazione() {
+ return (this.id_nazione == null) ? "" : this.id_nazione.trim();
+ }
+
+ public Date getDataNascita() {
+ return this.dataNascita;
+ }
+
+ public String getCodFisc() {
+ return (this.codFisc == null) ? "" : this.codFisc.trim().toUpperCase();
+ }
+
+ public String getPIva() {
+ return (this.pIva == null) ? "" : this.pIva.trim();
+ }
+
+ public String getEMail() {
+ return (this.eMail == null) ? "" : this.eMail.trim();
+ }
+
+ public String getFax() {
+ return (this.fax == null) ? "" : this.fax.trim();
+ }
+
+ public String getTelefono() {
+ return (this.telefono == null) ? "" : this.telefono.trim();
+ }
+
+ public String getNota() {
+ return (this.nota == null) ? "" : this.nota.trim();
+ }
+
+ public String getImgTmst() {
+ return (this.imgTmst == null) ? "" : this.imgTmst.trim();
+ }
+
+ public long getFlgPrivComunicazione() {
+ return this.flgPrivComunicazione;
+ }
+
+ public long getFlgPrivSensibili() {
+ return this.flgPrivSensibili;
+ }
+
+ public long getFlgPrivTrattamento() {
+ return this.flgPrivTrattamento;
+ }
+
+ public long getFlgSesso() {
+ return this.flgSesso;
+ }
+
+ public String getWww() {
+ return (this.www == null) ? "" : this.www.trim();
+ }
+
+ public Date getDataRegistrazioneDI() {
+ return this.dataRegistrazioneDI;
+ }
+
+ public String getDichiarazioneIntento() {
+ return (this.dichiarazioneIntento == null) ? "" : this.dichiarazioneIntento.trim();
+ }
+
+ public long getFlgArt8() {
+ return this.flgArt8;
+ }
+
+ public void setTipoPagamento(TipoPagamento newTipoPagamento) {
+ this.tipoPagamento = newTipoPagamento;
+ }
+
+ public TipoPagamento getTipoPagamento() {
+ this.tipoPagamento = (TipoPagamento)getSecondaryObject(this.tipoPagamento, TipoPagamento.class, getId_tipoPagamento());
+ return this.tipoPagamento;
+ }
+
+ public void setComune(Comune newComune) {
+ this.comune = newComune;
+ }
+
+ public Comune getComune() {
+ this.comune = (Comune)getSecondaryObject(this.comune, Comune.class, getId_comune());
+ return this.comune;
+ }
+
+ public void setNazione(Nazione newNazione) {
+ this.nazione = newNazione;
+ }
+
+ public Nazione getNazione() {
+ this.nazione = (Nazione)getSecondaryObject(this.nazione, Nazione.class, getId_nazione());
+ return this.nazione;
+ }
+
+ protected void deleteCascade() {}
+
+ public void findByCF(String l_codFisc, String l_flgTipo) {
+ String s_Sql_Find = "select A.* from CLIFOR AS A";
+ String s_Sql_Order = " order by A.cognome, A.nome\t";
+ WcString wc = new WcString();
+ wc.addWc("A.codFisc='" + l_codFisc + "'");
+ wc.addWc("A.flgTipo='" + l_flgTipo + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public void findByPIva(String l_pIva, String l_flgTipo) {
+ String s_Sql_Find = "select A.* from CLIFOR AS A";
+ String s_Sql_Order = " order by A.cognome, A.nome\t";
+ WcString wc = new WcString();
+ wc.addWc("A.pIva='" + l_pIva + "'");
+ wc.addWc("A.flgTipo='" + l_flgTipo + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public void findByImportPrefissoCodice(String l_importPrefissoCodice) {
+ String s_Sql_Find = "select A.* from CLIFOR AS A";
+ String s_Sql_Order = " order by A.cognome, A.nome\t";
+ WcString wc = new WcString();
+ wc.addWc("A.importPrefissoCodice ='" + l_importPrefissoCodice + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public void findByEmail(String l_email) {
+ String s_Sql_Find = "select A.* from CLIFOR AS A";
+ String s_Sql_Order = " order by A.cognome, A.nome\t";
+ WcString wc = new WcString();
+ wc.addWc("A.flgTipo='C'");
+ wc.addWc("A.eMail='" + l_email + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public String getCodFiscCalc() {
+ if (this.codFiscCalc == null || this.codFiscCalc.isEmpty())
+ if (getFlgSesso() < 0L || getCognome().isEmpty() || getNome().isEmpty() || getId_comuneNascita() == 0L) {
+ this.codFiscCalc = "";
+ } else {
+ char sesso = getSesso().charAt(0);
+ CodiceFiscale cf = new CodiceFiscale(getCognome(), getNome(), getDataNascita(), "", sesso);
+ cf.setCodiceLuogoDiNascita(getComuneNascita().getCodice());
+ this.codFiscCalc = cf.getCodicefiscale();
+ }
+ return this.codFiscCalc;
+ }
+
+ protected boolean isCodFiscDuplicated(String l_flgTipo) {
+ if (!getCodFisc().isEmpty() && !l_flgTipo.isEmpty()) {
+ String s_Sql_Find = "select * from CLIFOR AS A ";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("A.codFisc='" + getCodFisc() + "'");
+ wc.addWc("A.id_clifor !=" + getId_clifor());
+ wc.addWc("A.flgTipo ='" + l_flgTipo + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ Clifor bean = (Clifor)getFirstRecord(stmt);
+ if (bean != null && bean.getDBState() == 1)
+ return true;
+ return false;
+ } catch (Exception e) {
+ handleDebug(e);
+ return false;
+ }
+ }
+ return false;
+ }
+
+ public boolean isCodFiscDuplicated() {
+ return isCodFiscDuplicated(getFlgTipo());
+ }
+
+ public boolean isPIvaDuplicated() {
+ return isPIvaDuplicated(getFlgTipo());
+ }
+
+ public boolean isPIvaCodfiscDuplicated() {
+ return isPIvaCodfiscDuplicated(getFlgTipo());
+ }
+
+ public boolean isCodFiscOk() {
+ if (getFlgAzienda() != 1L)
+ return (getCodFiscCalc().isEmpty() || getCodFiscCalc().equals(getCodFisc()));
+ return true;
+ }
+
+ protected boolean isPIvaCodfiscDuplicated(String l_flgTipo) {
+ return (isPIvaDuplicated(l_flgTipo) || isCodFiscDuplicated(l_flgTipo));
+ }
+
+ protected boolean isPIvaDuplicated(String l_flgTipo) {
+ if (!getPIva().isEmpty() && !l_flgTipo.isEmpty()) {
+ String s_Sql_Find = "select * from CLIFOR AS A ";
+ String s_Sql_Order = "";
+ String wc = "";
+ wc = buildWc(wc, "A.pIva='" + getPIva() + "'");
+ wc = buildWc(wc, "A.id_clifor !=" + getId_clifor());
+ wc = buildWc(wc, "A.flgTipo ='" + l_flgTipo + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc);
+ Clifor bean = (Clifor)getFirstRecord(stmt);
+ if (bean != null && bean.getDBState() == 1)
+ return true;
+ return false;
+ } catch (Exception e) {
+ handleDebug(e);
+ return false;
+ }
+ }
+ return false;
+ }
+
+ public long getId_comuneNascita() {
+ return this.id_comuneNascita;
+ }
+
+ public void setId_comuneNascita(long id_comuneNascita) {
+ this.id_comuneNascita = id_comuneNascita;
+ setComuneNascita(null);
+ }
+
+ public Comune getComuneNascita() {
+ this.comuneNascita = (Comune)getSecondaryObject(this.comuneNascita, Comune.class, getId_comuneNascita());
+ return this.comuneNascita;
+ }
+
+ public void setComuneNascita(Comune comuneNascita) {
+ this.comuneNascita = comuneNascita;
+ }
+
+ public String getSesso() {
+ return (getFlgSesso() == 0L) ? "M" : "F";
+ }
+
+ protected void prepareSave(PreparedStatement ps) throws SQLException {
+ synchronized (this) {
+ if (getId_comune() > 0L)
+ setDescrizioneComune(getComune().getDescrizione());
+ if (getId_comuneNascita() > 0L)
+ setDescrizioneComuneNascita(getComuneNascita().getDescrizione());
+ super.prepareSave(ps);
+ }
+ }
+
+ public Vectumerator findUsers(int pageNumber, int pageRows) {
+ return new Users(getApFull()).findByClifor(getId_clifor(), pageNumber, pageRows);
+ }
+
+ public String getCognome() {
+ return (this.cognome == null) ? "" : this.cognome.trim();
+ }
+
+ public String getIban() {
+ return (this.iban == null) ? "" : this.iban.trim().toUpperCase();
+ }
+
+ public void setIban(String iban) {
+ this.iban = iban;
+ }
+
+ public String getAbiIban() {
+ if (getIban().length() < 11)
+ return "??";
+ return getIban().substring(5, 10);
+ }
+
+ public String getCabIban() {
+ if (getIban().length() < 16)
+ return "??";
+ return getIban().substring(10, 15);
+ }
+
+ public String getConto() {
+ if (getIban().length() < 27)
+ return "??";
+ return getIban().substring(15);
+ }
+
+ public String getCapZona() {
+ return (this.capZona == null) ? "" : this.capZona.trim();
+ }
+
+ public void setCapZona(String capZona) {
+ this.capZona = capZona;
+ }
+
+ protected int getStringValueCase(String l_columnName) {
+ if (l_columnName.startsWith("eMail"))
+ return 0;
+ return super.getStringValueCase(l_columnName);
+ }
+
+ public Vectumerator getDestinazioniDiverse() {
+ return new DestinazioneDiversa(getApFull()).findByClifor(getId_clifor(), 0, 0);
+ }
+
+ public ResParm addDestinazioneDiversa(DestinazioneDiversa row) {
+ DestinazioneDiversa bean = new DestinazioneDiversa(getApFull());
+ bean.findByPrimaryKey(row.getId_destinazioneDiversa());
+ if (bean.getDBState() == 1)
+ row.setDBState(bean.getDBState());
+ row.setId_clifor(getId_clifor());
+ ResParm rp = row.save();
+ return rp;
+ }
+
+ public ResParm delDestinazioneDiversa(DestinazioneDiversa row) {
+ DestinazioneDiversa bean = new DestinazioneDiversa(getApFull());
+ bean.findByPrimaryKey(row.getId_destinazioneDiversa());
+ return bean.delete();
+ }
+
+ public String getCellulare() {
+ return (this.cellulare == null) ? "" : this.cellulare.trim();
+ }
+
+ public void setCellulare(String cellulare) {
+ this.cellulare = cellulare;
+ }
+
+ public String getBancaDesc() {
+ return (this.bancaDesc == null) ? "" : this.bancaDesc.trim();
+ }
+
+ public void setBancaDesc(String banca) {
+ this.bancaDesc = banca;
+ }
+
+ public String getBancaCompleto() {
+ return getBancaDesc() + " " + getBancaDesc();
+ }
+
+ public long getId_listino() {
+ return this.id_listino;
+ }
+
+ public void setId_listino(long id_listino) {
+ this.id_listino = id_listino;
+ setListino(null);
+ }
+
+ public Listino getListino() {
+ this.listino = (Listino)getSecondaryObject(this.listino, Listino.class, getId_listino());
+ return this.listino;
+ }
+
+ public void setListino(Listino listino) {
+ this.listino = listino;
+ }
+
+ public long getCloseCommand() {
+ return this.closeCommand;
+ }
+
+ public void setCloseCommand(long closeCommand) {
+ this.closeCommand = closeCommand;
+ }
+
+ public Clifor getCliforDup() {
+ this.cliforDup = (Clifor)getSecondaryObject(this.cliforDup, Clifor.class, getId_cliforDup());
+ return this.cliforDup;
+ }
+
+ public void setId_cliforDup(long id_cliforDup) {
+ this.id_cliforDup = id_cliforDup;
+ setCliforDup(null);
+ }
+
+ public long getId_cliforDup() {
+ return this.id_cliforDup;
+ }
+
+ public void setCliforDup(Clifor cliforDup) {
+ this.cliforDup = cliforDup;
+ }
+
+ public Vectumerator getContratti() {
+ return new Contratto(getApFull()).findByClifor(getId_clifor(), 0, 0);
+ }
+
+ public Vectumerator getDocumenti() {
+ return new Documento(getApFull()).findByClifor(getId_clifor(), 0, 0);
+ }
+
+ public ResParm addContratto(Contratto row) {
+ Contratto bean = new Contratto(getApFull());
+ bean.findByPrimaryKey(row.getId_contratto());
+ if (bean.getDBState() == 1)
+ row.setDBState(bean.getDBState());
+ ResParm rp = row.save();
+ return rp;
+ }
+
+ public ResParm delContratto(Contratto row) {
+ Contratto bean = new Contratto(getApFull());
+ bean.findByPrimaryKey(row.getId_contratto());
+ return bean.delete();
+ }
+
+ public synchronized ResParm creaMailingListCR(CliforCR CR) {
+ ResParm rp = new ResParm(true);
+ resetMailingListFileCR();
+ CR.setFlgMl(1L);
+ Vectumerator vec = findByCR(CR, 0, 0);
+ long numEmail = 0L;
+ boolean res = true;
+ StringBuffer mail = new StringBuffer();
+ while (vec.hasMoreElements()) {
+ Clifor row = (Clifor)vec.nextElement();
+ res = row.addToMailingListFileCR();
+ if (res) {
+ mail.append(row.getEMail());
+ mail.append(", ");
+ numEmail++;
+ }
+ }
+ if (numEmail == 0L) {
+ rp.setStatus(false);
+ rp.setMsg("Errore!! Mailing list vuota. Verificare i criteri di ricerca.");
+ } else {
+ rp.setMsg("Mailing list creata correttamente. Inserite " + numEmail);
+ rp.setInfoMsg(" email. " + mail.toString());
+ }
+ return rp;
+ }
+
+ public void resetMailingListFileCR() {
+ File mlFile = new File(getDocBase() + getDocBase());
+ boolean res = mlFile.delete();
+ }
+
+ public synchronized boolean addToMailingListFileCR() {
+ boolean mlRet = false;
+ if (!getEMail().isEmpty()) {
+ mlRet = FileMailingListManager.getInstance(getDocBase() + getDocBase()).addEmail(getEMail());
+ if (!mlRet)
+ handleDebug(" Attenzione!! Mailing list non aggiornata. Contattare l'amministratore.", 2);
+ }
+ return mlRet;
+ }
+
+ protected String getMailingListFileCR() {
+ return getParm("MAIL_LIST_FILE_CR").getTesto();
+ }
+
+ public String getMailingMailCR() {
+ return getParm("MAIL_LIST_MAIL_CR").getTesto();
+ }
+
+ public static final synchronized ResParm unisciClifor(Clifor theClifor) {
+ ResParm rp = new ResParm(true);
+ if (theClifor.getId_clifor() != 0L && theClifor.getId_cliforDup() != 0L && theClifor.getId_clifor() != theClifor.getId_cliforDup()) {
+ if (theClifor.getId_cliforDup() != 0L && theClifor.getId_cliforDup() != theClifor.getId_clifor())
+ if (rp.getStatus()) {
+ String setSql = " set id_clifor=" + theClifor.getId_clifor() + " where id_clifor=" + theClifor.getId_cliforDup();
+ rp = theClifor.update("UPDATE DOCUMENTO" + setSql);
+ rp = theClifor.update("UPDATE DOCUMENTO set id_cliforListino=" + theClifor.getId_clifor() + " where id_cliforListino=" +
+ theClifor.getId_cliforDup());
+ rp.append(theClifor.update("UPDATE CLIFOR_USERS" + setSql));
+ rp.append(theClifor.update("UPDATE ARTICOLO_FORNITORE" + setSql));
+ rp.append(theClifor.update("UPDATE MAG_FISICO" + setSql));
+ rp.append(theClifor.update("UPDATE DESTINAZIONE_DIVERSA" + setSql));
+ rp.append(theClifor.update("UPDATE ALLEGATO_CLIFOR" + setSql));
+ rp.append(theClifor.update("UPDATE CLIFOR_USERS" + setSql));
+ rp.append(theClifor.update("UPDATE LISTINO_PERS" + setSql));
+ rp.append(theClifor.update("UPDATE MAG_FISICO" + setSql));
+ if (rp.getStatus())
+ rp.append(theClifor.update("delete from CLIFOR WHERE id_clifor=" + theClifor.getId_cliforDup()));
+ }
+ } else {
+ rp.setStatus(false);
+ rp.setMsg("Errore! Impossibile eseguire unione di oggetti nulli!.");
+ }
+ return rp;
+ }
+
+ public long getFlgMl() {
+ return this.flgMl;
+ }
+
+ public void setFlgMl(long flgMl) {
+ this.flgMl = flgMl;
+ }
+
+ public Vectumerator findByCR(CliforCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from CLIFOR AS A";
+ String s_Sql_Order = " order by A.cognome, A.nome\t";
+ WcString wc = new WcString();
+ if (CR.getId_tipoClifor() > 0L || CR.getFlgTipologiaClifor() > 0L)
+ s_Sql_Find = s_Sql_Find + " JOIN CLIFOR_TIPO_CLIFOR AS B ON A.id_clifor = B.id_clifor JOIN TIPO_CLIFOR AS C ON B.id_tipoClifor = C.id_tipoClifor left join CLIFOR_TIPO_CLIFOR AS D ON A.id_clifor=D.id_clifor";
+ wc.addWc("A.id_clifor>1");
+ if (!CR.getFlgTipo().isEmpty())
+ wc.addWc("A.flgTipo='" + CR.getFlgTipo() + "'");
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringBuffer txt = new StringBuffer("(");
+ String temp = CR.getSearchTxt().trim().replace('*', '%');
+ int comma = temp.indexOf(",");
+ if (comma > 0) {
+ StringTokenizer st = new StringTokenizer(temp, ",");
+ String token = st.nextToken().trim();
+ txt.append("(A.cognome like '" + token + "%')");
+ if (st.hasMoreTokens()) {
+ token = st.nextToken().trim();
+ txt.append(" and ");
+ txt.append("(A.nome like '" + token + "%' )");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ } else {
+ StringTokenizer st = new StringTokenizer(temp, " ");
+ while (st.hasMoreTokens()) {
+ String token = prepareSqlString(st.nextToken());
+ txt.append("(A.cognome like '%" + token + "%' or A.nome like '%" + token + "%' or A.descAggiuntiva like '%" + token + "%' or A.codFisc like '%" + token + "%' or A.pIva like '%" + token + "%' or A.codiceCartaFidelity like '%" + token + "%' or A.contatto like '%" + token + "%' or A.telefono like '%" + token + "%' or A.cellulare like '%" + token + "%' or A.codiceAlt like '%" + token + "%' or A.eMail like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ }
+ if (!CR.getSearchTxt2().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt2().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = prepareSqlString(st.nextToken());
+ txt.append("(A.cognome like '%" + token + "%' or A.nome like '%" + token + "%' or A.descAggiuntiva like '%" + token + "%' or A.codiceCartaFidelity like '%" + token + "%' or A.eMail like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ if (CR.getId_cliforEscludi() != 0L)
+ wc.addWc("A.id_clifor !=" + CR.getId_cliforEscludi());
+ if (CR.getFlgAzienda() == 0L) {
+ wc.addWc("(A.flgAzienda is null or A.flgAzienda=0)");
+ } else if (CR.getFlgAzienda() > 0L) {
+ wc.addWc("A.flgAzienda =" + CR.getFlgAzienda());
+ }
+ if (CR.getFlgNascondiWeb() == 0L) {
+ wc.addWc("(A.flgNascondiWeb = 0 OR A.flgNascondiWeb IS NULL)");
+ } else if (CR.getFlgNascondiWeb() > 0L) {
+ wc.addWc(" A.flgNascondiWeb =" + CR.getFlgNascondiWeb());
+ }
+ if (CR.getFlgMl() == 0L) {
+ wc.addWc("(A.flgMl is null or A.flgMl=0)");
+ } else if (CR.getFlgMl() > 0L) {
+ wc.addWc("A.flgMl =" + CR.getFlgMl());
+ }
+ if (CR.getFlgSplitPayment() == 0L) {
+ wc.addWc("(A.flgSplitPayment is null or A.flgSplitPayment=0)");
+ } else if (CR.getFlgSplitPayment() > 0L) {
+ wc.addWc("A.flgSplitPayment =" + CR.getFlgSplitPayment());
+ }
+ if (CR.getFlgPA() == 0L) {
+ wc.addWc("(A.flgPA is null or A.flgPA=0)");
+ } else if (CR.getFlgPA() > 0L) {
+ wc.addWc("A.flgPA =" + CR.getFlgPA());
+ }
+ if (CR.getFlgEscludi() == 0L) {
+ wc.addWc("(A.flgEscludi is null or A.flgEscludi=0)");
+ } else if (CR.getFlgEscludi() > 0L) {
+ wc.addWc("A.flgEscludi =" + CR.getFlgEscludi());
+ }
+ if (CR.getId_usersResponsabile() > 0L)
+ wc.addWc("A.id_usersResponsabile = " + CR.getId_usersResponsabile());
+ if (CR.getId_usersAttivita() > 0L)
+ wc.addWc("A.id_usersAttivita = " + CR.getId_usersAttivita());
+ if (CR.getId_agente() > 0L)
+ wc.addWc("A.id_agente = " + CR.getId_agente());
+ if (CR.getId_respCommerciale() > 0L)
+ wc.addWc("A.id_respCommerciale = " + CR.getId_respCommerciale());
+ if (CR.getId_tipoClifor() > 0L)
+ wc.addWc("(B.id_tipoClifor = " + CR.getId_tipoClifor() + " or D.id_tipoClifor=" + CR.getId_tipoClifor() + ")");
+ if (CR.getFlgTipologiaClifor() == 101L) {
+ wc.addWc("(C.flgTipologia = 1 or C.flgTipologia = 3)");
+ } else if (CR.getFlgTipologiaClifor() == 102L) {
+ wc.addWc("(C.flgTipologia = 1 or C.flgTipologia = 3 or C.flgTipologia = 2)");
+ } else if (CR.getFlgTipologiaClifor() > 0L) {
+ wc.addWc("C.flgTipologia = " + CR.getFlgTipologiaClifor());
+ }
+ if (!CR.getDescrizioneComune().isEmpty())
+ wc.addWc(" A.descrizioneComune LIKE '%" + CR.getDescrizioneComune() + "%'");
+ if (!CR.getProvinciaComune().isEmpty())
+ wc.addWc(" A.provinciaComune LIKE '%" + CR.getProvinciaComune() + "%'");
+ if (CR.getFlgStatoConfermaDati() == 0L) {
+ wc.addWc("(A.flgStatoConfermaDati = 0 OR A.flgStatoConfermaDati IS NULL)");
+ } else if (CR.getFlgStatoConfermaDati() > 0L) {
+ wc.addWc(" A.flgStatoConfermaDati =" + CR.getFlgStatoConfermaDati());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ protected void initFields() {
+ super.initFields();
+ setCurrentDD(null);
+ setFlgStatoConfermaDatiDb(0L);
+ setAnnoCorrente((long)getCurrentYear());
+ }
+
+ public String getDescrizioneComune() {
+ if (this.id_comune != 0L)
+ return getComune().getDescrizione();
+ return (this.descrizioneComune == null) ? "" : this.descrizioneComune.trim();
+ }
+
+ public void setDescrizioneComune(String descrizioneComune) {
+ this.descrizioneComune = descrizioneComune;
+ }
+
+ public String getProvinciaComune() {
+ if (this.id_comune != 0L)
+ return getComune().getProvincia();
+ if (this.provinciaComune == null)
+ return "";
+ if (this.provinciaComune.length() > 2)
+ return this.provinciaComune.substring(0, 2);
+ return this.provinciaComune;
+ }
+
+ public void setProvinciaComune(String provinciaComune) {
+ this.provinciaComune = provinciaComune;
+ }
+
+ public String getCapComune() {
+ if (this.id_comune != 0L)
+ return getComune().getCap();
+ return (this.capComune == null) ? "" : this.capComune.trim();
+ }
+
+ public void setCapComune(String capComune) {
+ this.capComune = capComune;
+ }
+
+ public String getPathAllegato() {
+ return getDocBase() + getDocBase() + getParm("CLIFOR_ATTACH_PATH").getTesto();
+ }
+
+ public Vectumerator getAllegati(long l_id_tipoAllegatoClifor) {
+ return new AllegatoClifor(getApFull()).findByCliforTipo(getId_clifor(), l_id_tipoAllegatoClifor, 0, 0);
+ }
+
+ public ResParm addAllegato(AllegatoClifor row) {
+ AllegatoClifor bean = new AllegatoClifor(getApFull());
+ bean.findByCliforNomeFile(row.getId_clifor(), row.getNomeFile());
+ if (bean.getDBState() == 1)
+ return new ResParm(false, "Nome File Duplicato");
+ row.setDBState(0);
+ ResParm rp = row.save();
+ return rp;
+ }
+
+ public ResParm delAllegato(AllegatoClifor row) {
+ AllegatoClifor bean = new AllegatoClifor(getApFull());
+ bean.findByPrimaryKey(row.getId_allegatoClifor());
+ return bean.delete();
+ }
+
+ public synchronized void creaCodaMessaggi(CliforCR CR, long l_id_templateMsg) {
+ CR.setFlgMl(1L);
+ Vectumerator vec = findByCR(CR, 0, 0);
+ TemplateMsg ts = new TemplateMsg(getApFull());
+ ts.findByPrimaryKey(l_id_templateMsg);
+ String campagna = ts.getDescrizione() + " " + ts.getDescrizione();
+ while (vec.hasMoreElements()) {
+ Clifor row = (Clifor)vec.nextElement();
+ if (ts.getFlgTipo() == 1L) {
+ if (!row.getEMail().trim().isEmpty()) {
+ CodaMessaggi cm = new CodaMessaggi(getApFull());
+ cm.setFlgTipo(ts.getFlgTipo());
+ cm.setCampagna(campagna);
+ cm.setMailTo(row.getEMail().trim());
+ cm.setOggettoEmail(ts.getOggettoEmail());
+ ts.setParmMsgString("intestazione", row.getCognomeNome());
+ cm.setTestoMessaggio(ts.getTestoMessaggioWithParms());
+ cm.save();
+ }
+ continue;
+ }
+ if (!row.getCellulare().trim().isEmpty()) {
+ CodaMessaggi cm = new CodaMessaggi(getApFull());
+ cm.setFlgTipo(ts.getFlgTipo());
+ cm.setCampagna(campagna);
+ cm.setCellulare(row.getCellulare().trim());
+ cm.setTestoMessaggio(ts.getTestoMessaggio());
+ cm.save();
+ }
+ }
+ }
+
+ public long getFlgRC() {
+ return this.flgRC;
+ }
+
+ public void setFlgRC(long flgRC) {
+ this.flgRC = flgRC;
+ }
+
+ public String getNominativoCompleto() {
+ if (getId_clifor() != 0L) {
+ StringBuilder temp = new StringBuilder();
+ if (!getCognome().isEmpty()) {
+ temp.append(" ");
+ temp.append(getCognome());
+ }
+ if (!getDescAggiuntiva().isEmpty()) {
+ temp.append(" ");
+ temp.append(getDescAggiuntiva());
+ }
+ if (!getNome().isEmpty()) {
+ temp.append(" ");
+ temp.append(getNome());
+ }
+ return temp.toString().trim();
+ }
+ return "";
+ }
+
+ public String getCodiceCartaFidelity() {
+ return (this.codiceCartaFidelity == null) ? "" : this.codiceCartaFidelity.trim();
+ }
+
+ public void setCodiceCartaFidelity(String codiceCartaFidelity) {
+ this.codiceCartaFidelity = codiceCartaFidelity;
+ }
+
+ public ByteArrayOutputStream creaPdfEtichettaZebra(String l_printer) {
+ ByteArrayOutputStream ba = new ByteArrayOutputStream();
+ try {
+ Chunk nome, indirizzo, citta;
+ String dim = getParm("LABEL_ANAG_SIZE").getTesto();
+ long xx = Long.parseLong(dim.substring(0, dim.indexOf(',')));
+ long yy = Long.parseLong(dim.substring(dim.indexOf(',') + 1));
+ int fontSize = getParm("LABEL_ANAG_FONT_SIZE").getNumeroInt();
+ Rectangle label = new Rectangle(getPdfPointSize(yy), getPdfPointSize(xx));
+ this.document = new Document(label.rotate(), 2.0F, 2.0F, 2.0F, 2.0F);
+ this.writer = PdfWriter.getInstance(this.document, ba);
+ this.document.open();
+ String sp = " ";
+ String spp = " ";
+ String sppp = " ";
+ Font pdfTagliando = new Font(2, (float)fontSize, 1);
+ Font pdfTagliandoP = new Font(2, (float)(fontSize - 1), 1);
+ Font pdfTagliandoPP = new Font(2, (float)(fontSize - 2), 1);
+ String temp = getCognomeNome();
+ if (temp.length() > 23) {
+ nome = new Chunk(spp + spp + "\n", pdfTagliandoP);
+ } else {
+ nome = new Chunk(sp + sp + "\n", pdfTagliando);
+ }
+ temp = getIndirizzo() + " " + getIndirizzo();
+ if (temp.length() > 30) {
+ indirizzo = new Chunk(sppp + sppp + "\n", pdfTagliandoPP);
+ } else if (temp.length() > 23) {
+ indirizzo = new Chunk(spp + spp + "\n", pdfTagliandoP);
+ } else {
+ indirizzo = new Chunk(sp + sp + "\n", pdfTagliando);
+ }
+ temp = getComune().getCap() + " - " + getComune().getCap() + " (" + getComune().getDescrizione() + ")";
+ if (temp.length() > 23) {
+ citta = new Chunk(spp + spp, pdfTagliandoP);
+ } else {
+ citta = new Chunk(sp + sp, pdfTagliando);
+ }
+ Paragraph p = new Paragraph(nome);
+ p.add(indirizzo);
+ p.add(citta);
+ this.document.add((Element)p);
+ this.document.close();
+ this.document = null;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return ba;
+ }
+
+ public String getKoMsg() {
+ StringBuffer msg = new StringBuffer();
+ if (getDBState() == 1) {
+ if (getCodFisc().isEmpty())
+ msg.append("Codice fiscale mancante, ");
+ if (getFlgAzienda() == 1L && getPIva().isEmpty())
+ msg.append("Partita Iva Mancante, ");
+ if (!getCodiceCartaFidelity().isEmpty() && getId_listino() == 0L)
+ msg.append("Listino mancante per cliente fidelity, ");
+ if (getFlgUsato() == 1L &&
+ getFlgAzienda() == 0L && (
+ getDescrizioneComune().isEmpty() || getDataNascita() == null || getNumeroDocumento().isEmpty()))
+ msg.append("Cliente privato usato senza comune/data nascita/numero documento, ");
+ }
+ return msg.toString();
+ }
+
+ public String getKoMsgWww() {
+ StringBuffer msg = new StringBuffer();
+ if (getDBState() == 1) {
+ if ((getId_nazione().toLowerCase().equals("i") || getId_nazione().toLowerCase().equals("it")) && getCodFisc().isEmpty())
+ msg.append("Codice fiscale mancante, ");
+ if (getFlgAzienda() == 1L && getPIva().isEmpty())
+ msg.append("Partita Iva Mancante, ");
+ if (getFlgAzienda() == 0L &&
+ getNome().isEmpty())
+ msg.append("Nome mancante, ");
+ if (!isIndirizzoOk())
+ msg.append("Indirizzo mancante, ");
+ if (getFlgUsato() == 1L &&
+ getFlgAzienda() == 0L && (
+ getDescrizioneComune().isEmpty() || getDataNascita() == null || getNumeroDocumento().isEmpty()))
+ msg.append("Cliente privato usato senza comune/data nascita/numero documento, ");
+ }
+ return msg.toString();
+ }
+
+ public boolean isOk() {
+ if (getId_clifor() == 0L)
+ return false;
+ if (getKoMsg().length() == 0)
+ return true;
+ return false;
+ }
+
+ public ResParm save() {
+ ResParm rp = new ResParm(true);
+ long l_flgStatoConfermaDatiDb = getFlgStatoConfermaDatiDb();
+ if (getCodFisc().isEmpty())
+ setCodFisc(getCodFiscCalc());
+ if (rp.getStatus()) {
+ rp = super.save();
+ if (rp.getStatus()) {
+ rp.append(aggiornaUsersAssociati());
+ if (getFlgStatoConfermaDati() != l_flgStatoConfermaDatiDb) {
+ CliforLog clog = new CliforLog(getApFull());
+ clog.setId_users(getLastUpdId_user());
+ clog.setId_clifor(getId_clifor());
+ clog.setDescrizione("aggiornamento da admin");
+ rp.append(clog.save(l_flgStatoConfermaDatiDb));
+ }
+ }
+ return rp;
+ }
+ return rp;
+ }
+
+ public ResParm saveStatoVerifica(long l_flgStatoConfermaDati, String msg) {
+ long l_flgStatoConfermaDatiDb = getFlgStatoConfermaDatiDb();
+ setFlgStatoConfermaDati(l_flgStatoConfermaDati);
+ ResParm rp = super.save();
+ if (rp.getStatus()) {
+ CliforLog clog = new CliforLog(getApFull());
+ clog.setId_users(getLastUpdId_user());
+ clog.setId_clifor(getId_clifor());
+ clog.setDescrizione(msg);
+ rp.append(clog.save(l_flgStatoConfermaDatiDb));
+ }
+ return rp;
+ }
+
+ public String getDescrizioneComuneNascita() {
+ if (this.id_comuneNascita != 0L)
+ return getComuneNascita().getDescrizione();
+ return (this.descrizioneComuneNascita == null) ? "" : this.descrizioneComuneNascita.trim();
+ }
+
+ public void setDescrizioneComuneNascita(String descrizioneComuneNascita) {
+ this.descrizioneComuneNascita = descrizioneComuneNascita;
+ }
+
+ public DestinazioneDiversa getCurrentDD() {
+ if (this.currentDD == null && getId_clifor() > 0L) {
+ this.currentDD = new DestinazioneDiversa(getApFull());
+ this.currentDD.findDefaultByClifor(getId_clifor());
+ }
+ return (this.currentDD == null) ? new DestinazioneDiversa(getApFull()) : this.currentDD;
+ }
+
+ public void setCurrentDD(DestinazioneDiversa currentDD) {
+ this.currentDD = currentDD;
+ }
+
+ protected void fillFields(ResultSet rst) {
+ super.fillFields(rst);
+ setCurrentDD(null);
+ setFlgStatoConfermaDatiDb(getFlgStatoConfermaDati());
+ if (getAnnoCorrente() == 0L)
+ setAnnoCorrente((long)getCurrentYear());
+ }
+
+ public boolean hasCurrentDD() {
+ if (getCurrentDD() == null || getCurrentDD().getId_destinazioneDiversa() == 0L)
+ return false;
+ return true;
+ }
+
+ public String getpIva() {
+ return (this.pIva == null) ? "" : this.pIva.trim();
+ }
+
+ public void setpIva(String pIva) {
+ this.pIva = pIva;
+ }
+
+ public String getTelefonoAmm() {
+ return (this.telefonoAmm == null) ? "" : this.telefonoAmm.trim();
+ }
+
+ public void setTelefonoAmm(String telefonoAmm) {
+ this.telefonoAmm = telefonoAmm;
+ }
+
+ public String getEMailAmm() {
+ return (this.eMailAmm == null) ? "" : this.eMailAmm.trim();
+ }
+
+ public void setEMailAmm(String eMailAmm) {
+ this.eMailAmm = eMailAmm;
+ }
+
+ public String getTelefonoAltro() {
+ return (this.telefonoAltro == null) ? "" : this.telefonoAltro.trim();
+ }
+
+ public void setTelefonoAltro(String telefonoAltro) {
+ this.telefonoAltro = telefonoAltro;
+ }
+
+ public String getEMailAltro() {
+ return (this.eMailAltro == null) ? "" : this.eMailAltro.trim();
+ }
+
+ public void setEMailAltro(String eMailAltro) {
+ this.eMailAltro = eMailAltro;
+ }
+
+ public String getCellulareAmm() {
+ return (this.cellulareAmm == null) ? "" : this.cellulareAmm.trim();
+ }
+
+ public void setCellulareAmm(String cellulareAmm) {
+ this.cellulareAmm = cellulareAmm;
+ }
+
+ public String getCellulareAltro() {
+ return (this.cellulareAltro == null) ? "" : this.cellulareAltro.trim();
+ }
+
+ public void setCellulareAltro(String cellulareAltro) {
+ this.cellulareAltro = cellulareAltro;
+ }
+
+ public String getDescrizioneAltroContatto() {
+ return (this.descrizioneAltroContatto == null) ? "" : this.descrizioneAltroContatto.trim();
+ }
+
+ public void setDescrizioneAltroContatto(String descrizioneAltroContatto) {
+ this.descrizioneAltroContatto = descrizioneAltroContatto;
+ }
+
+ public String getNumeroDocumento() {
+ return (this.numeroDocumento == null) ? "" : this.numeroDocumento;
+ }
+
+ public void setNumeroDocumento(String numeroDocumento) {
+ this.numeroDocumento = numeroDocumento;
+ }
+
+ public Date getDataScadenzaDocumento() {
+ return this.dataScadenzaDocumento;
+ }
+
+ public void setDataScadenzaDocumento(Date dataScadenzaDocumento) {
+ this.dataScadenzaDocumento = dataScadenzaDocumento;
+ }
+
+ public double getPercProvvigione() {
+ return this.percProvvigione;
+ }
+
+ public void setPercProvvigione(double percProvvigione) {
+ this.percProvvigione = percProvvigione;
+ }
+
+ public long getFlgDocumentoVerificato() {
+ return this.flgDocumentoVerificato;
+ }
+
+ public void setFlgDocumentoVerificato(long flgDocumentoVerificato) {
+ this.flgDocumentoVerificato = flgDocumentoVerificato;
+ }
+
+ public String getNotaPerCliente() {
+ return (this.notaPerCliente == null) ? "" : this.notaPerCliente;
+ }
+
+ public void setNotaPerCliente(String notaPerCliente) {
+ this.notaPerCliente = notaPerCliente;
+ }
+
+ public String getStatoDocumento() {
+ String ret = "";
+ if (getFlgDocumentoVerificato() == 0L) {
+ ret = "Documento non verificato";
+ } else if (getFlgDocumentoVerificato() == 10L) {
+ ret = "Documento non valido";
+ } else if (getFlgDocumentoVerificato() == 15L) {
+ ret = "Documento in scadenza";
+ } else if (getFlgDocumentoVerificato() == 20L) {
+ ret = "Documento scaduto";
+ } else if (getFlgDocumentoVerificato() == 30L) {
+ ret = "Documento verificato.";
+ }
+ return ret;
+ }
+
+ public Vectumerator findDocumentiScaduti() {
+ String s_Sql_Find = "select A.* from CLIFOR AS A ";
+ String s_Sql_Order = " order by A.cognome, A.nome\t";
+ WcString wc = new WcString();
+ wc.addWc(" A.dataScadenzaDocumento < ? ");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ int dataCount = 0;
+ dataCount++;
+ Calendar cal = Calendar.getInstance();
+ Date data = new Date(cal.getTimeInMillis());
+ stmt.setDate(dataCount, data);
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public Vectumerator findDocumentiInScadenza() {
+ String s_Sql_Find = "select A.* from CLIFOR AS A ";
+ String s_Sql_Order = " order by A.cognome, A.nome\t";
+ WcString wc = new WcString();
+ wc.addWc(" A.dataScadenzaDocumento >= ? ");
+ wc.addWc(" A.dataScadenzaDocumento <= ? ");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ int dataCount = 0;
+ dataCount++;
+ Calendar cal = Calendar.getInstance();
+ Date data = new Date(cal.getTimeInMillis());
+ stmt.setDate(dataCount, data);
+ dataCount++;
+ cal.add(2, 1);
+ Date data1 = new Date(cal.getTimeInMillis());
+ stmt.setDate(dataCount, data1);
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public ResParm checkStatoDocumento() {
+ ResParm rp = new ResParm(true);
+ StringBuilder sb = new StringBuilder();
+ Vectumerator vec = findDocumentiScaduti();
+ while (vec.hasMoreElements()) {
+ Clifor cli = (Clifor)vec.nextElement();
+ cli.setFlgDocumentoVerificato(20L);
+ sb.append("Il cliente " + cli.getNominativoCompleto() + " ha il documento scaduto. \n");
+ cli.save();
+ }
+ vec = findDocumentiInScadenza();
+ while (vec.hasMoreElements()) {
+ Clifor cli = (Clifor)vec.nextElement();
+ cli.setFlgDocumentoVerificato(15L);
+ sb.append("Il cliente " + cli.getNominativoCompleto() + " ha il documento in scadenza nel prossimo mese. \n");
+ cli.save();
+ }
+ rp.setMsg(sb.toString());
+ return rp;
+ }
+
+ public Vectumerator findByRegione(String l_id_regione) {
+ String s_Sql_Find = "select A.* from CLIFOR AS A, COMUNE AS B ";
+ String s_Sql_Order = " order by B.provincia,A.cognome, B.descrizione ";
+ WcString wc = new WcString();
+ wc.addWc(" A.id_comune = B.id_comune ");
+ wc.addWc(" A.flgTipo ='C' ");
+ wc.addWc(" B.id_regione = '" + l_id_regione + "' ");
+ wc.addWc(" (A.flgNascondiWeb = 0 OR A.flgNascondiWeb IS NULL)");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getDescrizioneCliente() {
+ if (getId_clifor() != 0L)
+ return getNominativoCompleto().trim();
+ return "";
+ }
+
+ public String getDescrizione() {
+ return getDescrizioneCliente();
+ }
+
+ public boolean hasDatiCompleti() {
+ if (getIndirizzo().isEmpty())
+ return false;
+ return true;
+ }
+
+ public long getFlgNascondiWeb() {
+ return this.flgNascondiWeb;
+ }
+
+ public void setFlgNascondiWeb(long flgVisibileWeb) {
+ this.flgNascondiWeb = flgVisibileWeb;
+ }
+
+ public ResParm addTipologia(CliforTipoClifor row) {
+ return row.save();
+ }
+
+ public ResParm delTipologia(CliforTipoClifor row) {
+ CliforTipoClifor bean = new CliforTipoClifor(getApFull());
+ bean.findByPrimaryKey(row.getId_cliforTipoClifor());
+ return bean.delete();
+ }
+
+ public boolean isPivaComunitariaOk() {
+ if (!getPIva().isEmpty()) {
+ boolean pivaOk = true;
+ String l_nazione = "IT";
+ String l_pIva = getPIva();
+ if (!getId_nazione().isEmpty() &&
+ !getNazione().getCodice().toLowerCase().equals("it"))
+ if (getPIva().length() > 11) {
+ l_nazione = getPIva().substring(0, 2).toUpperCase();
+ l_pIva = getPIva().substring(2);
+ } else {
+ l_nazione = null;
+ }
+ if (l_nazione == null) {
+ pivaOk = false;
+ } else {
+ CheckVatClient cvc = new CheckVatClient(l_nazione, l_pIva);
+ if (!cvc.getValid())
+ pivaOk = false;
+ }
+ return pivaOk;
+ }
+ return true;
+ }
+
+ public String getZona() {
+ return (this.zona == null) ? "" : this.zona.trim();
+ }
+
+ public void setZona(String zona) {
+ this.zona = zona;
+ }
+
+ public DestinazioneDiversa getDestinazioneDiversa(int index) {
+ if (getApFull() != null) {
+ Vectumerator vec = new DestinazioneDiversa(getApFull()).findByClifor(getId_clifor(), 0, 0);
+ if (vec.hasMoreElements())
+ return (DestinazioneDiversa)vec.get(index);
+ return new DestinazioneDiversa(getApFull());
+ }
+ return new DestinazioneDiversa();
+ }
+
+ public void creaFileCvs(CliforCR CR) {
+ try {
+ Vectumerator list = findByCR(CR, 0, 0);
+ CR.setFileName(getPathTmp() + "exportClifor_" + getPathTmp() + "_" + CR.getFlgTipo() + "_" + CR.getId_users() + ".csv");
+ String theCvsFile = getDocBase() + getDocBase();
+ String SEP = ";";
+ new File(theCvsFile).delete();
+ FileWr outCvsFile = new FileWr(theCvsFile, false);
+ String s1 = "Criteri di ricerca: " + CR.getDescrizioneCR() + "\nID;AZIENDA-COGNOME;NOME;CONTATTO;EMAIL;PEC;TELEFONO;FAX;CELL;NOTA;TIPO PAG.;COD. FISC;P.IVA;INDIRIZZO;N. CIVICO;COMUNE;CAP;CAP ZONA;NAZIONE;Responsabile;Attivita';INDIRIZZO DD;NUM CIVICO DD;COMUNE DD;CAP DD;CAP ZONA DD;NAZIONE DD";
+ outCvsFile.writeLine(s1);
+ while (list.hasMoreElements()) {
+ Clifor row = (Clifor)list.nextElement();
+ s1 = " " + row.getId_clifor() + SEP + row.getCognome() + SEP + row.getNome() + SEP + row.getContatto() + SEP + row.getEMail() + SEP + row.getPec() + SEP + row.getTelefono() + SEP + row.getFax() + SEP + row.getCellulare() + SEP + row.getNota() + SEP + row.getTipoPagamento().getDescrizione() + SEP + row.getCodFisc() + SEP + row.getpIva() + SEP + row.getIndirizzo() + SEP + row.getNumeroCivico() + SEP + row.getDescrizioneComune() + SEP + row.getCapComune() + SEP + row.getCapZona() + SEP + row.getNazione().getDescrizione_it() + SEP + row.getUsersResponsabile().getCognomeNome() + SEP + row.getUsersAttivita().getCognomeNome() + SEP;
+ DestinazioneDiversa dd = row.getDestinazioneDiversa(0);
+ s1 = s1 + s1 + dd.getIndirizzoDD() + SEP + dd.getNumeroCivicoDD() + SEP + dd.getDescrizioneComuneDD() + SEP + dd.getCapComuneDD() + SEP + dd.getCapZonaDD() + SEP;
+ s1 = s1.replace("€", "€");
+ s1 = s1.replace("»", "-->");
+ s1 = s1.replace("\n", ", ");
+ s1 = s1.replace("\r", "");
+ outCvsFile.writeLine(s1);
+ }
+ outCvsFile.closeFile();
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ public void creaFileCvsGC(CliforCR CR) {
+ try {
+ Vectumerator list = findByCR(CR, 0, 0);
+ CR.setFileName(getPathTmp() + "exportCliforGC_" + getPathTmp() + "_" + CR.getFlgTipo() + ".csv");
+ String theCvsFile = getDocBase() + getDocBase();
+ String SEP = ";";
+ new File(theCvsFile).delete();
+ FileWr outCvsFile = new FileWr(theCvsFile, false);
+ String s1 = "AZIENDA;NOME;COGNOME;P. IVA;COD. FISC;TIPO PAG.;INDIRIZZO;COMUNE;CAP;PROV;NAZIONE;TELEFONO;FAX;EMAIL;DESCRIZIONE DD;INDIRIZZO DD;COMUNE DD;CAP DD; PROV DD;NAZIONE DD;TELEFONO DD;FAX DD;EMAIL DD";
+ outCvsFile.writeLine(s1);
+ while (list.hasMoreElements()) {
+ Clifor row = (Clifor)list.nextElement();
+ s1 = " " + SEP + row.getNome() + SEP + row.getCognome() + SEP + row.getpIva() + SEP + row.getCodFisc() + SEP + row.getTipoPagamento().getDescrizione() + SEP + row.getIndirizzo() + " " + row.getNumeroCivico() + SEP + row.getDescrizioneComune() + SEP + row.getCapComune() + SEP + row.getProvinciaComune() + SEP + row.getNazione().getDescrizione_it() + SEP + row.getTelefono() + SEP + row.getFax() + SEP + row.getEMail() + SEP;
+ DestinazioneDiversa dd = row.getDestinazioneDiversa(0);
+ s1 = s1 + s1 + " " + dd.getDescrizioneDD() + dd.getPressoDD() + SEP + " " + dd.getIndirizzoDD() + dd.getNumeroCivicoDD() + SEP + dd.getDescrizioneComuneDD() + SEP + dd.getCapComuneDD() + SEP + dd.getProvinciaComuneDD() + SEP + SEP + dd.getTelefonoDD() + SEP + SEP;
+ s1 = s1.replace("€", "€");
+ s1 = s1.replace("»", "-->");
+ outCvsFile.writeLine(s1);
+ }
+ outCvsFile.closeFile();
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ public void creaFileCvsGF(CliforCR CR) {
+ try {
+ Vectumerator list = findByCR(CR, 0, 0);
+ CR.setFileName(getPathTmp() + "exportCliforGF_" + getPathTmp() + "_" + CR.getFlgTipo() + ".csv");
+ String theCvsFile = getDocBase() + getDocBase();
+ String SEP = ";";
+ new File(theCvsFile).delete();
+ FileWr outCvsFile = new FileWr(theCvsFile, false);
+ String s1 = "AZIENDA;COD. FISC;P. IVA;INDIRIZZO;TELEFONO;cell;FAX;EMAIL;COMUNE;CAP;PROV;NAZIONE;DESCRIZIONE DD;INDIRIZZO DD;COMUNE DD;CAP DD; PROV DD;NAZIONE DD;TELEFONO DD;FAX DD;EMAIL DD";
+ outCvsFile.writeLine(s1);
+ while (list.hasMoreElements()) {
+ Clifor row = (Clifor)list.nextElement();
+ s1 = " " + row.getCognomeNome() + SEP + row.getCodFisc() + SEP + row.getpIva() + SEP + row.getIndirizzo() + " " + row.getNumeroCivico() + SEP + row.getTelefono() + SEP + row.getCellulare() + SEP + row.getFax() + SEP + row.getEMail() + SEP + row.getDescrizioneComune() + SEP + row.getCapComune() + SEP + row.getProvinciaComune() + SEP + row.getNazione().getDescrizione_it();
+ DestinazioneDiversa dd = row.getDestinazioneDiversa(0);
+ s1 = s1 + s1 + " " + dd.getDescrizioneDD() + dd.getPressoDD() + SEP + " " + dd.getIndirizzoDD() + dd.getNumeroCivicoDD() + SEP + dd.getDescrizioneComuneDD() + SEP + dd.getCapComuneDD() + SEP + dd.getProvinciaComuneDD() + SEP + SEP + dd.getTelefonoDD() + SEP + SEP;
+ s1 = s1.replace("€", "€");
+ s1 = s1.replace("»", "-->");
+ outCvsFile.writeLine(s1);
+ }
+ outCvsFile.closeFile();
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ public long getId_bancaAzienda() {
+ return this.id_bancaAzienda;
+ }
+
+ public void setId_bancaAzienda(long id_bancaAzienda) {
+ this.id_bancaAzienda = id_bancaAzienda;
+ setBancaAzienda(null);
+ }
+
+ public Banca getBancaAzienda() {
+ this.bancaAzienda = (Banca)getSecondaryObject(this.bancaAzienda, Banca.class, getId_bancaAzienda());
+ return this.bancaAzienda;
+ }
+
+ public void setBancaAzienda(Banca bancaAzienda) {
+ this.bancaAzienda = bancaAzienda;
+ }
+
+ public String getAbi() {
+ return (this.abi == null) ? "" : this.abi.trim();
+ }
+
+ public String getBic() {
+ return (this.bic == null) ? "" : this.bic.trim();
+ }
+
+ public String getCab() {
+ return (this.cab == null) ? "" : this.cab.trim();
+ }
+
+ public void setAbi(String abi) {
+ this.abi = abi;
+ }
+
+ public void setBic(String bic) {
+ this.bic = bic;
+ }
+
+ public void setCab(String cab) {
+ this.cab = cab;
+ }
+
+ public double getSpeseIncasso() {
+ return this.speseIncasso;
+ }
+
+ public void setSpeseIncasso(double speseIncasso) {
+ this.speseIncasso = speseIncasso;
+ }
+
+ public void findClienteByCodiceAlt(String l_codiceAlt) {
+ String s_Sql_Find = "select A.* from CLIFOR AS A";
+ String s_Sql_Order = " order by A.cognome, A.nome\t";
+ WcString wc = new WcString();
+ wc.addWc("A.flgTipo='C'");
+ wc.addWc("A.codiceAlt='" + l_codiceAlt + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public void findFornitoreByCodiceAlt(String l_codiceAlt) {
+ String s_Sql_Find = "select A.* from CLIFOR AS A";
+ String s_Sql_Order = " order by A.cognome, A.nome\t";
+ WcString wc = new WcString();
+ wc.addWc("A.flgTipo='F'");
+ wc.addWc("A.codiceAlt='" + l_codiceAlt + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public ByteArrayOutputStream creaPdfListaClifor(CliforCR CR) {
+ ByteArrayOutputStream ba = new ByteArrayOutputStream();
+ Cell cell = new Cell();
+ int cellLeading = 10;
+ int corpoPadding = 2;
+ SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
+ Calendar cal = Calendar.getInstance();
+ SimpleDateFormat sdfh = new SimpleDateFormat("hh:mm");
+ NumberFormat nf = NumberFormat.getInstance();
+ nf.setMinimumFractionDigits(2);
+ nf.setMaximumFractionDigits(2);
+ Date dataVisita = null;
+ int col1 = 10, col2 = 9, col3 = 4, col4 = 4, col5 = 4, col6 = 4, col7 = 5;
+ try {
+ this.document = new Document(PageSize.A4.rotate(), 20.0F, 20.0F, 20.0F, 10.0F);
+ String nomeFile = CR.getFileName();
+ if (nomeFile.isEmpty()) {
+ this.writer = PdfWriter.getInstance(this.document, ba);
+ } else {
+ PdfWriter.getInstance(this.document, new FileOutputStream(nomeFile));
+ }
+ Font PDF_riga = PdfFontFactory.PDF_fPiccolo;
+ Phrase pHh = new Phrase(new Chunk("Lista clienti", PdfFontFactory.PDF_fGrandeB));
+ HeaderFooter header = new HeaderFooter(pHh, false);
+ header.setAlignment(0);
+ header.setBorder(0);
+ this.document.setHeader(header);
+ Phrase pH = new Phrase("Data/ora stampa: " + sdf.format(getToday()) + " " + sdfh.format(Long.valueOf(cal.getTimeInMillis())) + " pag. ");
+ HeaderFooter footer = new HeaderFooter(pH, true);
+ footer.setAlignment(2);
+ footer.setBorder(0);
+ this.document.setFooter(footer);
+ this.document.open();
+ Clifor bean = new Clifor(getApFull());
+ Table corpo = null;
+ corpo = new Table(40);
+ corpo.setWidth(100.0F);
+ corpo.setPadding((float)corpoPadding);
+ corpo.setSpacing(0.0F);
+ corpo.setWidths(colWidthsRighe40);
+ corpo.setBorder(0);
+ corpo.endHeaders();
+ cell = new Cell();
+ cell.add(new Chunk("Nominativo", PdfFontFactory.PDF_fGrandeBianco));
+ cell.setLeading((float)cellLeading);
+ cell.setHorizontalAlignment(0);
+ cell.setBackgroundColor(Color.LIGHT_GRAY);
+ cell.setColspan(col1);
+ cell.setRowspan(1);
+ corpo.addCell(cell);
+ cell = new Cell();
+ cell.add(new Chunk("Indirizzo", PdfFontFactory.PDF_fGrandeBianco));
+ cell.setLeading((float)cellLeading);
+ cell.setHorizontalAlignment(0);
+ cell.setBackgroundColor(Color.LIGHT_GRAY);
+ cell.setColspan(col2);
+ cell.setRowspan(1);
+ corpo.addCell(cell);
+ cell = new Cell();
+ cell.add(new Chunk("Tel.", PdfFontFactory.PDF_fGrandeBianco));
+ cell.setLeading((float)cellLeading);
+ cell.setHorizontalAlignment(0);
+ cell.setBackgroundColor(Color.LIGHT_GRAY);
+ cell.setColspan(col3);
+ cell.setRowspan(1);
+ corpo.addCell(cell);
+ cell = new Cell();
+ cell.add(new Chunk("Cell.", PdfFontFactory.PDF_fGrandeBianco));
+ cell.setLeading((float)cellLeading);
+ cell.setHorizontalAlignment(0);
+ cell.setBackgroundColor(Color.LIGHT_GRAY);
+ cell.setColspan(col4);
+ cell.setRowspan(1);
+ corpo.addCell(cell);
+ cell = new Cell();
+ cell.add(new Chunk("Email", PdfFontFactory.PDF_fGrandeBianco));
+ cell.setLeading((float)cellLeading);
+ cell.setHorizontalAlignment(0);
+ cell.setBackgroundColor(Color.LIGHT_GRAY);
+ cell.setColspan(col5);
+ cell.setRowspan(1);
+ corpo.addCell(cell);
+ cell = new Cell();
+ cell.add(new Chunk("Listino ass.", PdfFontFactory.PDF_fGrandeBianco));
+ cell.setLeading((float)cellLeading);
+ cell.setHorizontalAlignment(0);
+ cell.setBackgroundColor(Color.LIGHT_GRAY);
+ cell.setColspan(col6);
+ cell.setRowspan(1);
+ corpo.addCell(cell);
+ cell = new Cell();
+ cell.add(new Chunk("Note", PdfFontFactory.PDF_fGrandeBianco));
+ cell.setLeading((float)cellLeading);
+ cell.setHorizontalAlignment(0);
+ cell.setBackgroundColor(Color.LIGHT_GRAY);
+ cell.setColspan(col7);
+ cell.setRowspan(1);
+ corpo.addCell(cell);
+ corpo.endHeaders();
+ Vectumerator vec = bean.findByCR(CR, 0, 0);
+ while (vec.hasMoreElements()) {
+ Clifor row = (Clifor)vec.nextElement();
+ cell = new Cell();
+ cell.add(new Chunk(row.getDescrizioneCliente(), PDF_riga));
+ cell.setLeading((float)cellLeading);
+ cell.setHorizontalAlignment(0);
+ cell.setColspan(col1);
+ cell.setRowspan(1);
+ corpo.addCell(cell);
+ cell = new Cell();
+ cell.add(new Chunk(row.getIndirizzoCompleto(), PDF_riga));
+ cell.setLeading((float)cellLeading);
+ cell.setHorizontalAlignment(0);
+ cell.setColspan(col2);
+ cell.setRowspan(1);
+ corpo.addCell(cell);
+ cell = new Cell();
+ cell.add(new Chunk(row.getTelefono(), PdfFontFactory.PDF_fPiccolo));
+ cell.setLeading((float)cellLeading);
+ cell.setHorizontalAlignment(0);
+ cell.setColspan(col3);
+ cell.setRowspan(1);
+ corpo.addCell(cell);
+ cell = new Cell();
+ cell.add(new Chunk(String.valueOf(row.getCellulare()), PDF_riga));
+ cell.setLeading((float)cellLeading);
+ cell.setHorizontalAlignment(0);
+ cell.setColspan(col4);
+ cell.setRowspan(1);
+ corpo.addCell(cell);
+ cell = new Cell();
+ cell.add(new Chunk(row.getEMail(), PDF_riga));
+ if (!row.getPec().isEmpty())
+ cell.add(new Chunk("\n" + row.getPec(), PDF_riga));
+ cell.setLeading((float)cellLeading);
+ cell.setHorizontalAlignment(0);
+ cell.setColspan(col5);
+ cell.setRowspan(1);
+ corpo.addCell(cell);
+ cell = new Cell();
+ cell.add(new Chunk(row.getListino().getDescrizione(), PDF_riga));
+ cell.setLeading((float)cellLeading);
+ cell.setHorizontalAlignment(0);
+ cell.setColspan(col6);
+ cell.setRowspan(1);
+ corpo.addCell(cell);
+ cell = new Cell();
+ cell.add(new Chunk(row.getNotaPerCliente(), PDF_riga));
+ cell.setLeading((float)cellLeading);
+ cell.setHorizontalAlignment(0);
+ cell.setColspan(col7);
+ cell.setRowspan(1);
+ corpo.addCell(cell);
+ }
+ this.document.add((Element)corpo);
+ this.document.close();
+ this.document = null;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return ba;
+ }
+
+ public long getId_agente() {
+ return this.id_agente;
+ }
+
+ public void setId_agente(long id_agente) {
+ this.id_agente = id_agente;
+ }
+
+ public Clifor getAgente() {
+ this.agente = (Clifor)getSecondaryObject(this.agente, Clifor.class, getId_agente());
+ return this.agente;
+ }
+
+ public void setAgente(Clifor agente) {
+ this.agente = agente;
+ }
+
+ public long getId_respCommerciale() {
+ return this.id_respCommerciale;
+ }
+
+ public void setId_respCommerciale(long id_respCommerciale) {
+ this.id_respCommerciale = id_respCommerciale;
+ }
+
+ public Clifor getRespCommerciale() {
+ this.respCommerciale = (Clifor)getSecondaryObject(this.respCommerciale, Clifor.class, getId_respCommerciale());
+ return this.respCommerciale;
+ }
+
+ public void setRespCommerciale(Clifor respCommerciale) {
+ this.respCommerciale = respCommerciale;
+ }
+
+ public double getPercAgente() {
+ return this.percAgente;
+ }
+
+ public void setPercAgente(double percAgente) {
+ this.percAgente = percAgente;
+ }
+
+ public double getPercRespCommerciale() {
+ return this.percRespCommerciale;
+ }
+
+ public void setPercRespCommerciale(double percRespCommerciale) {
+ this.percRespCommerciale = percRespCommerciale;
+ }
+
+ public Vectumerator findByAgente(long l_id_agente) {
+ String s_Sql_Find = "select A.* from CLIFOR AS A";
+ String s_Sql_Order = " order by A.cognome, A.nome\t";
+ WcString wc = new WcString();
+ wc.addWc("A.id_agente=" + l_id_agente);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public ResParm superSave() {
+ return super.save();
+ }
+
+ public boolean isAgenteOResponsabileCommerciale() {
+ if (getDBState() == 0)
+ return false;
+ return new CliforTipoClifor(getApFull()).isAgenteORespondabileCommercialeByClifor(getId_clifor());
+ }
+
+ public boolean isAgente() {
+ if (getDBState() == 0)
+ return false;
+ return new CliforTipoClifor(getApFull()).isAgenteByClifor(getId_clifor());
+ }
+
+ public boolean isPrezzoWebEsente() {
+ if (getId_clifor() == 0L)
+ return false;
+ if (isIvaEsteroAziendaEsente()) {
+ DestinazioneDiversa dd = getCurrentDD();
+ if (dd.getId_destinazioneDiversa() > 0L) {
+ if (dd.getNazioneDD().getFlgCee() == 0L)
+ return true;
+ if (getNazione().getCodice().equals("IT")) {
+ if (dd.getNazioneDD().getCodice().equals("IT"))
+ return false;
+ if (getFlgAzienda() == 1L && !getpIva().isEmpty())
+ return true;
+ return false;
+ }
+ if (getNazione().getFlgCee() == 1L && getFlgAzienda() == 1L && !getpIva().isEmpty() &&
+ !dd.getNazioneDD().getCodice().equals("IT"))
+ return true;
+ return false;
+ }
+ if (getNazione().getCodice().equals("IT") || (
+ getNazione().getFlgCee() == 1L && getFlgAzienda() == 0L))
+ return false;
+ return true;
+ }
+ return false;
+ }
+
+ public boolean isPrezzoWebOss() {
+ if (isIvaCeeOneStopShop() && !getNazione().getCodice().toUpperCase().equals("IT") &&
+ getNazione().getFlgCee() == 1L)
+ return true;
+ return false;
+ }
+
+ public boolean isProgettista() {
+ if (getDBState() == 0)
+ return false;
+ return new CliforTipoClifor(getApFull()).isProgettistaByClifor(getId_clifor());
+ }
+
+ public boolean isResponsabileCommerciale() {
+ if (getDBState() == 0)
+ return false;
+ return new CliforTipoClifor(getApFull()).isRespondabileCommercialeByClifor(getId_clifor());
+ }
+
+ public String getDescrizioneAgenteResponsabileCommerciale() {
+ if (getDBState() == 0)
+ return "";
+ StringBuilder sb = new StringBuilder();
+ if (isAgente())
+ sb.append("Agente ");
+ if (isResponsabileCommerciale())
+ sb.append("Resp. Comm.");
+ return sb.toString().trim();
+ }
+
+ public String getPec() {
+ return (this.pec == null) ? "" : this.pec.trim();
+ }
+
+ public void setPec(String pec) {
+ this.pec = pec;
+ }
+
+ public String getDescAggiuntiva() {
+ return (this.descAggiuntiva == null) ? "" : this.descAggiuntiva.trim();
+ }
+
+ public void setDescAggiuntiva(String descAggiuntiva) {
+ this.descAggiuntiva = descAggiuntiva;
+ }
+
+ public String getCodiceIdentificativoFE() {
+ return (this.codiceIdentificativoFE == null) ? "" : this.codiceIdentificativoFE.trim().toUpperCase();
+ }
+
+ public void setCodiceIdentificativoFE(String codiceIdentificativoFE) {
+ this.codiceIdentificativoFE = codiceIdentificativoFE;
+ }
+
+ public long getFlgPA() {
+ return this.flgPA;
+ }
+
+ public void setFlgPA(long flgPA) {
+ this.flgPA = flgPA;
+ }
+
+ public double getCostoOrarioAssistenza() {
+ return this.costoOrarioAssistenza;
+ }
+
+ public void setCostoOrarioAssistenza(double costoOrarioAssistenza) {
+ this.costoOrarioAssistenza = costoOrarioAssistenza;
+ }
+
+ public long getFlgUsaContrattoOre() {
+ return this.flgUsaContrattoOre;
+ }
+
+ public void setFlgUsaContrattoOre(long flgUsaContrattoOre) {
+ this.flgUsaContrattoOre = flgUsaContrattoOre;
+ }
+
+ public String getFEIndirizzo() {
+ return getIndirizzo();
+ }
+
+ public String getFENumeroCivico() {
+ return getNumeroCivico();
+ }
+
+ public String getFECAP() {
+ if (getCapZona().isEmpty())
+ return getCapComune();
+ return getCapZona();
+ }
+
+ public String getFEComune() {
+ return getDescrizioneComune();
+ }
+
+ public String getFEProvincia() {
+ return getProvinciaComune();
+ }
+
+ public String getFENazione() {
+ return getNazione().getCodice();
+ }
+
+ public String getFEPartitaIva() {
+ return getPIva();
+ }
+
+ public String getFECodiceFiscale() {
+ return getCodFisc();
+ }
+
+ public String getFEDenominazione() {
+ if (getFlgAzienda() == 1L)
+ return getCognome();
+ return "";
+ }
+
+ public String getFECognome() {
+ return getCognome();
+ }
+
+ public String getFENome() {
+ return getNome();
+ }
+
+ public String getFETitolo() {
+ return null;
+ }
+
+ public String getFECodEORI() {
+ return null;
+ }
+
+ public String getFEPaese() {
+ return getNazione().getCodice();
+ }
+
+ public boolean isFEPaeseCEE() {
+ return (getNazione().getFlgCee() == 1L);
+ }
+
+ public boolean isDatiFEOK() {
+ if (getNazione().getCodice().toUpperCase().equals("IT")) {
+ if (getCodiceIdentificativoFE().isEmpty() && getPec().isEmpty())
+ return false;
+ return true;
+ }
+ return true;
+ }
+
+ public long getFlgSplitPayment() {
+ return this.flgSplitPayment;
+ }
+
+ public void setFlgSplitPayment(long flgSplitPayment) {
+ this.flgSplitPayment = flgSplitPayment;
+ }
+
+ public boolean isDatiUsatoOk() {
+ if (getFlgUsato() == 1L) {
+ if (!getPIva().isEmpty())
+ return true;
+ if (getDataNascita() == null || getDescrizioneComune().isEmpty() || getProvinciaComune().isEmpty() ||
+ getNumeroDocumento().isEmpty())
+ return false;
+ return true;
+ }
+ return true;
+ }
+
+ public long getFlgUsato() {
+ return this.flgUsato;
+ }
+
+ public void setFlgUsato(long flgUsato) {
+ this.flgUsato = flgUsato;
+ }
+
+ public String getProvinciaComuneNascita() {
+ if (this.id_comuneNascita != 0L)
+ return getComuneNascita().getProvincia();
+ if (this.provinciaComuneNascita == null)
+ return "";
+ if (this.provinciaComuneNascita.length() > 2)
+ return this.provinciaComuneNascita.substring(0, 2);
+ return this.provinciaComuneNascita;
+ }
+
+ public void setProvinciaComuneNascita(String provinciaComuneNascita) {
+ this.provinciaComuneNascita = provinciaComuneNascita;
+ }
+
+ public String getDescrizioneCompletaA() {
+ if (getId_clifor() != 0L) {
+ if (getParm("ANAG_DESC_COMPLETA_CON_TIPO").isTrue()) {
+ StringBuffer stringBuffer = new StringBuffer(getFlgTipo() + " - ");
+ if (!getCodiceAlt().isEmpty()) {
+ stringBuffer.append(getCodiceAlt());
+ stringBuffer.append(" ");
+ }
+ stringBuffer.append(getNominativoCompleto());
+ return stringBuffer.toString();
+ }
+ StringBuffer temp = new StringBuffer();
+ if (getFlgAzienda() == 1L)
+ temp.append("(A)");
+ if (!getCodiceAlt().isEmpty()) {
+ temp.append(getCodiceAlt());
+ temp.append(" ");
+ }
+ temp.append(getNominativoCompleto());
+ return temp.toString();
+ }
+ return "";
+ }
+
+ public long getFlgTaxFree() {
+ return this.flgTaxFree;
+ }
+
+ public void setFlgTaxFree(long flgTaxFree) {
+ this.flgTaxFree = flgTaxFree;
+ }
+
+ public String getImportPrefissoCodice() {
+ return (this.importPrefissoCodice == null) ? "" : this.importPrefissoCodice.trim();
+ }
+
+ public void setImportPrefissoCodice(String importPrefissoCodice) {
+ this.importPrefissoCodice = importPrefissoCodice;
+ }
+
+ public String getImportLinkFornitore() {
+ return (this.importLinkFornitore == null) ? "" : this.importLinkFornitore.trim();
+ }
+
+ public void setImportLinkFornitore(String importLinkFornitore) {
+ this.importLinkFornitore = importLinkFornitore;
+ }
+
+ public Users getUserWww() {
+ Vectumerator vec = new Users(getApFull()).findByClifor(getId_clifor(), 1, 1);
+ if (vec.hasMoreElements())
+ return (Users)vec.nextElement();
+ return new Users(getApFull());
+ }
+
+ public boolean isSpeseSpedizioneWwwPreventivo() {
+ if (!getCurrentDD().getId_nazioneDD().isEmpty()) {
+ if (getCurrentDD().getNazioneDD().getFlgPreventivoWww() == 0L)
+ return false;
+ return true;
+ }
+ if (getNazione().getFlgPreventivoWww() == 0L)
+ return false;
+ return true;
+ }
+
+ public boolean isIndirizzoOk() {
+ if (getIndirizzo().isEmpty() || getNumeroCivico().isEmpty() || (getCapComune().isEmpty() && getCapZona().isEmpty()) ||
+ getDescrizioneComune().isEmpty() || getProvinciaComune().isEmpty() || getId_nazione().isEmpty())
+ return false;
+ return true;
+ }
+
+ public long getFlgAbilitaAF() {
+ return this.flgAbilitaAF;
+ }
+
+ public double getValoreMinimoAbilitaAF() {
+ return this.valoreMinimoAbilitaAF;
+ }
+
+ public void setFlgAbilitaAF(long flgAbilitaAF) {
+ this.flgAbilitaAF = flgAbilitaAF;
+ }
+
+ public Vectumerator findFornitoriConImportPrefissoCodice() {
+ String s_Sql_Find = "select A.* from CLIFOR AS A";
+ String s_Sql_Order = " order by A.cognome, A.nome\t";
+ WcString wc = new WcString();
+ wc.addWc("A.importPrefissoCodice is not null");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getImportLinkFornitoreEan() {
+ return (this.importLinkFornitoreEan == null) ? "" : this.importLinkFornitoreEan.trim();
+ }
+
+ public void setImportLinkFornitoreEan(String importLinkFornitoreEan) {
+ this.importLinkFornitoreEan = importLinkFornitoreEan;
+ }
+
+ public void setValoreMinimoAbilitaAF(double valoreMinimoAbilitaAF) {
+ this.valoreMinimoAbilitaAF = valoreMinimoAbilitaAF;
+ }
+
+ public boolean isOkWww() {
+ if (getId_clifor() == 0L)
+ return false;
+ if (getKoMsgWww().length() == 0)
+ return true;
+ return false;
+ }
+
+ public long getFlgStatoCivile() {
+ return this.flgStatoCivile;
+ }
+
+ public void setFlgStatoCivile(long flgStatoCivile) {
+ this.flgStatoCivile = flgStatoCivile;
+ }
+
+ public Vectumerator findPersoneCarico(int pageNumber, int pageRows) {
+ return new PersonaCarico(getApFull()).findByCliente(getId_clifor(), pageNumber, pageRows);
+ }
+
+ public long getId_ottoxmille() {
+ return this.id_ottoxmille;
+ }
+
+ public void setId_ottoxmille(long id_ottoxmille) {
+ this.id_ottoxmille = id_ottoxmille;
+ setOttoxmille(null);
+ }
+
+ public Ottoxmille getOttoxmille() {
+ this.ottoxmille = (Ottoxmille)getSecondaryObject(this.ottoxmille, Ottoxmille.class, getId_ottoxmille());
+ return this.ottoxmille;
+ }
+
+ public void setOttoxmille(Ottoxmille ottoxmille) {
+ this.ottoxmille = ottoxmille;
+ }
+
+ public String getCf5xmille() {
+ return (this.cf5xmille == null) ? "" : this.cf5xmille.trim();
+ }
+
+ public void setCf5xmille(String cf5xmille) {
+ this.cf5xmille = cf5xmille;
+ }
+
+ public String getCodice2xmille() {
+ return (this.codice2xmille == null) ? "" : this.codice2xmille;
+ }
+
+ public void setCodice2xmille(String codice2xmille) {
+ this.codice2xmille = codice2xmille;
+ }
+
+ public double getCostoSpedizioneAggiuntivo() {
+ return this.costoSpedizioneAggiuntivo;
+ }
+
+ public double getCostoSpedizioneAggiuntivoConIva() {
+ return conIva(getCostoSpedizioneAggiuntivo(), getParm(Cart.P_DELIVERY_IVA_ALIQUOTA).getNumeroDouble());
+ }
+
+ public void setCostoSpedizioneAggiuntivo(double costoSpedizioneAggiuntivo) {
+ this.costoSpedizioneAggiuntivo = costoSpedizioneAggiuntivo;
+ }
+
+ public long getId_usersAttivita() {
+ return this.id_usersAttivita;
+ }
+
+ public void setId_usersAttivita(long id_usersAttivita) {
+ this.id_usersAttivita = id_usersAttivita;
+ setUsersAttivita(null);
+ }
+
+ public Users getUsersAttivita() {
+ this.usersAttivita = (Users)getSecondaryObject((DBAdapter)this.usersAttivita, Users.class, getId_usersAttivita());
+ return this.usersAttivita;
+ }
+
+ public void setUsersAttivita(Users usersAttivita) {
+ this.usersAttivita = usersAttivita;
+ }
+
+ public String getPathImg() {
+ return getPathAllegato();
+ }
+
+ public long getFlgStatoConfermaDati() {
+ return this.flgStatoConfermaDati;
+ }
+
+ public void setFlgStatoConfermaDati(long flgStatoConfermaDati) {
+ this.flgStatoConfermaDati = flgStatoConfermaDati;
+ }
+
+ public long getFlgStatoConfermaDatiDb() {
+ return this.flgStatoConfermaDatiDb;
+ }
+
+ public void setFlgStatoConfermaDatiDb(long flgStatoConfermaDatiDb) {
+ this.flgStatoConfermaDatiDb = flgStatoConfermaDatiDb;
+ }
+
+ public final String getStatoConfermaDatiIcon() {
+ if (getId_clifor() == 0L)
+ return "";
+ if (getFlgStatoConfermaDati() == 1L)
+ return " ";
+ if (getFlgStatoConfermaDati() == 0L)
+ return " ";
+ if (getFlgStatoConfermaDati() == 9L)
+ return " ";
+ return "";
+ }
+
+ public long getAnnoCorrente() {
+ return this.annoCorrente;
+ }
+
+ public void setAnnoCorrente(long annoCorrente) {
+ this.annoCorrente = annoCorrente;
+ }
+
+ public double getPrezzoCatenaAlMt() {
+ return this.prezzoCatenaAlMt;
+ }
+
+ public void setPrezzoCatenaAlMt(double prezzoCatenaAlMt) {
+ this.prezzoCatenaAlMt = prezzoCatenaAlMt;
+ }
+
+ public long getId_usersResponsabile() {
+ return this.id_usersResponsabile;
+ }
+
+ public void setUsersResponsabile(Users usersResponsabile) {
+ this.usersResponsabile = usersResponsabile;
+ }
+
+ public Users getUsersResponsabile() {
+ this.usersResponsabile = (Users)getSecondaryObject((DBAdapter)this.usersResponsabile, Users.class, getId_usersResponsabile());
+ return this.usersResponsabile;
+ }
+
+ public void setId_usersResponsabile(long id_usersResponsabile) {
+ this.id_usersResponsabile = id_usersResponsabile;
+ setUsersResponsabile(null);
+ }
+
+ public long getFlgEscludi() {
+ return this.flgEscludi;
+ }
+
+ public void setFlgAzienda(long newFlgAzienda) {
+ this.flgAzienda = newFlgAzienda;
+ }
+
+ public ResParm cambiaFlg(String l_flg) {
+ ResParm rp = new ResParm(true);
+ if (l_flg.equals("flgEscludi"))
+ setFlgEscludi((getFlgEscludi() == 1L) ? 0L : 1L);
+ rp = superSave();
+ return rp;
+ }
+
+ public PudoAddress getPudoAddress() {
+ String indirizzo = getIndirizzo() + ", " + getIndirizzo();
+ String zipCode = getCapZona().isEmpty() ? getCapComune() : getCapZona();
+ String city = getDescrizioneComune();
+ if (!getCurrentDD().getIndirizzoDD().isEmpty()) {
+ indirizzo = getCurrentDD().getIndirizzoDD() + ", " + getCurrentDD().getIndirizzoDD();
+ if (getCurrentDD().getCapZonaDD().isEmpty()) {
+ zipCode = getCurrentDD().getCapComuneDD();
+ } else {
+ zipCode = getCurrentDD().getCapZonaDD();
+ }
+ city = getCurrentDD().getDescrizioneComuneDD();
+ }
+ PudoAddress pa = new PudoAddress(indirizzo, zipCode, city);
+ return pa;
+ }
+
+ public long getFlgBlacklist() {
+ return this.flgBlacklist;
+ }
+
+ public void setFlgBlacklist(long flgBlacklist) {
+ this.flgBlacklist = flgBlacklist;
+ }
+
+ public String getNotaBlacklist() {
+ return (this.notaBlacklist == null) ? "" : this.notaBlacklist.trim();
+ }
+
+ public void setNotaBlacklist(String notaBlacklist) {
+ this.notaBlacklist = notaBlacklist;
+ }
+
+ public boolean isTipologiaClifor(long l_id_tipologia) {
+ if (getDBState() == 0)
+ return false;
+ CliforTipoClifor ctc = new CliforTipoClifor(getApFull());
+ return ctc.isTipologiaCliforByClifor(getId_clifor(), l_id_tipologia);
+ }
+
+ public ResParm aggiornaUsersAssociati() {
+ ResParm rp = new ResParm(true);
+ try {
+ Vectumerator vec = new Users(getApFull()).findByClifor(getId_clifor(), 0, 0);
+ while (vec.hasMoreElements()) {
+ Users u = (Users)vec.nextElement();
+ rp = u.save();
+ if (!rp.getStatus())
+ return rp;
+ }
+ } catch (Exception e) {
+ handleDebug(e);
+ rp.setStatus(false);
+ rp.setMsg("Eccezione in aggiornaUsersAssociati: " + e.getMessage());
+ }
+ return rp;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforCR.java
new file mode 100644
index 00000000..c2030ea3
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforCR.java
@@ -0,0 +1,737 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import java.sql.Date;
+
+public class CliforCR extends CRAdapter {
+ private long id_clifor;
+
+ private long id_tipoPagamento;
+
+ private String codiceAlt;
+
+ private long flgValido;
+
+ private String flgTipo;
+
+ private long flgAzienda = -1L;
+
+ private String cognome;
+
+ private String contatto;
+
+ private String nome;
+
+ private String testoMessaggio;
+
+ private String numeroCivico;
+
+ private long id_comune;
+
+ private long id_nazione;
+
+ private Date dataNascita;
+
+ private String codFisc;
+
+ private String pIva;
+
+ private String eMail;
+
+ private String fax;
+
+ private String telefono;
+
+ private String nota;
+
+ private String imgTmst;
+
+ private long flgPrivComunicazione;
+
+ private long flgPrivSensibili;
+
+ private long flgPrivTrattamento;
+
+ private long flgSesso;
+
+ private String indirizzoSped;
+
+ private String numeroCivicoSped;
+
+ private String presso;
+
+ private long id_nazioneSped;
+
+ private long id_comuneSped;
+
+ private Date dataRegistrazioneDI;
+
+ private String dichiarazioneIntento;
+
+ private String flgCF;
+
+ private long flgArt8;
+
+ private long flgTipologiaClifor;
+
+ private TipoPagamento tipoPagamento;
+
+ private Comune comune;
+
+ private Nazione nazione;
+
+ private Nazione nazioneSped;
+
+ private Comune comuneSped;
+
+ private long id_cliforEscludi;
+
+ private String indirizzo;
+
+ private long flgMlCreata = 0L;
+
+ private String mailingListEmail;
+
+ private long flgMl = -1L;
+
+ private String searchTxt2;
+
+ private String numeroDocumento;
+
+ private Date DataScadenzaDocumento;
+
+ private double percProvvigione;
+
+ private long flgNascondiWeb = -1L;
+
+ private String fileName;
+
+ private String descrizioneComune;
+
+ private String provinciaComune;
+
+ private Clifor agente;
+
+ private long id_agente;
+
+ private long id_respCommerciale;
+
+ private Clifor respCommerciale;
+
+ private long id_tipoClifor;
+
+ private long flgPA = -1L;
+
+ private long flgSplitPayment = -1L;
+
+ private long flgTaxFree = -1L;
+
+ private long id_usersResponsabile;
+
+ private Users usersResponsabile;
+
+ private long flgStatoConfermaDati = -1L;
+
+ private long id_usersAttivita;
+
+ private Users usersAttivita;
+
+ private long flgEscludi = -1L;
+
+ public CliforCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public CliforCR() {}
+
+ public void setId_clifor(long newId_cliFor) {
+ this.id_clifor = newId_cliFor;
+ }
+
+ public void setId_tipoPagamento(long newId_tipoPagamento) {
+ this.id_tipoPagamento = newId_tipoPagamento;
+ setTipoPagamento(null);
+ }
+
+ public void setCodiceAlt(String newCodiceAlt) {
+ this.codiceAlt = newCodiceAlt;
+ }
+
+ public void setFlgValido(long newFlgValido) {
+ this.flgValido = newFlgValido;
+ }
+
+ public void setFlgTipo(String newFlgTipo) {
+ this.flgTipo = newFlgTipo;
+ }
+
+ public void setFlgAzienda(long newFlgAzienda) {
+ this.flgAzienda = newFlgAzienda;
+ }
+
+ public void setCognome(String newCognome) {
+ this.cognome = newCognome;
+ }
+
+ public void setContatto(String newContatto) {
+ this.contatto = newContatto;
+ }
+
+ public void setNome(String newNome) {
+ this.nome = newNome;
+ }
+
+ public void setIndirizzo(String newIndirizzo) {
+ this.indirizzo = newIndirizzo;
+ }
+
+ public void setNumeroCivico(String newNumeroCivico) {
+ this.numeroCivico = newNumeroCivico;
+ }
+
+ public void setId_comune(long newId_comune) {
+ this.id_comune = newId_comune;
+ setComune(null);
+ }
+
+ public void setId_nazione(long newId_nazione) {
+ this.id_nazione = newId_nazione;
+ setNazione(null);
+ }
+
+ public void setDataNascita(Date newDataNascita) {
+ this.dataNascita = newDataNascita;
+ }
+
+ public void setCodFisc(String newCodFisc) {
+ this.codFisc = newCodFisc;
+ }
+
+ public void setPIva(String newPIva) {
+ this.pIva = newPIva;
+ }
+
+ public void setEMail(String newEMail) {
+ this.eMail = newEMail;
+ }
+
+ public void setFax(String newFax) {
+ this.fax = newFax;
+ }
+
+ public void setTelefono(String newTelefono) {
+ this.telefono = newTelefono;
+ }
+
+ public void setNota(String newNota) {
+ this.nota = newNota;
+ }
+
+ public void setImgTmst(String newImgTmst) {
+ this.imgTmst = newImgTmst;
+ }
+
+ public void setFlgPrivComunicazione(long newFlgPrivComunicazione) {
+ this.flgPrivComunicazione = newFlgPrivComunicazione;
+ }
+
+ public void setFlgPrivSensibili(long newFlgPrivSensibili) {
+ this.flgPrivSensibili = newFlgPrivSensibili;
+ }
+
+ public void setFlgPrivTrattamento(long newFlgPrivTrattamento) {
+ this.flgPrivTrattamento = newFlgPrivTrattamento;
+ }
+
+ public void setFlgSesso(long newFlgSesso) {
+ this.flgSesso = newFlgSesso;
+ }
+
+ public void setIndirizzoSped(String newIndirizzoSped) {
+ this.indirizzoSped = newIndirizzoSped;
+ }
+
+ public void setNumeroCivicoSped(String newNumeroCivicoSped) {
+ this.numeroCivicoSped = newNumeroCivicoSped;
+ }
+
+ public void setPresso(String newPresso) {
+ this.presso = newPresso;
+ }
+
+ public void setId_nazioneSped(long newId_nazioneSped) {
+ this.id_nazioneSped = newId_nazioneSped;
+ setNazione(null);
+ }
+
+ public void setId_comuneSped(long newId_comuneSped) {
+ this.id_comuneSped = newId_comuneSped;
+ setComune(null);
+ }
+
+ public void setDataRegistrazioneDI(Date newDataRegistrazioneDI) {
+ this.dataRegistrazioneDI = newDataRegistrazioneDI;
+ }
+
+ public void setDichiarazioneIntento(String newDichiarazioneIntento) {
+ this.dichiarazioneIntento = newDichiarazioneIntento;
+ }
+
+ public void setFlgArt8(long newFlgArt8) {
+ this.flgArt8 = newFlgArt8;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public long getId_tipoPagamento() {
+ return this.id_tipoPagamento;
+ }
+
+ public String getCodiceAlt() {
+ return (this.codiceAlt == null) ? "" : this.codiceAlt.trim();
+ }
+
+ public long getFlgValido() {
+ return this.flgValido;
+ }
+
+ public String getFlgTipo() {
+ return (this.flgTipo == null) ? "" : this.flgTipo.trim();
+ }
+
+ public String getTipo() {
+ return Clifor.getTipo(getFlgTipo());
+ }
+
+ public long getFlgAzienda() {
+ return this.flgAzienda;
+ }
+
+ public String getCognome() {
+ return (this.cognome == null) ? "" : this.cognome.trim();
+ }
+
+ public String getContatto() {
+ return (this.contatto == null) ? "" : this.contatto.trim();
+ }
+
+ public String getNome() {
+ return (this.nome == null) ? "" : this.nome.trim();
+ }
+
+ public String getIndirizzo() {
+ return (this.indirizzo == null) ? "" : this.indirizzo.trim();
+ }
+
+ public String getNumeroCivico() {
+ return (this.numeroCivico == null) ? "" : this.numeroCivico.trim();
+ }
+
+ public long getId_comune() {
+ return this.id_comune;
+ }
+
+ public long getId_nazione() {
+ return this.id_nazione;
+ }
+
+ public Date getDataNascita() {
+ return this.dataNascita;
+ }
+
+ public String getCodFisc() {
+ return (this.codFisc == null) ? "" : this.codFisc.trim();
+ }
+
+ public String getPIva() {
+ return (this.pIva == null) ? "" : this.pIva.trim();
+ }
+
+ public String getEMail() {
+ return (this.eMail == null) ? "" : this.eMail.trim();
+ }
+
+ public String getFax() {
+ return (this.fax == null) ? "" : this.fax.trim();
+ }
+
+ public String getTelefono() {
+ return (this.telefono == null) ? "" : this.telefono.trim();
+ }
+
+ public String getNota() {
+ return (this.nota == null) ? "" : this.nota.trim();
+ }
+
+ public String getImgTmst() {
+ return (this.imgTmst == null) ? "" : this.imgTmst.trim();
+ }
+
+ public long getFlgPrivComunicazione() {
+ return this.flgPrivComunicazione;
+ }
+
+ public long getFlgPrivSensibili() {
+ return this.flgPrivSensibili;
+ }
+
+ public long getFlgPrivTrattamento() {
+ return this.flgPrivTrattamento;
+ }
+
+ public long getFlgSesso() {
+ return this.flgSesso;
+ }
+
+ public String getIndirizzoSped() {
+ return (this.indirizzoSped == null) ? "" : this.indirizzoSped.trim();
+ }
+
+ public String getNumeroCivicoSped() {
+ return (this.numeroCivicoSped == null) ? "" : this.numeroCivicoSped.trim();
+ }
+
+ public String getPresso() {
+ return (this.presso == null) ? "" : this.presso.trim();
+ }
+
+ public long getId_nazioneSped() {
+ return this.id_nazioneSped;
+ }
+
+ public long getId_comuneSped() {
+ return this.id_comuneSped;
+ }
+
+ public Date getDataRegistrazioneDI() {
+ return this.dataRegistrazioneDI;
+ }
+
+ public String getDichiarazioneIntento() {
+ return (this.dichiarazioneIntento == null) ? "" : this.dichiarazioneIntento.trim();
+ }
+
+ public long getFlgArt8() {
+ return this.flgArt8;
+ }
+
+ public void setTipoPagamento(TipoPagamento newTipoPagamento) {
+ this.tipoPagamento = newTipoPagamento;
+ }
+
+ public TipoPagamento getTipoPagamento() {
+ this.tipoPagamento = (TipoPagamento)getSecondaryObject(this.tipoPagamento, TipoPagamento.class, getId_tipoPagamento());
+ return this.tipoPagamento;
+ }
+
+ public void setComune(Comune newComune) {
+ this.comune = newComune;
+ }
+
+ public Comune getComune() {
+ this.comune = (Comune)getSecondaryObject(this.comune, Comune.class, getId_comune());
+ return this.comune;
+ }
+
+ public void setNazione(Nazione newNazione) {
+ this.nazione = newNazione;
+ }
+
+ public Nazione getNazione() {
+ this.nazione = (Nazione)getSecondaryObject(this.nazione, Nazione.class, getId_nazione());
+ return this.nazione;
+ }
+
+ public void setNazioneSped(Nazione newNazione) {
+ this.nazioneSped = newNazione;
+ }
+
+ public Nazione getNazioneSped() {
+ this.nazioneSped = (Nazione)getSecondaryObject(this.nazioneSped, Nazione.class, getId_nazioneSped());
+ return this.nazioneSped;
+ }
+
+ public void setComuneSped(Comune newComune) {
+ this.comuneSped = newComune;
+ }
+
+ public Comune getComuneSped() {
+ this.comuneSped = (Comune)getSecondaryObject(this.comuneSped, Comune.class, getId_comuneSped());
+ return this.comuneSped;
+ }
+
+ public String getFlgCF() {
+ return (this.flgCF == null) ? AB_EMPTY_STRING : this.flgCF;
+ }
+
+ public String getCF() {
+ if (getFlgCF().equals("C"))
+ return "Cliente";
+ if (getFlgCF().equals("F"))
+ return "Fornitore";
+ return AB_EMPTY_STRING;
+ }
+
+ public void setFlgCF(String flgCF) {
+ this.flgCF = flgCF;
+ setFlgTipo(flgCF);
+ }
+
+ public long getId_cliforEscludi() {
+ return this.id_cliforEscludi;
+ }
+
+ public void setId_cliforEscludi(long id_cliforEscludi) {
+ this.id_cliforEscludi = id_cliforEscludi;
+ }
+
+ public String getTestoMessaggio() {
+ return (this.testoMessaggio == null) ? AB_EMPTY_STRING : this.testoMessaggio.trim();
+ }
+
+ public void setTestoMessaggio(String testoMessaggio) {
+ this.testoMessaggio = testoMessaggio;
+ }
+
+ public long getFlgMlCreata() {
+ return this.flgMlCreata;
+ }
+
+ public void setFlgMlCreata(long flgMlCreata) {
+ this.flgMlCreata = flgMlCreata;
+ }
+
+ public String getMailingListEmail() {
+ return this.mailingListEmail;
+ }
+
+ public void setMailingListEmail(String mailingListEmail) {
+ this.mailingListEmail = mailingListEmail;
+ }
+
+ public long getFlgMl() {
+ return this.flgMl;
+ }
+
+ public void setFlgMl(long flgMl) {
+ this.flgMl = flgMl;
+ }
+
+ public String getSearchTxt2() {
+ return (this.searchTxt2 == null) ? AB_EMPTY_STRING : this.searchTxt2;
+ }
+
+ public void setSearchTxt2(String searchText2) {
+ this.searchTxt2 = searchText2;
+ }
+
+ public String getNumeroDocumento() {
+ return this.numeroDocumento;
+ }
+
+ public void setNumeroDocumento(String numeroDocumento) {
+ this.numeroDocumento = numeroDocumento;
+ }
+
+ public Date getDataScadenzaDocumento() {
+ return this.DataScadenzaDocumento;
+ }
+
+ public void setDataScadenzaDocumento(Date dataScadenzaDocumento) {
+ this.DataScadenzaDocumento = dataScadenzaDocumento;
+ }
+
+ public double getPercProvvigione() {
+ return this.percProvvigione;
+ }
+
+ public void setPercProvvigione(double percProvvigione) {
+ this.percProvvigione = percProvvigione;
+ }
+
+ public long getFlgNascondiWeb() {
+ return this.flgNascondiWeb;
+ }
+
+ public void setFlgNascondiWeb(long flgVisibileWeb) {
+ this.flgNascondiWeb = flgVisibileWeb;
+ }
+
+ public long getFlgTipologiaClifor() {
+ return this.flgTipologiaClifor;
+ }
+
+ public void setFlgTipologiaClifor(long flgTipologiaClifor) {
+ this.flgTipologiaClifor = flgTipologiaClifor;
+ }
+
+ public String getFileName() {
+ return (this.fileName == null) ? AB_EMPTY_STRING : this.fileName.trim();
+ }
+
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+
+ public String getpIva() {
+ return this.pIva;
+ }
+
+ public void setpIva(String pIva) {
+ this.pIva = pIva;
+ }
+
+ public String geteMail() {
+ return this.eMail;
+ }
+
+ public void seteMail(String eMail) {
+ this.eMail = eMail;
+ }
+
+ public String getDescrizioneComune() {
+ return (this.descrizioneComune == null) ? AB_EMPTY_STRING : this.descrizioneComune;
+ }
+
+ public void setDescrizioneComune(String descrizioneComune) {
+ this.descrizioneComune = descrizioneComune;
+ }
+
+ public String getProvinciaComune() {
+ return (this.provinciaComune == null) ? AB_EMPTY_STRING : this.provinciaComune;
+ }
+
+ public void setProvinciaComune(String provinciaComune) {
+ this.provinciaComune = provinciaComune;
+ }
+
+ public Clifor getAgente() {
+ this.agente = (Clifor)getSecondaryObject(this.agente, Clifor.class, getId_agente());
+ return this.agente;
+ }
+
+ public long getId_agente() {
+ return this.id_agente;
+ }
+
+ public long getId_respCommerciale() {
+ return this.id_respCommerciale;
+ }
+
+ public Clifor getRespCommerciale() {
+ this.respCommerciale = (Clifor)getSecondaryObject(this.respCommerciale, Clifor.class, getId_respCommerciale());
+ return this.respCommerciale;
+ }
+
+ public void setAgente(Clifor agente) {
+ this.agente = agente;
+ }
+
+ public void setId_agente(long id_agente) {
+ this.id_agente = id_agente;
+ }
+
+ public void setId_respCommerciale(long id_respCommerciale) {
+ this.id_respCommerciale = id_respCommerciale;
+ }
+
+ public void setRespCommerciale(Clifor respCommerciale) {
+ this.respCommerciale = respCommerciale;
+ }
+
+ public long getId_tipoClifor() {
+ return this.id_tipoClifor;
+ }
+
+ public void setId_tipoClifor(long id_tipoClifor) {
+ this.id_tipoClifor = id_tipoClifor;
+ }
+
+ public long getFlgPA() {
+ return this.flgPA;
+ }
+
+ public void setFlgPA(long flgPA) {
+ this.flgPA = flgPA;
+ }
+
+ public long getFlgSplitPayment() {
+ return this.flgSplitPayment;
+ }
+
+ public void setFlgSplitPayment(long flgSplitPayment) {
+ this.flgSplitPayment = flgSplitPayment;
+ }
+
+ public long getFlgTaxFree() {
+ return this.flgTaxFree;
+ }
+
+ public void setFlgTaxFree(long flgTaxFree) {
+ this.flgTaxFree = flgTaxFree;
+ }
+
+ public long getId_usersResponsabile() {
+ return this.id_usersResponsabile;
+ }
+
+ public Users getUsersResponsabile() {
+ this.usersResponsabile = (Users)getSecondaryObject((DBAdapter)this.usersResponsabile, Users.class, getId_usersResponsabile());
+ return this.usersResponsabile;
+ }
+
+ public void setId_usersResponsabile(long id_usersResponsabile) {
+ this.id_usersResponsabile = id_usersResponsabile;
+ setUsersResponsabile(null);
+ }
+
+ public void setUsersResponsabile(Users usersResponsabile) {
+ this.usersResponsabile = usersResponsabile;
+ }
+
+ public long getFlgStatoConfermaDati() {
+ return this.flgStatoConfermaDati;
+ }
+
+ public void setFlgStatoConfermaDati(long flgStatoConfermaDati) {
+ this.flgStatoConfermaDati = flgStatoConfermaDati;
+ }
+
+ public static final String getStatoConfermaDati(long l_flgStatoConfermaDati) {
+ return Clifor.getStatoConfermaDati(l_flgStatoConfermaDati);
+ }
+
+ public final String getStatoConfermaDati() {
+ return getStatoConfermaDati(getFlgStatoConfermaDati());
+ }
+
+ public long getId_usersAttivita() {
+ return this.id_usersAttivita;
+ }
+
+ public Users getUsersAttivita() {
+ this.usersAttivita = (Users)getSecondaryObject((DBAdapter)this.usersAttivita, Users.class, getId_usersAttivita());
+ return this.usersAttivita;
+ }
+
+ public void setId_usersAttivita(long id_usersAttivita) {
+ this.id_usersAttivita = id_usersAttivita;
+ setUsersAttivita(null);
+ }
+
+ public void setUsersAttivita(Users usersAttivita) {
+ this.usersAttivita = usersAttivita;
+ }
+
+ public long getFlgEscludi() {
+ return this.flgEscludi;
+ }
+
+ public void setFlgEscludi(long flgEscludi) {
+ this.flgEscludi = flgEscludi;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforInterface.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforInterface.java
new file mode 100644
index 00000000..6a303a8f
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforInterface.java
@@ -0,0 +1,267 @@
+package it.acxent.anag;
+
+import it.acxent.db.ResParm;
+import it.acxent.util.Vectumerator;
+import java.sql.Date;
+
+public interface CliforInterface {
+ void setId_clifor(long paramLong);
+
+ void setId_tipoPagamento(long paramLong);
+
+ void setCodiceAlt(String paramString);
+
+ void setFlgValido(long paramLong);
+
+ void setFlgTipo(String paramString);
+
+ void setFlgAzienda(long paramLong);
+
+ void setCognome(String paramString);
+
+ void setContatto(String paramString);
+
+ void setNome(String paramString);
+
+ void setIndirizzo(String paramString);
+
+ void setNumeroCivico(String paramString);
+
+ void setId_comune(long paramLong);
+
+ void setId_nazione(String paramString);
+
+ void setDataNascita(Date paramDate);
+
+ void setCodFisc(String paramString);
+
+ void setPIva(String paramString);
+
+ void setEMail(String paramString);
+
+ void setFax(String paramString);
+
+ void setTelefono(String paramString);
+
+ void setNota(String paramString);
+
+ void setImgTmst(String paramString);
+
+ void setFlgPrivComunicazione(long paramLong);
+
+ void setFlgPrivSensibili(long paramLong);
+
+ void setFlgPrivTrattamento(long paramLong);
+
+ void setFlgSesso(long paramLong);
+
+ void setWww(String paramString);
+
+ void setDataRegistrazioneDI(Date paramDate);
+
+ void setDichiarazioneIntento(String paramString);
+
+ void setFlgArt8(long paramLong);
+
+ long getId_clifor();
+
+ long getId_tipoPagamento();
+
+ String getCodiceAlt();
+
+ long getFlgValido();
+
+ String getFlgTipo();
+
+ String getTipo();
+
+ long getFlgAzienda();
+
+ String getDescrizioneCompleta();
+
+ String getCognomeNome();
+
+ String getContatto();
+
+ String getNome();
+
+ String getIndirizzo();
+
+ String getIndirizzoCompleto();
+
+ String getIndirizzoCompletoHtml();
+
+ String getNumeroCivico();
+
+ long getId_comune();
+
+ String getId_nazione();
+
+ Date getDataNascita();
+
+ String getCodFisc();
+
+ String getPIva();
+
+ String getEMail();
+
+ String getFax();
+
+ String getTelefono();
+
+ String getNota();
+
+ String getImgTmst();
+
+ long getFlgPrivComunicazione();
+
+ long getFlgPrivSensibili();
+
+ long getFlgPrivTrattamento();
+
+ long getFlgSesso();
+
+ String getWww();
+
+ Date getDataRegistrazioneDI();
+
+ String getDichiarazioneIntento();
+
+ long getFlgArt8();
+
+ void setTipoPagamento(TipoPagamento paramTipoPagamento);
+
+ TipoPagamento getTipoPagamento();
+
+ void setComune(Comune paramComune);
+
+ Comune getComune();
+
+ void setNazione(Nazione paramNazione);
+
+ Nazione getNazione();
+
+ void findByCF(String paramString1, String paramString2);
+
+ void findByPIva(String paramString1, String paramString2);
+
+ String getCodFiscCalc();
+
+ boolean isCodFiscDuplicated();
+
+ boolean isPIvaDuplicated();
+
+ boolean isPIvaCodfiscDuplicated();
+
+ boolean isCodFiscOk();
+
+ long getId_comuneNascita();
+
+ void setId_comuneNascita(long paramLong);
+
+ Comune getComuneNascita();
+
+ void setComuneNascita(Comune paramComune);
+
+ String getSesso();
+
+ Vectumerator findUsers(int paramInt1, int paramInt2);
+
+ String getCognome();
+
+ String getIban();
+
+ void setIban(String paramString);
+
+ String getAbi();
+
+ String getCab();
+
+ String getConto();
+
+ String getCapZona();
+
+ void setCapZona(String paramString);
+
+ Vectumerator getDestinazioniDiverse();
+
+ ResParm addDestinazioneDiversa(DestinazioneDiversa paramDestinazioneDiversa);
+
+ ResParm delDestinazioneDiversa(DestinazioneDiversa paramDestinazioneDiversa);
+
+ String getCellulare();
+
+ void setCellulare(String paramString);
+
+ String getBancaDesc();
+
+ void setBancaDesc(String paramString);
+
+ String getBancaCompleto();
+
+ long getId_listino();
+
+ void setId_listino(long paramLong);
+
+ Listino getListino();
+
+ void setListino(Listino paramListino);
+
+ long getCloseCommand();
+
+ void setCloseCommand(long paramLong);
+
+ Clifor getCliforDup();
+
+ void setId_cliforDup(long paramLong);
+
+ long getId_cliforDup();
+
+ void setCliforDup(Clifor paramClifor);
+
+ Vectumerator getContratti();
+
+ ResParm addContratto(Contratto paramContratto);
+
+ ResParm delContratto(Contratto paramContratto);
+
+ ResParm creaMailingListCR(CliforCR paramCliforCR);
+
+ void resetMailingListFileCR();
+
+ boolean addToMailingListFileCR();
+
+ String getMailingMailCR();
+
+ long getFlgMl();
+
+ void setFlgMl(long paramLong);
+
+ Vectumerator findByCR(CliforCR paramCliforCR, int paramInt1, int paramInt2);
+
+ String getDescrizioneComune();
+
+ void setDescrizioneComune(String paramString);
+
+ String getProvinciaComune();
+
+ void setProvinciaComune(String paramString);
+
+ String getCapComune();
+
+ void setCapComune(String paramString);
+
+ String getPathAllegato();
+
+ Vectumerator getAllegati(long paramLong);
+
+ ResParm addAllegato(AllegatoClifor paramAllegatoClifor);
+
+ ResParm delAllegato(AllegatoClifor paramAllegatoClifor);
+
+ void creaCodaMessaggi(CliforCR paramCliforCR, long paramLong);
+
+ long getFlgRC();
+
+ void setFlgRC(long paramLong);
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforLog.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforLog.java
new file mode 100644
index 00000000..3ad02cc1
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforLog.java
@@ -0,0 +1,154 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.Date;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class CliforLog extends DBAdapter implements Serializable {
+ private static final long serialVersionUID = 1698338319657L;
+
+ private long id_cliforLog;
+
+ private long id_clifor;
+
+ private long id_users;
+
+ private Date dataCliforlog;
+
+ private String descrizioneCliforlog;
+
+ private Clifor clifor;
+
+ private Users users;
+
+ public CliforLog(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public CliforLog() {}
+
+ public void setId_cliforLog(long newId_cliforLog) {
+ this.id_cliforLog = newId_cliforLog;
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public void setId_users(long newId_users) {
+ this.id_users = newId_users;
+ setUsers(null);
+ }
+
+ public void setDataCliforlog(Date newDataCliforlog) {
+ this.dataCliforlog = newDataCliforlog;
+ }
+
+ public void setDescrizioneCliforlog(String newDescrizioneCliforlog) {
+ this.descrizioneCliforlog = newDescrizioneCliforlog;
+ }
+
+ public long getId_cliforLog() {
+ return this.id_cliforLog;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public long getId_users() {
+ return this.id_users;
+ }
+
+ public Date getDataCliforlog() {
+ return this.dataCliforlog;
+ }
+
+ public String getDescrizioneCliforlog() {
+ return (this.descrizioneCliforlog == null) ? "" : this.descrizioneCliforlog.trim();
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class, getId_clifor());
+ return this.clifor;
+ }
+
+ public void setUsers(Users newUsers) {
+ this.users = newUsers;
+ }
+
+ public Users getUsers() {
+ this.users = (Users)getSecondaryObject((DBAdapter)this.users, Users.class, getId_users());
+ return this.users;
+ }
+
+ protected ResParm checkDeleteCascade() {
+ return new ResParm(true);
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(CliforLogCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from CLIFOR_LOG AS A";
+ String s_Sql_Order = " order by A.lastUpdTmst desc";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public Vectumerator findByClifor(long l_id_clifor, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from CLIFOR_LOG AS A";
+ String s_Sql_Order = " order by A.lastUpdTmst desc";
+ WcString wc = new WcString();
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public ResParm save() {
+ if (getDBState() == 0)
+ setDataCliforlog(getToday());
+ return super.save();
+ }
+
+ public ResParm save(long l_flgStatoConfermaDatiDb) {
+ setDescrizioneCliforlog(Clifor.getStatoConfermaDati(l_flgStatoConfermaDatiDb) + "-->" + Clifor.getStatoConfermaDati(l_flgStatoConfermaDatiDb) + ": " + getClifor().getStatoConfermaDati());
+ return save();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforLogCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforLogCR.java
new file mode 100644
index 00000000..8fd7b646
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforLogCR.java
@@ -0,0 +1,103 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import java.sql.Date;
+import java.sql.Timestamp;
+
+public class CliforLogCR extends CRAdapter {
+ private long id_cliforLog;
+
+ private long id_clifor;
+
+ private long id_users;
+
+ private Timestamp tsCliforlog;
+
+ private Date dataCliforlog;
+
+ private String descrizioneCliforlog;
+
+ private Clifor clifor;
+
+ private Users users;
+
+ public CliforLogCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public CliforLogCR() {}
+
+ public void setId_cliforLog(long newId_cliforLog) {
+ this.id_cliforLog = newId_cliforLog;
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public void setId_users(long newId_users) {
+ this.id_users = newId_users;
+ setUsers(null);
+ }
+
+ public void setTsCliforlog(Timestamp newTsCliforlog) {
+ this.tsCliforlog = newTsCliforlog;
+ }
+
+ public void setDataCliforlog(Date newDataCliforlog) {
+ this.dataCliforlog = newDataCliforlog;
+ }
+
+ public void setDescrizioneCliforlog(String newDescrizioneCliforlog) {
+ this.descrizioneCliforlog = newDescrizioneCliforlog;
+ }
+
+ public long getId_cliforLog() {
+ return this.id_cliforLog;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public long getId_users() {
+ return this.id_users;
+ }
+
+ public Timestamp getTsCliforlog() {
+ return this.tsCliforlog;
+ }
+
+ public Date getDataCliforlog() {
+ return this.dataCliforlog;
+ }
+
+ public String getDescrizioneCliforlog() {
+ return (this.descrizioneCliforlog == null) ? "" : this.descrizioneCliforlog.trim();
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class,
+
+ getId_clifor());
+ return this.clifor;
+ }
+
+ public void setUsers(Users newUsers) {
+ this.users = newUsers;
+ }
+
+ public Users getUsers() {
+ this.users = (Users)getSecondaryObject((DBAdapter)this.users, Users.class,
+
+ getId_users());
+ return this.users;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforTipoClifor.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforTipoClifor.java
new file mode 100644
index 00000000..1780d2fd
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforTipoClifor.java
@@ -0,0 +1,209 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class CliforTipoClifor extends _AnagAdapter implements Serializable {
+ private static final long serialVersionUID = -2647000200627619105L;
+
+ private long id_cliforTipoClifor;
+
+ private long id_clifor;
+
+ private long id_tipoClifor;
+
+ private Clifor clifor;
+
+ private TipoClifor tipoClifor;
+
+ private double percProvvigione;
+
+ public CliforTipoClifor(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public boolean isTipologiaCliforByClifor(long l_id_clifor, long l_id_tipoClifor) {
+ String s_Sql_Find = "select A.* from CLIFOR_TIPO_CLIFOR AS A ";
+ String s_Sql_Order = " ";
+ WcString wc = new WcString();
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ if (l_id_tipoClifor != 0L)
+ wc.addWc("A.id_tipoClifor=" + l_id_tipoClifor);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ Vectumerator vec = findRows(stmt, 1, 1);
+ if (vec.getTotNumberOfRecords() > 0)
+ return true;
+ return false;
+ } catch (SQLException e) {
+ handleDebug(e);
+ return false;
+ }
+ }
+
+ public CliforTipoClifor() {}
+
+ public void setId_tipoClifor(long newId_tipoClifor) {
+ this.id_tipoClifor = newId_tipoClifor;
+ }
+
+ public long getId_tipoClifor() {
+ return this.id_tipoClifor;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(CliforTipoCliforCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from CLIFOR_TIPO_CLIFOR AS A INNER JOIN TIPO_CLIFOR AS B ON A.id_tipoClifor = B.id_tipoClifor ";
+ String s_Sql_Order = " ";
+ WcString wc = new WcString();
+ if (CR.getId_clifor() != 0L)
+ wc.addWc("A.id_clifor=" + CR.getId_clifor());
+ if (!CR.getFlgTipoClifor().isEmpty())
+ wc.addWc("B.flgTipo='" + CR.getFlgTipoClifor() + "' ");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public long getId_cliforTipoClifor() {
+ return this.id_cliforTipoClifor;
+ }
+
+ public void setId_cliforTipoClifor(long id_cliforTipoClifor) {
+ this.id_cliforTipoClifor = id_cliforTipoClifor;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public void setId_clifor(long id_clifor) {
+ this.id_clifor = id_clifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class, getId_clifor());
+ return this.clifor;
+ }
+
+ public void setClifor(Clifor clifor) {
+ this.clifor = clifor;
+ }
+
+ public TipoClifor getTipoClifor() {
+ this.tipoClifor = (TipoClifor)getSecondaryObject(this.tipoClifor, TipoClifor.class, getId_tipoClifor());
+ return this.tipoClifor;
+ }
+
+ public void setTipoClifor(TipoClifor tipoClifor) {
+ this.tipoClifor = tipoClifor;
+ }
+
+ public boolean isRespondabileCommercialeByClifor(long l_id_clifor) {
+ String s_Sql_Find = "select A.* from CLIFOR_TIPO_CLIFOR AS A, TIPO_CLIFOR AS B";
+ String s_Sql_Order = " ";
+ WcString wc = new WcString();
+ wc.addWc("A.id_tipoClifor=B.id_tipoClifor");
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ wc.addWc("( B.flgTipologia=3)");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ Vectumerator vec = findRows(stmt, 1, 1);
+ if (vec.getTotNumberOfRecords() > 0)
+ return true;
+ return false;
+ } catch (SQLException e) {
+ return false;
+ }
+ }
+
+ public double getPercProvvigione() {
+ return this.percProvvigione;
+ }
+
+ public void setPercProvvigione(double percProvvigione) {
+ this.percProvvigione = percProvvigione;
+ }
+
+ public void findByCliforTipologia(long l_id_clifor, long l_flgTipologiaClifor) {
+ String s_Sql_Find = "select A.* from CLIFOR_TIPO_CLIFOR AS A, TIPO_CLIFOR AS B";
+ String s_Sql_Order = " ";
+ WcString wc = new WcString();
+ wc.addWc("A.id_tipoClifor=B.id_tipoClifor");
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ if (l_flgTipologiaClifor == 0L) {
+ wc.addWc("(B.flgTipologia is null or B.flgTipologia=0)");
+ } else if (l_flgTipologiaClifor > 0L) {
+ wc.addWc("B.flgTipologia=" + l_flgTipologiaClifor);
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public boolean isAgenteByClifor(long l_id_clifor) {
+ String s_Sql_Find = "select A.* from CLIFOR_TIPO_CLIFOR AS A, TIPO_CLIFOR AS B";
+ String s_Sql_Order = " ";
+ WcString wc = new WcString();
+ wc.addWc("A.id_tipoClifor=B.id_tipoClifor");
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ wc.addWc("(B.flgTipologia=1)");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ Vectumerator vec = findRows(stmt, 1, 1);
+ if (vec.getTotNumberOfRecords() > 0)
+ return true;
+ return false;
+ } catch (SQLException e) {
+ return false;
+ }
+ }
+
+ public boolean isProgettistaByClifor(long l_id_clifor) {
+ String s_Sql_Find = "select A.* from CLIFOR_TIPO_CLIFOR AS A, TIPO_CLIFOR AS B";
+ String s_Sql_Order = " ";
+ WcString wc = new WcString();
+ wc.addWc("A.id_tipoClifor=B.id_tipoClifor");
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ wc.addWc("(B.flgTipologia=2)");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ Vectumerator vec = findRows(stmt, 1, 1);
+ if (vec.getTotNumberOfRecords() > 0)
+ return true;
+ return false;
+ } catch (SQLException e) {
+ return false;
+ }
+ }
+
+ public boolean isAgenteORespondabileCommercialeByClifor(long l_id_clifor) {
+ String s_Sql_Find = "select A.* from CLIFOR_TIPO_CLIFOR AS A, TIPO_CLIFOR AS B";
+ String s_Sql_Order = " ";
+ WcString wc = new WcString();
+ wc.addWc("A.id_tipoClifor=B.id_tipoClifor");
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ wc.addWc("(B.flgTipologia=1 or B.flgTipologia=3)");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ Vectumerator vec = findRows(stmt, 1, 1);
+ if (vec.getTotNumberOfRecords() > 0)
+ return true;
+ return false;
+ } catch (SQLException e) {
+ return false;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforTipoCliforCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforTipoCliforCR.java
new file mode 100644
index 00000000..49d951d5
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforTipoCliforCR.java
@@ -0,0 +1,77 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import java.io.Serializable;
+
+public class CliforTipoCliforCR extends CRAdapter implements Serializable {
+ private long id_cliforTipoClifor;
+
+ private long id_clifor;
+
+ private long id_tipoClifor;
+
+ private Clifor clifor;
+
+ private TipoClifor tipoClifor;
+
+ private String flgTipoClifor;
+
+ public CliforTipoCliforCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public CliforTipoCliforCR() {}
+
+ public void setId_tipoClifor(long newId_causaleMagazzino) {
+ this.id_tipoClifor = newId_causaleMagazzino;
+ }
+
+ public long getId_tipoClifor() {
+ return this.id_tipoClifor;
+ }
+
+ public long getId_cliforTipoClifor() {
+ return this.id_cliforTipoClifor;
+ }
+
+ public void setId_cliforTipoClifor(long id_cliforTipoClifor) {
+ this.id_cliforTipoClifor = id_cliforTipoClifor;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public void setId_clifor(long id_clifor) {
+ this.id_clifor = id_clifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class,
+ getId_clifor());
+ return this.clifor;
+ }
+
+ public void setClifor(Clifor clifor) {
+ this.clifor = clifor;
+ }
+
+ public TipoClifor getTipoClifor() {
+ this.tipoClifor = (TipoClifor)getSecondaryObject(this.tipoClifor, TipoClifor.class,
+ getId_tipoClifor());
+ return this.tipoClifor;
+ }
+
+ public void setTipoClifor(TipoClifor tipoClifor) {
+ this.tipoClifor = tipoClifor;
+ }
+
+ public String getFlgTipoClifor() {
+ return this.flgTipoClifor;
+ }
+
+ public void setFlgTipoClifor(String flgTipoClifor) {
+ this.flgTipoClifor = flgTipoClifor;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforTipoPagamento.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforTipoPagamento.java
new file mode 100644
index 00000000..1db6ca7e
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforTipoPagamento.java
@@ -0,0 +1,130 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class CliforTipoPagamento extends DBAdapter implements Serializable {
+ private static final long serialVersionUID = 1647264568430L;
+
+ private long id_cliforTipoPagamento;
+
+ private long id_clifor;
+
+ private long id_tipoPagamento;
+
+ private Clifor clifor;
+
+ private TipoPagamento tipoPagamento;
+
+ public CliforTipoPagamento(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public CliforTipoPagamento() {}
+
+ public void setId_cliforTipoPagamento(long newId_cliforTipoPagamento) {
+ this.id_cliforTipoPagamento = newId_cliforTipoPagamento;
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public void setId_tipoPagamento(long newId_tipoPagamento) {
+ this.id_tipoPagamento = newId_tipoPagamento;
+ setTipoPagamento(null);
+ }
+
+ public long getId_cliforTipoPagamento() {
+ return this.id_cliforTipoPagamento;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public long getId_tipoPagamento() {
+ return this.id_tipoPagamento;
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class,
+
+ getId_clifor());
+ return this.clifor;
+ }
+
+ public void setTipoPagamento(TipoPagamento newTipoPagamento) {
+ this.tipoPagamento = newTipoPagamento;
+ }
+
+ public TipoPagamento getTipoPagamento() {
+ this.tipoPagamento = (TipoPagamento)getSecondaryObject(this.tipoPagamento, TipoPagamento.class,
+
+ getId_tipoPagamento());
+ return this.tipoPagamento;
+ }
+
+ protected ResParm checkDeleteCascade() {
+ return new ResParm(true);
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(CliforTipoPagamentoCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from CLIFOR_TIPO_PAGAMENTO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public Vectumerator findByClifor(long l_id_clifor) {
+ String s_Sql_Find = "select A.* from CLIFOR_TIPO_PAGAMENTO AS A inner join TIPO_PAGAMENTO AS B on A.id_tipoPagamento=B.id_tipoPagamento";
+ String s_Sql_Order = " order by descrizione_it";
+ WcString wc = new WcString();
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public ResParm save() {
+ return super.save();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforTipoPagamentoCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforTipoPagamentoCR.java
new file mode 100644
index 00000000..42e3c72b
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/CliforTipoPagamentoCR.java
@@ -0,0 +1,70 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class CliforTipoPagamentoCR extends CRAdapter {
+ private long id_cliforTipoPagamento;
+
+ private long id_clifor;
+
+ private long id_tipoPagamento;
+
+ private Clifor clifor;
+
+ private TipoPagamento tipoPagamento;
+
+ public CliforTipoPagamentoCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public CliforTipoPagamentoCR() {}
+
+ public void setId_cliforTipoPagamento(long newId_cliforTipoPagamento) {
+ this.id_cliforTipoPagamento = newId_cliforTipoPagamento;
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public void setId_tipoPagamento(long newId_tipoPagamento) {
+ this.id_tipoPagamento = newId_tipoPagamento;
+ setTipoPagamento(null);
+ }
+
+ public long getId_cliforTipoPagamento() {
+ return this.id_cliforTipoPagamento;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public long getId_tipoPagamento() {
+ return this.id_tipoPagamento;
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class,
+
+ getId_clifor());
+ return this.clifor;
+ }
+
+ public void setTipoPagamento(TipoPagamento newTipoPagamento) {
+ this.tipoPagamento = newTipoPagamento;
+ }
+
+ public TipoPagamento getTipoPagamento() {
+ this.tipoPagamento = (TipoPagamento)getSecondaryObject(this.tipoPagamento, TipoPagamento.class,
+
+ getId_tipoPagamento());
+ return this.tipoPagamento;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Comune.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Comune.java
new file mode 100644
index 00000000..fe4634a1
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Comune.java
@@ -0,0 +1,267 @@
+package it.acxent.anag;
+
+import com.google.gson.Gson;
+import it.acxent.anag.json.JsonComune;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.sql.Timestamp;
+import java.util.Vector;
+
+public class Comune extends _AnagAdapter implements Serializable {
+ private static final long serialVersionUID = -8455737960994074428L;
+
+ private long id_comune;
+
+ private String id_regione;
+
+ private String codice;
+
+ private String descrizione;
+
+ private String provincia;
+
+ private String cap;
+
+ private String codiceComune;
+
+ private String codiceZona;
+
+ private Regione regione;
+
+ private long id_zona;
+
+ private Zona zona;
+
+ private String codiceTarga;
+
+ public Comune(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Comune() {}
+
+ public void setId_comune(long newId_comune) {
+ this.id_comune = newId_comune;
+ }
+
+ public void setId_regione(String newId_regione) {
+ this.id_regione = newId_regione;
+ setRegione(null);
+ }
+
+ public void setCodice(String newCodice) {
+ this.codice = newCodice;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setProvincia(String newProvincia) {
+ this.provincia = newProvincia;
+ }
+
+ public void setCap(String newCap) {
+ this.cap = newCap;
+ }
+
+ public void setCodiceComune(String newCodiceComune) {
+ this.codiceComune = newCodiceComune;
+ }
+
+ public void setCodiceZona(String newCodiceZona) {
+ this.codiceZona = newCodiceZona;
+ }
+
+ public long getId_comune() {
+ return this.id_comune;
+ }
+
+ public String getId_regione() {
+ return (this.id_regione == null) ? "" : this.id_regione.trim();
+ }
+
+ public String getCodice() {
+ return (this.codice == null) ? "" : this.codice.trim();
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public String getProvincia() {
+ return (this.provincia == null) ? "" : this.provincia.trim();
+ }
+
+ public String getCap() {
+ return (this.cap == null) ? "" : this.cap.trim();
+ }
+
+ public String getCodiceComune() {
+ return (this.codiceComune == null) ? "" : this.codiceComune.trim();
+ }
+
+ public String getCodiceZona() {
+ return (this.codiceZona == null) ? "" : this.codiceZona.trim();
+ }
+
+ public void setRegione(Regione newRegione) {
+ this.regione = newRegione;
+ }
+
+ public Regione getRegione() {
+ this.regione = (Regione)getSecondaryObject(this.regione, Regione.class, getId_regione());
+ return this.regione;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(ComuneCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from COMUNE AS A";
+ String s_Sql_Order = " order by A.descrizione";
+ if (CR.getFlgOrderBy() == 1L)
+ s_Sql_Order = " order by A.lastUpdTmst";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty())
+ wc.addWc("(A.descrizione like '%" + prepareSqlString(CR.getSearchTxt()) + "%' or A.codice like '%" +
+ prepareSqlString(CR.getSearchTxt()) + "%')");
+ if (!CR.getDescrizioneS().trim().isEmpty())
+ wc.addWc("(A.descrizione like '%" + CR.getDescrizioneS() + "%' or A.codice like '%" + CR.getDescrizioneS() + "%')");
+ if (!CR.getId_regioneS().isEmpty())
+ wc.addWc("A.id_regione='" + CR.getId_regioneS() + "'");
+ if (CR.getLastUpdTmst() != null)
+ wc.addWc("A.lastUpdTmst>?");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ if (CR.getLastUpdTmst() != null)
+ stmt.setTimestamp(1, CR.getLastUpdTmst());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getDescrizioneCompleta() {
+ return getCodice() + " " + getCodice();
+ }
+
+ public Vectumerator findByProv(String l_provincia) {
+ String s_Sql_Find = "select A.descrizione from COMUNE AS A";
+ String s_Sql_Order = " order by A.provincia";
+ WcString wc = new WcString();
+ wc.addWc("A.provincia='" + l_provincia + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public Vectumerator findByProvCom(String l_provincia, String l_comuneDesc) {
+ String s_Sql_Find = "select A.* from COMUNE AS A";
+ String s_Sql_Order = " order by A.provincia";
+ WcString wc = new WcString();
+ wc.addWc("A.provincia='" + l_provincia + "'");
+ wc.addWc("A.descrizione='" + l_comuneDesc + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public void findByCap(String l_cap) {
+ String s_Sql_Find = "select A.* from COMUNE AS A";
+ String s_Sql_Order = " order by A.provincia";
+ WcString wc = new WcString();
+ wc.addWc("A.cap='" + l_cap + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public void findByCodice(String l_codice) {
+ String s_Sql_Find = "select A.* from COMUNE AS A";
+ String s_Sql_Order = " order by A.provincia";
+ WcString wc = new WcString();
+ wc.addWc("A.codice='" + l_codice + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public Vectumerator findProvince() {
+ String s_Sql_Find = "select A.provincia from COMUNE AS A";
+ String s_Sql_Order = " order by A.provincia";
+ WcString wc = new WcString();
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public long getId_zona() {
+ return this.id_zona;
+ }
+
+ public void setId_zona(long id_zona) {
+ this.id_zona = id_zona;
+ setZona(null);
+ }
+
+ public Zona getZona() {
+ return this.zona;
+ }
+
+ public void setZona(Zona zona) {
+ this.zona = zona;
+ }
+
+ public String getJson(long l_tmst, int nPage) {
+ int pageRow = 40;
+ Comune bean = new Comune(getApFull());
+ ComuneCR CR = new ComuneCR(getApFull());
+ Vector vecJ = new Vector<>();
+ if (l_tmst > 0L)
+ CR.setLastUpdTmst(new Timestamp(l_tmst));
+ CR.setFlgOrderBy(1L);
+ Vectumerator vec = bean.findByCR(CR, nPage, pageRow);
+ while (vec.hasMoreElements()) {
+ Comune row = (Comune)vec.nextElement();
+ JsonComune jrow = new JsonComune();
+ jrow.setId_comune(row.getId_comune());
+ jrow.setDescrizione(row.getDescrizione());
+ jrow.setLastUpdTmst(row.getLastUpdTmst().getTime());
+ vecJ.add(jrow);
+ }
+ Gson gson = new Gson();
+ String res = gson.toJson(vecJ);
+ return res;
+ }
+
+ public String getCodiceTarga() {
+ return (this.codiceTarga == null) ? "" : this.codiceTarga.trim();
+ }
+
+ public void setCodiceTarga(String codiceTarga) {
+ this.codiceTarga = codiceTarga;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ComuneCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ComuneCR.java
new file mode 100644
index 00000000..82a0cf45
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ComuneCR.java
@@ -0,0 +1,127 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import java.sql.Timestamp;
+
+public class ComuneCR extends CRAdapter {
+ private long id_comune;
+
+ private String id_regioneS;
+
+ private String codice;
+
+ private String descrizioneS;
+
+ private String provincia;
+
+ private String cap;
+
+ private String codiceComune;
+
+ private String codiceZona;
+
+ private long lastUpdId_user;
+
+ private Timestamp lastUpdTmst;
+
+ private Regione regione;
+
+ public ComuneCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public ComuneCR() {}
+
+ public void setId_comune(long newId_comune) {
+ this.id_comune = newId_comune;
+ }
+
+ public void setId_regioneS(String newId_regione) {
+ this.id_regioneS = newId_regione;
+ setRegione(null);
+ }
+
+ public void setCodice(String newCodice) {
+ this.codice = newCodice;
+ }
+
+ public void setDescrizioneS(String newDescrizione) {
+ this.descrizioneS = newDescrizione;
+ }
+
+ public void setProvincia(String newProvincia) {
+ this.provincia = newProvincia;
+ }
+
+ public void setCap(String newCap) {
+ this.cap = newCap;
+ }
+
+ public void setCodiceComune(String newCodiceComune) {
+ this.codiceComune = newCodiceComune;
+ }
+
+ public void setCodiceZona(String newCodiceZona) {
+ this.codiceZona = newCodiceZona;
+ }
+
+ public void setLastUpdId_user(long newLastUpdId_user) {
+ this.lastUpdId_user = newLastUpdId_user;
+ }
+
+ public void setLastUpdTmst(Timestamp newLastUpdTmst) {
+ this.lastUpdTmst = newLastUpdTmst;
+ }
+
+ public long getId_comune() {
+ return this.id_comune;
+ }
+
+ public String getId_regioneS() {
+ return (this.id_regioneS == null) ? "" : this.id_regioneS.trim();
+ }
+
+ public String getCodice() {
+ return (this.codice == null) ? "" : this.codice.trim();
+ }
+
+ public String getDescrizioneS() {
+ return (this.descrizioneS == null) ? "" : this.descrizioneS.trim();
+ }
+
+ public String getProvincia() {
+ return (this.provincia == null) ? "" : this.provincia.trim();
+ }
+
+ public String getCap() {
+ return (this.cap == null) ? "" : this.cap.trim();
+ }
+
+ public String getCodiceComune() {
+ return (this.codiceComune == null) ? "" : this.codiceComune.trim();
+ }
+
+ public String getCodiceZona() {
+ return (this.codiceZona == null) ? "" : this.codiceZona.trim();
+ }
+
+ public long getLastUpdId_user() {
+ return this.lastUpdId_user;
+ }
+
+ public Timestamp getLastUpdTmst() {
+ return this.lastUpdTmst;
+ }
+
+ public void setRegione(Regione newRegione) {
+ this.regione = newRegione;
+ }
+
+ public Regione getRegione() {
+ this.regione = (Regione)getSecondaryObject(this.regione, Regione.class,
+
+ getId_regioneS());
+ return this.regione;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Contatore.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Contatore.java
new file mode 100644
index 00000000..720d3f12
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Contatore.java
@@ -0,0 +1,136 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class Contatore extends _AnagAdapter implements Serializable {
+ public static final int TIPO_ANNUALE = 1;
+
+ private long id_contatore;
+
+ private String descrizione;
+
+ private long flgTipo;
+
+ private long flgControllo;
+
+ private long annoIniziale;
+
+ private long progIniziale;
+
+ public static final int TIPO_MAGAZZINO = 3;
+
+ public static final int TIPO_CONTABILE = 2;
+
+ public Contatore(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Contatore() {}
+
+ public void setId_contatore(long newId_contatore) {
+ this.id_contatore = newId_contatore;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setFlgTipo(long newFlgTipo) {
+ this.flgTipo = newFlgTipo;
+ }
+
+ public void setFlgControllo(long newFlgControllo) {
+ this.flgControllo = newFlgControllo;
+ }
+
+ public long getId_contatore() {
+ return this.id_contatore;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" :
+ this.descrizione.trim();
+ }
+
+ public long getFlgTipo() {
+ return this.flgTipo;
+ }
+
+ public long getFlgControllo() {
+ return this.flgControllo;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(ContatoreCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from CONTATORE AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find +
+ wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public static String getTipo(long l_flgTipo) {
+ switch ((int)l_flgTipo) {
+ case 1:
+ return "Annuale";
+ case 2:
+ return "Contabile";
+ case 3:
+ return "Magazzino";
+ }
+ return "????";
+ }
+
+ public String getTipo() {
+ return getTipo(getFlgTipo());
+ }
+
+ public String getControllo() {
+ return (getFlgControllo() == 0L) ? "No" : "Si";
+ }
+
+ public long getAnnoIniziale() {
+ if (getFlgControllo() == 0L)
+ return 0L;
+ return this.annoIniziale;
+ }
+
+ public void setAnnoIniziale(long annoIniziale) {
+ this.annoIniziale = annoIniziale;
+ }
+
+ public long getProgIniziale() {
+ if (getFlgControllo() == 0L)
+ return 0L;
+ return this.progIniziale;
+ }
+
+ public void setProgIniziale(long progIniziale) {
+ this.progIniziale = progIniziale;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ContatoreCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ContatoreCR.java
new file mode 100644
index 00000000..cd2cad91
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ContatoreCR.java
@@ -0,0 +1,73 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import java.sql.Timestamp;
+
+public class ContatoreCR extends CRAdapter {
+ private long id_contatore;
+
+ private String descrizione;
+
+ private long flgTipo;
+
+ private long flgControllo;
+
+ private Timestamp lastUpdTmst;
+
+ private long lastUpdId_user;
+
+ public ContatoreCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public ContatoreCR() {}
+
+ public void setId_contatore(long newId_contatore) {
+ this.id_contatore = newId_contatore;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setFlgTipo(long newFlgTipo) {
+ this.flgTipo = newFlgTipo;
+ }
+
+ public void setFlgControllo(long newFlgControllo) {
+ this.flgControllo = newFlgControllo;
+ }
+
+ public void setLastUpdTmst(Timestamp newLastUpdTmst) {
+ this.lastUpdTmst = newLastUpdTmst;
+ }
+
+ public void setLastUpdId_user(long newLastUpdId_user) {
+ this.lastUpdId_user = newLastUpdId_user;
+ }
+
+ public long getId_contatore() {
+ return this.id_contatore;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public long getFlgTipo() {
+ return this.flgTipo;
+ }
+
+ public long getFlgControllo() {
+ return this.flgControllo;
+ }
+
+ public Timestamp getLastUpdTmst() {
+ return this.lastUpdTmst;
+ }
+
+ public long getLastUpdId_user() {
+ return this.lastUpdId_user;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Contatto.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Contatto.java
new file mode 100644
index 00000000..93e6af31
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Contatto.java
@@ -0,0 +1,155 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class Contatto extends DBAdapter implements Serializable {
+ private static final long serialVersionUID = 1489591448348L;
+
+ private long id_contatto;
+
+ private String descrizioneC;
+
+ private String nomeC;
+
+ private String telefonoC;
+
+ private String emailC;
+
+ private long id_clifor;
+
+ private Clifor clifor;
+
+ private long flgContattoDefault;
+
+ public Contatto(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Contatto() {}
+
+ public void setId_contatto(long newId_contatto) {
+ this.id_contatto = newId_contatto;
+ }
+
+ public void setDescrizioneC(String newDescrizione) {
+ this.descrizioneC = newDescrizione;
+ }
+
+ public void setNomeC(String newNome) {
+ this.nomeC = newNome;
+ }
+
+ public void setTelefonoC(String newTelefono) {
+ this.telefonoC = newTelefono;
+ }
+
+ public void setEmailC(String newEmail) {
+ this.emailC = newEmail;
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public long getId_contatto() {
+ return this.id_contatto;
+ }
+
+ public String getDescrizioneC() {
+ return (this.descrizioneC == null) ? "" : this.descrizioneC.trim();
+ }
+
+ public String getNomeC() {
+ return (this.nomeC == null) ? "" : this.nomeC.trim();
+ }
+
+ public String getTelefonoC() {
+ return (this.telefonoC == null) ? "" : this.telefonoC.trim();
+ }
+
+ public String getEmailC() {
+ return (this.emailC == null) ? "" : this.emailC.trim();
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class, getId_clifor());
+ return this.clifor;
+ }
+
+ protected ResParm checkDeleteCascade() {
+ return new ResParm(true);
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(ContattoCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from CONTATTO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public long getFlgContattoDefault() {
+ return this.flgContattoDefault;
+ }
+
+ public void setFlgContattoDefault(long flgContattoDefault) {
+ this.flgContattoDefault = flgContattoDefault;
+ }
+
+ public Vectumerator findByClifor(long l_id_clifor) {
+ String s_Sql_Find = "select A.* from CONTATTO AS A";
+ String s_Sql_Order = " order by A.descrizioneC\t";
+ WcString wc = new WcString();
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public ResParm save() {
+ if (getFlgContattoDefault() == 1L)
+ update("update CONTATTO SET flgContattoDefault=0 where id_clifor=" + getId_clifor());
+ return super.save();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ContattoCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ContattoCR.java
new file mode 100644
index 00000000..7a0b7bba
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ContattoCR.java
@@ -0,0 +1,96 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class ContattoCR extends CRAdapter {
+ private long id_contatto;
+
+ private String descrizioneC;
+
+ private String nomeC;
+
+ private String telefonoC;
+
+ private String emailC;
+
+ private long id_clifor;
+
+ private Clifor clifor;
+
+ private long flgContattoDefault;
+
+ public ContattoCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public ContattoCR() {}
+
+ public void setId_contatto(long newId_contatto) {
+ this.id_contatto = newId_contatto;
+ }
+
+ public void setDescrizioneC(String newDescrizione) {
+ this.descrizioneC = newDescrizione;
+ }
+
+ public void setNomeC(String newNome) {
+ this.nomeC = newNome;
+ }
+
+ public void setTelefonoC(String newTelefono) {
+ this.telefonoC = newTelefono;
+ }
+
+ public void setEmailC(String newEmail) {
+ this.emailC = newEmail;
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public long getId_contatto() {
+ return this.id_contatto;
+ }
+
+ public String getDescrizioneC() {
+ return (this.descrizioneC == null) ? "" : this.descrizioneC.trim();
+ }
+
+ public String getNomeC() {
+ return (this.nomeC == null) ? "" : this.nomeC.trim();
+ }
+
+ public String getTelefonoC() {
+ return (this.telefonoC == null) ? "" : this.telefonoC.trim();
+ }
+
+ public String getEmailC() {
+ return (this.emailC == null) ? "" : this.emailC.trim();
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class,
+
+ getId_clifor());
+ return this.clifor;
+ }
+
+ public long getFlgContattoDefault() {
+ return this.flgContattoDefault;
+ }
+
+ public void setFlgContattoDefault(long flgContattoDefault) {
+ this.flgContattoDefault = flgContattoDefault;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Contratto.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Contratto.java
new file mode 100644
index 00000000..8ba59817
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Contratto.java
@@ -0,0 +1,274 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.mail.MailMessage;
+import it.acxent.newsletter.CodaMessaggi;
+import it.acxent.newsletter.TemplateMsg;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.Date;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.util.Calendar;
+
+public class Contratto extends _AnagAdapter implements Serializable {
+ private long id_contratto;
+
+ private long id_tipoContratto;
+
+ private long id_clifor;
+
+ private String telefoniAssociati;
+
+ private Date dataInizioContratto;
+
+ private Date dataInvioAvvisoSms;
+
+ private long flgStato;
+
+ private TipoContratto tipoContratto;
+
+ private Clifor clifor;
+
+ private String descrizione;
+
+ private String logContratto;
+
+ private String notaContratto;
+
+ private Date dataScadenzaContratto;
+
+ public static final long ST_ATTIVO = 1L;
+
+ public static final long ST_NON_ATTIVO = 0L;
+
+ public Contratto(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Contratto() {}
+
+ public void setId_contratto(long newId_contratto) {
+ this.id_contratto = newId_contratto;
+ }
+
+ public void setId_tipoContratto(long newId_tipoContratto) {
+ this.id_tipoContratto = newId_tipoContratto;
+ setTipoContratto(null);
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setDataInizioContratto(Date newDataInizioContratto) {
+ this.dataInizioContratto = newDataInizioContratto;
+ }
+
+ public void setDataScadenzaContratto(Date newDataScadenzaContratto) {
+ this.dataScadenzaContratto = newDataScadenzaContratto;
+ }
+
+ public void setFlgStato(long newFlgStato) {
+ this.flgStato = newFlgStato;
+ }
+
+ public long getId_contratto() {
+ return this.id_contratto;
+ }
+
+ public long getId_tipoContratto() {
+ return this.id_tipoContratto;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" :
+ this.descrizione.trim();
+ }
+
+ public Date getDataInizioContratto() {
+ return this.dataInizioContratto;
+ }
+
+ public Date getDataScadenzaContratto() {
+ return this.dataScadenzaContratto;
+ }
+
+ public long getFlgStato() {
+ return this.flgStato;
+ }
+
+ public void setTipoContratto(TipoContratto newTipoContratto) {
+ this.tipoContratto = newTipoContratto;
+ }
+
+ public TipoContratto getTipoContratto() {
+ this.tipoContratto = (TipoContratto)getSecondaryObject(this.tipoContratto, TipoContratto.class,
+ getId_tipoContratto());
+ return this.tipoContratto;
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public ResParm creaCodaMessaggiSms(ContrattoCR CR) {
+ ResParm rp = new ResParm();
+ Vectumerator vec = findByCR(CR, 0, 0);
+ int numMsg = 0;
+ while (vec.hasMoreElements()) {
+ TemplateMsg tm = new TemplateMsg(getApFull());
+ tm.findByPrimaryKey(CR.getId_templateMsg());
+ Contratto row = (Contratto)vec.nextElement();
+ rp = row.creaCodaMessaggio();
+ if (rp.getStatus())
+ numMsg++;
+ }
+ rp.setMsg("Numero messaggi in coda: " + numMsg);
+ return rp;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(ContrattoCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from CONTRATTO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find +
+ wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getTelefoniAssociati() {
+ return (this.telefoniAssociati == null) ? "" :
+ this.telefoniAssociati.trim();
+ }
+
+ public void setTelefoniAssociati(String telefoniAssociati) {
+ this.telefoniAssociati = telefoniAssociati;
+ }
+
+ public Vectumerator findByClifor(long l_id_clifor, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from CONTRATTO AS A";
+ String s_Sql_Order = " order by A.flgStato desc, A.dataScadenzaContratto desc";
+ WcString wc = new WcString();
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find +
+ wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public static final String getStato(long l_flgStato) {
+ if (l_flgStato == 1L)
+ return "Attivo";
+ if (l_flgStato == 0L)
+ return "Non Attivo";
+ return "??";
+ }
+
+ public String getStato() {
+ return getStato(getFlgStato());
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class,
+ getId_clifor());
+ return this.clifor;
+ }
+
+ public String getLogContratto() {
+ return (this.logContratto == null) ? "" : this.logContratto;
+ }
+
+ public void setLogContratto(String logContratto) {
+ this.logContratto = logContratto;
+ }
+
+ public String getNotaContratto() {
+ return (this.notaContratto == null) ? "" : this.notaContratto;
+ }
+
+ public void setNotaContratto(String notaContratto) {
+ this.notaContratto = notaContratto;
+ }
+
+ public ResParm save() {
+ if (getDataScadenzaContratto() == null) {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(getDataInizioContratto());
+ int durata = (int)getTipoContratto().getDurataMesi();
+ if (getTipoContratto().getFlgPrepagato() == 1L) {
+ cal.add(6, durata * 30);
+ } else {
+ cal.add(2, durata);
+ cal.add(6, -1);
+ }
+ setDataScadenzaContratto(new Date(cal.getTimeInMillis()));
+ }
+ return super.save();
+ }
+
+ public Date getDataInvioAvvisoSms() {
+ return this.dataInvioAvvisoSms;
+ }
+
+ public void setDataInvioAvvisoSms(Date dataInvioAvvisoSms) {
+ this.dataInvioAvvisoSms = dataInvioAvvisoSms;
+ }
+
+ public ResParm creaCodaMessaggio() {
+ ResParm rp = new ResParm();
+ if (getId_contratto() > 0L) {
+ MailMessage mm = new MailMessage(getApFull());
+ mm.setTextMessage(getTipoContratto().getMessaggioSms());
+ mm.setString("cliente", getClifor().getDescrizioneCompleta());
+ mm.setString("contratto", getTipoContratto().getDescrizione());
+ mm.setDate("dataScadenza", getDataScadenzaContratto());
+ CodaMessaggi cm = new CodaMessaggi(getApFull());
+ cm.setDataCreazione(getToday());
+ cm.setCellulare(getTelefoniAssociati());
+ cm.setTestoMessaggio(mm.getMessage());
+ cm.setFlgTipo(2L);
+ cm.setFlgStatoInvio(0L);
+ rp = cm.save();
+ setDataInvioAvvisoSms(getToday());
+ rp.append(save());
+ }
+ return rp;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ContrattoCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ContrattoCR.java
new file mode 100644
index 00000000..664836e7
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ContrattoCR.java
@@ -0,0 +1,169 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import java.sql.Date;
+import java.sql.Timestamp;
+
+public class ContrattoCR extends CRAdapter {
+ private long id_contratto;
+
+ private long id_tipoContratto;
+
+ private long id_clifor;
+
+ private String descrizione;
+
+ private Date dataInizioContratto;
+
+ private Date dataScadenzaContratto;
+
+ private long flgStato;
+
+ private long lastUpdId_user;
+
+ private Timestamp lastUpdTmst;
+
+ private TipoContratto tipoContratto;
+
+ private Clifor clifor;
+
+ private Date dataScadenzaContrattoDa;
+
+ private Date dataScadenzaContrattoA;
+
+ private long id_templateMsg;
+
+ public ContrattoCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public ContrattoCR() {}
+
+ public void setId_contratto(long newId_contratto) {
+ this.id_contratto = newId_contratto;
+ }
+
+ public void setId_tipoContratto(long newId_tipoContratto) {
+ this.id_tipoContratto = newId_tipoContratto;
+ setTipoContratto(null);
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setDataInizioContratto(Date newDataInizioContratto) {
+ this.dataInizioContratto = newDataInizioContratto;
+ }
+
+ public void setDataScadenzaContratto(Date newDataScadenzaContratto) {
+ this.dataScadenzaContratto = newDataScadenzaContratto;
+ }
+
+ public void setFlgStato(long newFlgStato) {
+ this.flgStato = newFlgStato;
+ }
+
+ public void setLastUpdId_user(long newLastUpdId_user) {
+ this.lastUpdId_user = newLastUpdId_user;
+ }
+
+ public void setLastUpdTmst(Timestamp newLastUpdTmst) {
+ this.lastUpdTmst = newLastUpdTmst;
+ }
+
+ public long getId_contratto() {
+ return this.id_contratto;
+ }
+
+ public long getId_tipoContratto() {
+ return this.id_tipoContratto;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" :
+ this.descrizione.trim();
+ }
+
+ public Date getDataInizioContratto() {
+ return this.dataInizioContratto;
+ }
+
+ public Date getDataScadenzaContratto() {
+ return this.dataScadenzaContratto;
+ }
+
+ public long getFlgStato() {
+ return this.flgStato;
+ }
+
+ public long getLastUpdId_user() {
+ return this.lastUpdId_user;
+ }
+
+ public Timestamp getLastUpdTmst() {
+ return this.lastUpdTmst;
+ }
+
+ public void setTipoContratto(TipoContratto newTipoContratto) {
+ this.tipoContratto = newTipoContratto;
+ }
+
+ public TipoContratto getTipoContratto() {
+ this.tipoContratto = (TipoContratto)getSecondaryObject(this.tipoContratto, TipoContratto.class,
+ getId_tipoContratto());
+ return this.tipoContratto;
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class,
+ getId_clifor());
+ return this.clifor;
+ }
+
+ public Date getDataScadenzaContrattoDa() {
+ return this.dataScadenzaContrattoDa;
+ }
+
+ public void setDataScadenzaContrattoDa(Date dataScadenzaContrattoDa) {
+ this.dataScadenzaContrattoDa = dataScadenzaContrattoDa;
+ }
+
+ public Date getDataScadenzaContrattoA() {
+ return this.dataScadenzaContrattoA;
+ }
+
+ public void setDataScadenzaContrattoA(Date dataScadenzaContrattoA) {
+ this.dataScadenzaContrattoA = dataScadenzaContrattoA;
+ }
+
+ public static final String getStato(long l_flgStato) {
+ return Contratto.getStato(l_flgStato);
+ }
+
+ public String getStato() {
+ return Contratto.getStato(getFlgStato());
+ }
+
+ public long getId_templateMsg() {
+ return this.id_templateMsg;
+ }
+
+ public void setId_templateMsg(long id_templateMsg) {
+ this.id_templateMsg = id_templateMsg;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/DestinazioneDiversa.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/DestinazioneDiversa.java
new file mode 100644
index 00000000..6e0e1fc9
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/DestinazioneDiversa.java
@@ -0,0 +1,296 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class DestinazioneDiversa extends _AnagAdapter implements Serializable {
+ private static final long serialVersionUID = 2321576096013980457L;
+
+ private long id_destinazioneDiversa;
+
+ private long id_clifor;
+
+ private long id_comuneDD;
+
+ private String id_nazioneDD;
+
+ private String descrizioneDD;
+
+ private String pressoDD;
+
+ private String indirizzoDD;
+
+ private String numeroCivicoDD;
+
+ private String capZonaDD;
+
+ private String telefonoDD;
+
+ private String faxDD;
+
+ private String eMailDD;
+
+ private Clifor clifor;
+
+ private Comune comuneDD;
+
+ private Nazione nazioneDD;
+
+ private String capComuneDD;
+
+ private String descrizioneComuneDD;
+
+ private String provinciaComuneDD;
+
+ private long flgDDDefault;
+
+ public DestinazioneDiversa(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public DestinazioneDiversa() {}
+
+ public void setId_destinazioneDiversa(long newId_destinazioneDiversa) {
+ this.id_destinazioneDiversa = newId_destinazioneDiversa;
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public void setId_comuneDD(long newId_comuneDD) {
+ this.id_comuneDD = newId_comuneDD;
+ setComuneDD(null);
+ }
+
+ public void setId_nazioneDD(String newId_nazioneDD) {
+ this.id_nazioneDD = newId_nazioneDD;
+ setNazioneDD(null);
+ }
+
+ public void setDescrizioneDD(String newDescrizione) {
+ this.descrizioneDD = newDescrizione;
+ }
+
+ public void setPressoDD(String newPresso) {
+ this.pressoDD = newPresso;
+ }
+
+ public void setIndirizzoDD(String newIndirizzoDD) {
+ this.indirizzoDD = newIndirizzoDD;
+ }
+
+ public void setNumeroCivicoDD(String newNumeroCivicoDD) {
+ this.numeroCivicoDD = newNumeroCivicoDD;
+ }
+
+ public void setCapZonaDD(String newCapZonaDD) {
+ this.capZonaDD = newCapZonaDD;
+ }
+
+ public void setTelefonoDD(String newTelefonoDD) {
+ this.telefonoDD = newTelefonoDD;
+ }
+
+ public void setFaxDD(String newFaxDD) {
+ this.faxDD = newFaxDD;
+ }
+
+ public void setEMailDD(String newEMailDD) {
+ this.eMailDD = newEMailDD;
+ }
+
+ public long getId_destinazioneDiversa() {
+ return this.id_destinazioneDiversa;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public long getId_comuneDD() {
+ return this.id_comuneDD;
+ }
+
+ public String getId_nazioneDD() {
+ return (this.id_nazioneDD == null) ? "" : this.id_nazioneDD.trim();
+ }
+
+ public String getDescrizioneDD() {
+ return (this.descrizioneDD == null) ? "" : this.descrizioneDD.trim();
+ }
+
+ public String getPressoDD() {
+ return (this.pressoDD == null) ? "" : this.pressoDD.trim();
+ }
+
+ public String getIndirizzoDD() {
+ return (this.indirizzoDD == null) ? "" : this.indirizzoDD.trim();
+ }
+
+ public String getNumeroCivicoDD() {
+ return (this.numeroCivicoDD == null) ? "" : this.numeroCivicoDD.trim();
+ }
+
+ public String getCapZonaDD() {
+ return (this.capZonaDD == null) ? "" : this.capZonaDD.trim();
+ }
+
+ public String getTelefonoDD() {
+ return (this.telefonoDD == null) ? "" : this.telefonoDD.trim();
+ }
+
+ public String getFaxDD() {
+ return (this.faxDD == null) ? "" : this.faxDD.trim();
+ }
+
+ public String getEMailDD() {
+ return (this.eMailDD == null) ? "" : this.eMailDD.trim();
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class, getId_clifor());
+ return this.clifor;
+ }
+
+ public void setComuneDD(Comune newComune) {
+ this.comuneDD = newComune;
+ }
+
+ public Comune getComuneDD() {
+ this.comuneDD = (Comune)getSecondaryObject(this.comuneDD, Comune.class, getId_comuneDD());
+ return this.comuneDD;
+ }
+
+ public void setNazioneDD(Nazione newNazione) {
+ this.nazioneDD = newNazione;
+ }
+
+ public Nazione getNazioneDD() {
+ this.nazioneDD = (Nazione)getSecondaryObject(this.nazioneDD, Nazione.class, getId_nazioneDD());
+ return this.nazioneDD;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(DestinazioneDiversaCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from DESTINAZIONE_DIVERSA AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getIndirizzoCompleto() {
+ return getIndirizzoDD() + " n." + getIndirizzoDD() + " - " + getNumeroCivicoDD() + " " + (getCapZonaDD().isEmpty() ? getCapComuneDD() : getCapZonaDD()) + " (" +
+ getDescrizioneComuneDD() + ")";
+ }
+
+ public String getContatti() {
+ return (this.faxDD == null) ? "" : this.faxDD.trim();
+ }
+
+ public Vectumerator findByClifor(long l_id_clifor, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from DESTINAZIONE_DIVERSA AS A";
+ String s_Sql_Order = " order by A.descrizioneDD";
+ WcString wc = new WcString();
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public void seteMailDD(String eMailDD) {
+ this.eMailDD = eMailDD;
+ }
+
+ public String getCapComuneDD() {
+ if (this.id_comuneDD != 0L)
+ return getComuneDD().getCap();
+ return (this.capComuneDD == null) ? "" : this.capComuneDD.trim();
+ }
+
+ public void setCapComuneDD(String capComuneDD) {
+ this.capComuneDD = capComuneDD;
+ }
+
+ public String getDescrizioneComuneDD() {
+ if (this.id_comuneDD != 0L)
+ return getComuneDD().getDescrizione();
+ return (this.descrizioneComuneDD == null) ? "" : this.descrizioneComuneDD.trim();
+ }
+
+ public void setDescrizioneComuneDD(String descrizioneComuneDD) {
+ this.descrizioneComuneDD = descrizioneComuneDD;
+ }
+
+ public String getProvinciaComuneDD() {
+ if (this.id_comuneDD != 0L)
+ return getComuneDD().getProvincia();
+ return (this.provinciaComuneDD == null) ? "" : this.provinciaComuneDD.trim();
+ }
+
+ public void setProvinciaComuneDD(String provinciaComuneDD) {
+ this.provinciaComuneDD = provinciaComuneDD;
+ }
+
+ public long getFlgDDDefault() {
+ return this.flgDDDefault;
+ }
+
+ public void setFlgDDDefault(long flgDDDefault) {
+ this.flgDDDefault = flgDDDefault;
+ }
+
+ public void findDefaultByClifor(long l_id_clifor) {
+ String s_Sql_Find = "select A.* from DESTINAZIONE_DIVERSA AS A";
+ String s_Sql_Order = " order by A.descrizioneDD";
+ WcString wc = new WcString();
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ wc.addWc("A.flgDDDefault=1");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public ResParm save() {
+ if (getFlgDDDefault() == 1L)
+ update("update DESTINAZIONE_DIVERSA SET flgDDDefault=0 where id_clifor=" + getId_clifor());
+ return super.save();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/DestinazioneDiversaCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/DestinazioneDiversaCR.java
new file mode 100644
index 00000000..e9084fea
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/DestinazioneDiversaCR.java
@@ -0,0 +1,174 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class DestinazioneDiversaCR extends CRAdapter {
+ private long id_destinazioneDiversa;
+
+ private long id_clifor;
+
+ private long id_comuneDD;
+
+ private String id_nazioneDD;
+
+ private String descrizione;
+
+ private String presso;
+
+ private String indirizzoDD;
+
+ private String numeroCivicoDD;
+
+ private String capZonaDD;
+
+ private String telefonoDD;
+
+ private String faxDD;
+
+ private String eMailDD;
+
+ private Clifor clifor;
+
+ private Comune comuneDD;
+
+ private Nazione nazioneDD;
+
+ public DestinazioneDiversaCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public DestinazioneDiversaCR() {}
+
+ public void setId_destinazioneDiversa(long newId_destinazioneDiversa) {
+ this.id_destinazioneDiversa = newId_destinazioneDiversa;
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public void setId_comuneDD(long newId_comuneDD) {
+ this.id_comuneDD = newId_comuneDD;
+ setComune(null);
+ }
+
+ public void setId_nazioneDD(String newId_nazioneDD) {
+ this.id_nazioneDD = newId_nazioneDD;
+ setNazione(null);
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setPresso(String newPresso) {
+ this.presso = newPresso;
+ }
+
+ public void setIndirizzoDD(String newIndirizzoDD) {
+ this.indirizzoDD = newIndirizzoDD;
+ }
+
+ public void setNumeroCivicoDD(String newNumeroCivicoDD) {
+ this.numeroCivicoDD = newNumeroCivicoDD;
+ }
+
+ public void setCapZonaDD(String newCapZonaDD) {
+ this.capZonaDD = newCapZonaDD;
+ }
+
+ public void setTelefonoDD(String newTelefonoDD) {
+ this.telefonoDD = newTelefonoDD;
+ }
+
+ public void setFaxDD(String newFaxDD) {
+ this.faxDD = newFaxDD;
+ }
+
+ public void setEMailDD(String newEMailDD) {
+ this.eMailDD = newEMailDD;
+ }
+
+ public long getId_destinazioneDiversa() {
+ return this.id_destinazioneDiversa;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public long getId_comuneDD() {
+ return this.id_comuneDD;
+ }
+
+ public String getId_nazioneDD() {
+ return (this.id_nazioneDD == null) ? "" : this.id_nazioneDD.trim();
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public String getPresso() {
+ return (this.presso == null) ? "" : this.presso.trim();
+ }
+
+ public String getIndirizzoDD() {
+ return (this.indirizzoDD == null) ? "" : this.indirizzoDD.trim();
+ }
+
+ public String getNumeroCivicoDD() {
+ return (this.numeroCivicoDD == null) ? "" : this.numeroCivicoDD.trim();
+ }
+
+ public String getCapZonaDD() {
+ return (this.capZonaDD == null) ? "" : this.capZonaDD.trim();
+ }
+
+ public String getTelefonoDD() {
+ return (this.telefonoDD == null) ? "" : this.telefonoDD.trim();
+ }
+
+ public String getFaxDD() {
+ return (this.faxDD == null) ? "" : this.faxDD.trim();
+ }
+
+ public String getEMailDD() {
+ return (this.eMailDD == null) ? "" : this.eMailDD.trim();
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class,
+
+ getId_clifor());
+ return this.clifor;
+ }
+
+ public void setComune(Comune newComune) {
+ this.comuneDD = newComune;
+ }
+
+ public Comune getComune() {
+ this.comuneDD = (Comune)getSecondaryObject(this.comuneDD, Comune.class,
+
+ getId_comuneDD());
+ return this.comuneDD;
+ }
+
+ public void setNazione(Nazione newNazione) {
+ this.nazioneDD = newNazione;
+ }
+
+ public Nazione getNazione() {
+ this.nazioneDD = (Nazione)getSecondaryObject(this.nazioneDD, Nazione.class,
+
+ getId_nazioneDD());
+ return this.nazioneDD;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Esercizio.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Esercizio.java
new file mode 100644
index 00000000..452a8967
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Esercizio.java
@@ -0,0 +1,64 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class Esercizio extends _AnagAdapter implements Serializable {
+ private long id_esercizio;
+
+ private long flgStato;
+
+ public Esercizio(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Esercizio() {}
+
+ public void setId_esercizio(long newId_esercizio) {
+ this.id_esercizio = newId_esercizio;
+ }
+
+ public void setFlgStato(long newFlgStato) {
+ this.flgStato = newFlgStato;
+ }
+
+ public long getId_esercizio() {
+ return this.id_esercizio;
+ }
+
+ public long getFlgStato() {
+ return this.flgStato;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(EsercizioCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from ESERCIZIO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/EsercizioCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/EsercizioCR.java
new file mode 100644
index 00000000..3940ade4
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/EsercizioCR.java
@@ -0,0 +1,32 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class EsercizioCR extends CRAdapter {
+ private long id_esercizio;
+
+ private long flgStato;
+
+ public EsercizioCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public EsercizioCR() {}
+
+ public void setId_esercizio(long newId_esercizio) {
+ this.id_esercizio = newId_esercizio;
+ }
+
+ public void setFlgStato(long newFlgStato) {
+ this.flgStato = newFlgStato;
+ }
+
+ public long getId_esercizio() {
+ return this.id_esercizio;
+ }
+
+ public long getFlgStato() {
+ return this.flgStato;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Festivita.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Festivita.java
new file mode 100644
index 00000000..da9d6075
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Festivita.java
@@ -0,0 +1,231 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.Date;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.util.Calendar;
+
+public class Festivita extends _AnagAdapter implements Serializable {
+ private static final long serialVersionUID = -6806543963513972058L;
+
+ private long id_festivita;
+
+ private String descrizione;
+
+ private long giorno;
+
+ private long mese;
+
+ private long anno;
+
+ private Date dataEsclusione;
+
+ private long flgTipo;
+
+ private Date dataInizio;
+
+ private Date dataFine;
+
+ public static final long TIPO_CALCOLO_FRATELLI = 0L;
+
+ public static final long TIPO_FESTIVITA_AMBULATORIO = 1L;
+
+ public static final long TIPO_FESTIVITA_LAVORATIVI = 2L;
+
+ public Festivita(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Festivita() {}
+
+ public void setId_festivita(long newId_festivita) {
+ this.id_festivita = newId_festivita;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setGiorno(long newGiorno) {
+ this.giorno = newGiorno;
+ }
+
+ public void setMese(long newMese) {
+ this.mese = newMese;
+ }
+
+ public void setAnno(long newAnno) {
+ this.anno = newAnno;
+ }
+
+ public void setFlgTipo(long newFlgTipo) {
+ this.flgTipo = newFlgTipo;
+ }
+
+ public long getId_festivita() {
+ return this.id_festivita;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione;
+ }
+
+ public long getGiorno() {
+ return this.giorno;
+ }
+
+ public Date getDataAnno(int l_anno) {
+ Calendar cal = Calendar.getInstance();
+ cal.set(5, (int)getGiorno());
+ cal.set(2, (int)getMese() - 1);
+ if (l_anno > 0)
+ cal.set(1, l_anno);
+ return new Date(cal.getTimeInMillis());
+ }
+
+ public Date getDataAnno() {
+ return getDataAnno((int)getAnno());
+ }
+
+ public long getMese() {
+ return this.mese;
+ }
+
+ public long getAnno() {
+ return this.anno;
+ }
+
+ public long getFlgTipo() {
+ return this.flgTipo;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(FestivitaCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from FESTIVITA AS A";
+ String s_Sql_Order = " order by A.anno, A.mese, A.giorno";
+ WcString wc = new WcString();
+ if (CR.getDataDa() != null)
+ wc.addWc("(A.anno=0 or A.anno is null or A.anno>=" + CR.getAnnoDataDa() + ")");
+ if (CR.getDataA() != null)
+ wc.addWc("(A.anno=0 or A.anno is null or A.anno<=" + CR.getAnnoDataA() + ")");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ Vectumerator vec = findRows(stmt, 0, 0);
+ Vectumerator result = new Vectumerator();
+ while (vec.hasMoreElements()) {
+ Festivita row = (Festivita)vec.nextElement();
+ if (CR.getMeseDataDa() == CR.getMeseDataA()) {
+ if (row.getMese() == (long)CR.getMeseDataDa() && row.getGiorno() >= (long)CR.getGiornoDataDa() &&
+ row.getGiorno() <= (long)CR.getGiornoDataA())
+ result.addElement(row);
+ continue;
+ }
+ if ((row.getMese() == (long)CR.getMeseDataDa() && row.getGiorno() >= (long)CR.getGiornoDataDa()) || (
+ row.getMese() > (long)CR.getMeseDataDa() && row.getMese() < (long)CR.getMeseDataA()) || (
+ row.getMese() == (long)CR.getMeseDataA() && row.getGiorno() <= (long)CR.getGiornoDataA()))
+ result.addElement(row);
+ }
+ return result;
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public void findByData(Date l_data, long flgTipo) {
+ String s_Sql_Find = "select A.* from FESTIVITA AS A";
+ String s_Sql_Order = " order by A.anno, A.mese, A.giorno";
+ WcString wc = new WcString();
+ long l_giorno = 0L;
+ long l_mese = 0L;
+ long l_anno = 0L;
+ if (l_data != null) {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(l_data);
+ l_giorno = (long)cal.get(5);
+ l_mese = (long)(cal.get(2) + 1);
+ l_anno = (long)cal.get(1);
+ }
+ if (flgTipo == 0L) {
+ wc.addWc("((A.anno=0 or A.anno is null) and A.giorno=" + l_giorno + " and A.mese=" + l_mese + ") or (A.anno=" + l_anno + " and A.giorno=" + l_giorno + " and A.mese=" + l_mese + ")");
+ } else {
+ wc.addWc("((A.anno=0 or A.anno is null) and A.giorno=" + l_giorno + " and A.mese=" + l_mese + ") or (A.anno=" + l_anno + " and A.giorno=" + l_giorno + " and A.mese=" + l_mese + ") OR (A.dataInizio <= ? AND A.dataFine >= ?)");
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ int dataCount = 0;
+ if (flgTipo != 0L) {
+ dataCount++;
+ stmt.setDate(dataCount, l_data);
+ dataCount++;
+ stmt.setDate(dataCount, l_data);
+ }
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public Date getDataEsclusione() {
+ return this.dataEsclusione;
+ }
+
+ public void setDataEsclusione(Date dataEsclusione) {
+ this.dataEsclusione = dataEsclusione;
+ if (dataEsclusione != null) {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(dataEsclusione);
+ setGiorno((long)cal.get(5));
+ setMese((long)(cal.get(2) + 1));
+ setAnno((long)cal.get(1));
+ }
+ }
+
+ public boolean isFestivo(Date l_data, long flgTipo) {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(l_data);
+ if (cal.get(7) == 1)
+ return true;
+ if (flgTipo == 2L &&
+ cal.get(7) == 7)
+ return true;
+ Festivita festivita = new Festivita(getApFull());
+ festivita.findByData(l_data, flgTipo);
+ if (festivita.getDBState() == 1)
+ return true;
+ return false;
+ }
+
+ public Date getDataInizio() {
+ return this.dataInizio;
+ }
+
+ public void setDataInizio(Date dataDa) {
+ this.dataInizio = dataDa;
+ }
+
+ public Date getDataFine() {
+ return this.dataFine;
+ }
+
+ public void setDataFine(Date dataA) {
+ this.dataFine = dataA;
+ }
+
+ public long getTotGiorniLavorativiFraDueDate(Date dataDa, Date dataA) {
+ long totGg = 0L;
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(dataDa);
+ while (getDateDiff(new Date(cal.getTimeInMillis()), dataA) >= 0L) {
+ if (!isFestivo(new Date(cal.getTimeInMillis()), 2L))
+ totGg++;
+ cal.add(6, 1);
+ }
+ return totGg;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/FestivitaCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/FestivitaCR.java
new file mode 100644
index 00000000..04e28a9d
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/FestivitaCR.java
@@ -0,0 +1,173 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import java.sql.Date;
+import java.util.Calendar;
+
+public class FestivitaCR extends CRAdapter {
+ private long id_festivita;
+
+ private String descrizione;
+
+ private long giorno;
+
+ private long mese;
+
+ private Date dataDa;
+
+ private Date dataA;
+
+ private long anno;
+
+ private long flgTipo;
+
+ private Date dataFine;
+
+ private Date dataInizio;
+
+ public FestivitaCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public FestivitaCR() {}
+
+ public void setId_festivita(long newId_festivita) {
+ this.id_festivita = newId_festivita;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setGiorno(long newGiorno) {
+ this.giorno = newGiorno;
+ }
+
+ public void setMese(long newMese) {
+ this.mese = newMese;
+ }
+
+ public void setAnno(long newAnno) {
+ this.anno = newAnno;
+ }
+
+ public void setFlgTipo(long newFlgTipo) {
+ this.flgTipo = newFlgTipo;
+ }
+
+ public long getId_festivita() {
+ return this.id_festivita;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione;
+ }
+
+ public long getGiorno() {
+ return this.giorno;
+ }
+
+ public long getMese() {
+ return this.mese;
+ }
+
+ public long getAnno() {
+ return this.anno;
+ }
+
+ public long getFlgTipo() {
+ return this.flgTipo;
+ }
+
+ public Date getDataA() {
+ if (this.dataA == null) {
+ Calendar cal = Calendar.getInstance();
+ this.dataA = DBAdapter.getLastOfYear(cal.get(1));
+ }
+ return this.dataA;
+ }
+
+ public void setDataA(Date dataA) {
+ this.dataA = dataA;
+ }
+
+ public Date getDataDa() {
+ return this.dataDa;
+ }
+
+ public int getGiornoDataA() {
+ if (this.dataA != null)
+ return getCalendarDataA().get(5);
+ return 0;
+ }
+
+ public int getMeseDataDa() {
+ if (this.dataDa != null)
+ return getCalendarDataDa().get(2) + 1;
+ return -1;
+ }
+
+ public int getAnnoDataDa() {
+ if (this.dataDa != null)
+ return getCalendarDataDa().get(1);
+ return 0;
+ }
+
+ public Calendar getCalendarDataDa() {
+ if (this.dataDa != null) {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(getDataDa());
+ return cal;
+ }
+ return null;
+ }
+
+ public Calendar getCalendarDataA() {
+ if (this.dataA != null) {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(getDataA());
+ return cal;
+ }
+ return null;
+ }
+
+ public void setDataDa(Date dataDa) {
+ this.dataDa = dataDa;
+ }
+
+ public int getAnnoDataA() {
+ if (this.dataA != null)
+ return getCalendarDataA().get(1);
+ return 0;
+ }
+
+ public int getGiornoDataDa() {
+ if (this.dataDa != null)
+ return getCalendarDataDa().get(5);
+ return 0;
+ }
+
+ public int getMeseDataA() {
+ if (this.dataA != null)
+ return getCalendarDataA().get(2) + 1;
+ return -1;
+ }
+
+ public Date getDataFine() {
+ return this.dataFine;
+ }
+
+ public Date getDataInizio() {
+ return this.dataInizio;
+ }
+
+ public void setDataFine(Date dataA) {
+ this.dataFine = dataA;
+ }
+
+ public void setDataInizio(Date dataDa) {
+ this.dataInizio = dataDa;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Fornitore.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Fornitore.java
new file mode 100644
index 00000000..8de9512e
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Fornitore.java
@@ -0,0 +1,59 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.Vectumerator;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class Fornitore extends Clifor {
+ private static final long serialVersionUID = -6753258942143203192L;
+
+ private long id_fornitore;
+
+ public Fornitore() {}
+
+ public Fornitore(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public String getTableBeanName() {
+ return "CLIFOR";
+ }
+
+ public String getFlgTipo() {
+ return "F";
+ }
+
+ public Vectumerator findByCR(FornitoreCR CR, int pageNumber, int pageRows) {
+ return findByCR(CR, pageNumber, pageRows);
+ }
+
+ public long getId_fornitore() {
+ return getId_clifor();
+ }
+
+ public void setId_fornitore(long id_cliente) {
+ setId_clifor(id_cliente);
+ }
+
+ protected String sqlStringfindAll() {
+ return "select * from CLIFOR where id_clifor>1 and flgTipo='F' order by cognome, nome";
+ }
+
+ public Vectumerator findProgettisti() {
+ String s_Sql_Find = "select A.* from CLIFOR AS A";
+ String s_Sql_Order = " order by A.cognome, A.nome\t";
+ WcString wc = new WcString();
+ s_Sql_Find = s_Sql_Find + " JOIN CLIFOR_TIPO_CLIFOR AS B ON A.id_clifor = B.id_clifor JOIN TIPO_CLIFOR AS C ON B.id_tipoClifor = C.id_tipoClifor ";
+ wc.addWc("A.flgTipo='F'");
+ wc.addWc("C.flgTipologia = 2");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/FornitoreCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/FornitoreCR.java
new file mode 100644
index 00000000..16ee1977
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/FornitoreCR.java
@@ -0,0 +1,25 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+
+public class FornitoreCR extends CliforCR {
+ private long id_fornitore;
+
+ public FornitoreCR() {}
+
+ public FornitoreCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public String getFlgTipo() {
+ return "F";
+ }
+
+ public long getId_fornitore() {
+ return getId_clifor();
+ }
+
+ public void setId_fornitore(long id_cliente) {
+ setId_clifor(id_cliente);
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Glossario.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Glossario.java
new file mode 100644
index 00000000..3278dc55
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Glossario.java
@@ -0,0 +1,128 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class Glossario extends DBAdapter implements Serializable {
+ private static final long serialVersionUID = 1695626744317L;
+
+ private long id_glossario;
+
+ private long id_tipoGlossario;
+
+ private String descrizione;
+
+ private TipoGlossario tipoGlossario;
+
+ private String codice;
+
+ public Glossario(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Glossario() {}
+
+ public void setId_glossario(long newId_glossario) {
+ this.id_glossario = newId_glossario;
+ }
+
+ public void setId_tipoGlossario(long newId_tipoGlossario) {
+ this.id_tipoGlossario = newId_tipoGlossario;
+ setTipoGlossario(null);
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_glossario() {
+ return this.id_glossario;
+ }
+
+ public long getId_tipoGlossario() {
+ return this.id_tipoGlossario;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public void setTipoGlossario(TipoGlossario newTipoGlossario) {
+ this.tipoGlossario = newTipoGlossario;
+ }
+
+ public TipoGlossario getTipoGlossario() {
+ this.tipoGlossario = (TipoGlossario)getSecondaryObject(this.tipoGlossario, TipoGlossario.class, getId_tipoGlossario());
+ return this.tipoGlossario;
+ }
+
+ protected ResParm checkDeleteCascade() {
+ return new ResParm(true);
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(GlossarioCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from GLOSSARIO AS A";
+ String s_Sql_Order = " order by A.descrizione";
+ if (!CR.getCodiceTipoGlossario().isEmpty())
+ s_Sql_Find = s_Sql_Find + " inner join TIPO_GLOSSARIO AS B ON A.id_tipoGlossario=B.id_tipoGlossario";
+ WcString wc = new WcString();
+ if (CR.getId_tipoGlossarioS() > 0L)
+ wc.addWc("A.id_tipoGlossario=" + CR.getId_tipoGlossarioS());
+ if (!CR.getCodiceTipoGlossario().isEmpty())
+ wc.addWc("B.codice='" + CR.getCodiceTipoGlossario() + "'");
+ if (!CR.getDescrizione().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getDescrizione().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.descrizione like '%" + token + "%' or A.codice ='" + token + "')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getCodice() {
+ return (this.codice == null) ? "" : this.codice.trim();
+ }
+
+ public void setCodice(String codice) {
+ this.codice = codice;
+ }
+
+ public Vectumerator findByCodiceTipoGlossario(String l_codiceTipoGlossario) {
+ String s_Sql_Find = "select A.* from GLOSSARIO AS A";
+ String s_Sql_Order = " order by A.descrizione";
+ s_Sql_Find = s_Sql_Find + " inner join TIPO_GLOSSARIO AS B ON A.id_tipoGlossario=B.id_tipoGlossario";
+ WcString wc = new WcString();
+ if (!l_codiceTipoGlossario.isEmpty())
+ wc.addWc("B.codice='" + l_codiceTipoGlossario + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/GlossarioCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/GlossarioCR.java
new file mode 100644
index 00000000..e941ec9c
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/GlossarioCR.java
@@ -0,0 +1,68 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class GlossarioCR extends CRAdapter {
+ private static final long serialVersionUID = -5321498975655164852L;
+
+ private long id_glossario;
+
+ private long id_tipoGlossarioS;
+
+ private String descrizione;
+
+ private TipoGlossario tipoGlossario;
+
+ private String codiceTipoGlossario;
+
+ public GlossarioCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public GlossarioCR() {}
+
+ public void setId_glossario(long newId_glossario) {
+ this.id_glossario = newId_glossario;
+ }
+
+ public void setId_tipoGlossarioS(long newId_tipoGlossario) {
+ this.id_tipoGlossarioS = newId_tipoGlossario;
+ setTipoGlossario(null);
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_glossario() {
+ return this.id_glossario;
+ }
+
+ public long getId_tipoGlossarioS() {
+ return this.id_tipoGlossarioS;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public void setTipoGlossario(TipoGlossario newTipoGlossario) {
+ this.tipoGlossario = newTipoGlossario;
+ }
+
+ public TipoGlossario getTipoGlossario() {
+ this.tipoGlossario = (TipoGlossario)getSecondaryObject(this.tipoGlossario, TipoGlossario.class,
+
+ getId_tipoGlossarioS());
+ return this.tipoGlossario;
+ }
+
+ public String getCodiceTipoGlossario() {
+ return (this.codiceTipoGlossario == null) ? "" : this.codiceTipoGlossario.trim();
+ }
+
+ public void setCodiceTipoGlossario(String newCodice) {
+ this.codiceTipoGlossario = newCodice;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Iva.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Iva.java
new file mode 100644
index 00000000..279bdae4
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Iva.java
@@ -0,0 +1,400 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapterException;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class Iva extends _AnagAdapter implements Serializable, IvaInterface {
+ private static final long serialVersionUID = -2303180562953644516L;
+
+ public static final String TI_IMPONIBILE = "I";
+
+ public static final String TI_N1_ESCLUSO_ART_15 = "X";
+
+ public static final String TI_N2_NON_SOGGETTE_NON_VALIDO_2021 = "S";
+
+ public static final String TI_N2_1_NON_SOGGETTE_ART_7 = "S1";
+
+ public static final String TI_N2_2_NON_SOGGETTE_ALTRE = "S2";
+
+ public static final String TI_N3_NON_IMPONIBILE_NON_VALIDO_2021 = "N";
+
+ public static final String TI_N3_1_NON_IMPONIBILE_ESPORTAZIONI = "N1";
+
+ public static final String TI_N3_2_NON_IMPONIBILE_CESS_COMUN = "N2";
+
+ public static final String TI_N3_3_NON_IMPONIBILE_CESS_S_MARINO = "N3";
+
+ public static final String TI_N3_4_NON_IMPONIBILE_OP_ASSIM_CESS_ESPORT = "N4";
+
+ public static final String TI_N3_5_NON_IMPONIBILE_CON_DICH_INTENTO = "N5";
+
+ public static final String TI_N3_6_NON_IMPONIBILE_ALTRE_OPER = "N6";
+
+ public static final String TI_N4_ESENTE = "E";
+
+ public static final String TI_N5_REGIME_MARGINE = "R";
+
+ public static final String TI_N6_INVERSIONE_CONTABILE_NON_VALIDO_2021 = "C";
+
+ public static final String TI_N6_1_INVERSIONE_CONTABILE_ROTTAMI = "C1";
+
+ public static final String TI_N6_2_INVERSIONE_CONTABILE_ORO_ARGENTO = "C2";
+
+ public static final String TI_N6_3_INVERSIONE_CONTABILE_SUBAPP_EDILE = "C3";
+
+ public static final String TI_N6_4_INVERSIONE_CONTABILE_CESS_FABBRICATI = "C4";
+
+ public static final String TI_N6_5_INVERSIONE_CONTABILE_CESS_TEL_CELLULARI = "C5";
+
+ public static final String TI_N6_6_INVERSIONE_CONTABILE_CESS_PROD_ELETTRONICI = "C6";
+
+ public static final String TI_N6_7_INVERSIONE_CONTABILE_PREST_EDILE = "C7";
+
+ public static final String TI_N6_8_INVERSIONE_CONTABILE_SETT_ENERGETICO = "C8";
+
+ public static final String TI_N6_9_INVERSIONE_CONTABILE_ALTRI_CASI = "C9";
+
+ public static final String TI_N7_ASSOLTA_ATRO_STATO_UE = "A";
+
+ private long aliquota;
+
+ private long aliquotaIndetraibile;
+
+ private String descrizione;
+
+ private String flgTipo;
+
+ private long id_ivaStdRM;
+
+ private Iva ivaStdRM;
+
+ private String notaEsenzione;
+
+ private String codiceExport;
+
+ private String descrizioneRigaStampa;
+
+ private long flgOss;
+
+ private long id_iva;
+
+ public static final String P_CODICE_IVA_STD_VEND = "CODICE_IVA_STD_VEND";
+
+ public static final String P_CODICE_IVA_STD_ACQUISTO = "CODICE_IVA_STD_ACQ";
+
+ public static final String P_CODICE_IVA_ESENTE_SPESE_BOLLI = "CODICE_IVA_ESENTE";
+
+ public static final String P_CODICE_IVA_CEE_AZIENDA_ART41 = "CODICE_IVA_CEE_AZIENDA_ART41";
+
+ public static final String P_CODICE_IVA_ITA_CEE_AZIENDA_ART58 = "CODICE_IVA_ITA_CEE_AZIENDA_ART58";
+
+ public static final String P_CODICE_IVA_EXTRA_CEE_ART8_A = "CODICE_IVA_ART8_A";
+
+ public static final String P_CODICE_IVA_EXTRA_CEE_ESP_ABITUALE_ART8_C = "CODICE_IVA_EXTRA_CEE_ESP_ABITUALE_ART8_C";
+
+ public static final String P_CODICE_IVA_TRASP_EXTRA_CEE_RAV_ART9 = "CODICE_IVA_ART9";
+
+ public static final String P_CODICE_IVA_REVERSE_CHARGE = "CODICE_IVA_REVERSE_CHARGE";
+
+ public static final String P_CODICE_IVA_REGIME_MARGINE = "CODICE_IVA_REGIME_MARGINE";
+
+ public static final String P_IVA_CEE_ONE_STOP_SHOP = "IVA_CEE_ONE_STOP_SHOP";
+
+ public static final String P_IVA_ESTERO_AZIENDA_ESENTE = "IVA_ESTERO_AZIENDA_ESENTE";
+
+ public Iva() {}
+
+ public Iva(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(IvaCR CR, int pageNumber, int pageRows) throws DBAdapterException, SQLException {
+ String s_Sql_Find = "select A.* from IVA AS A";
+ String s_Sql_Order = " order by A.descrizione";
+ String wc = "";
+ if (!CR.getSearchTxt().isEmpty())
+ wc = buildWc(wc, "A.descrizione like'" + CR.getSearchTxt() + "%' ");
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc);
+ return findRows(stmt, pageNumber, pageRows);
+ }
+
+ public long getAliquota() {
+ return this.aliquota;
+ }
+
+ public long getAliquotaIndetraibile() {
+ return this.aliquotaIndetraibile;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione;
+ }
+
+ public String getFlgTipo() {
+ return (this.flgTipo == null || this.flgTipo.isEmpty()) ? "I" : this.flgTipo;
+ }
+
+ public static final String getTipo(String l_flgTipo) {
+ if (l_flgTipo.equals("I"))
+ return "Imponibile";
+ if (l_flgTipo.equals("X"))
+ return "Escluso ex art. 15 N1";
+ if (l_flgTipo.equals("S"))
+ return "Non Soggette N2 NO 2021";
+ if (l_flgTipo.equals("S1"))
+ return "Non Soggette N2.1 ART. 7 DPR 633/72";
+ if (l_flgTipo.equals("S2"))
+ return "Non Soggette N2.2 ALTRE";
+ if (l_flgTipo.equals("N"))
+ return "Non Imponibile N3 NO 2021";
+ if (l_flgTipo.equals("N1"))
+ return "Non Imponibile N3.1 Esportazioni";
+ if (l_flgTipo.equals("N2"))
+ return "Non Imponibile N3.2 Cessioni Intracomunitarie";
+ if (l_flgTipo.equals("N3"))
+ return "Non Imponibile N3.3 Cessioni San Marino";
+ if (l_flgTipo.equals("N4"))
+ return "Non Imponibile N3.4 Assim. Cess. Esportazioni";
+ if (l_flgTipo.equals("N5"))
+ return "Non Imponibile N3.5 con dichiarazioni di Intento";
+ if (l_flgTipo.equals("N6"))
+ return "Non Imponibile N3.6 oper. non concorrono al plafond";
+ if (l_flgTipo.equals("E"))
+ return "Esente N4";
+ if (l_flgTipo.equals("R"))
+ return "Regime del Margine N5";
+ if (l_flgTipo.equals("C"))
+ return "Inversione Contabile N6 NO 2021";
+ if (l_flgTipo.equals("C1"))
+ return "Inversione Contabile N6.1 Cess. Rottami";
+ if (l_flgTipo.equals("C2"))
+ return "Inversione Contabile N6.2 Cess. Oro o Argento";
+ if (l_flgTipo.equals("C3"))
+ return "Inversione Contabile N6.3 subapp. settore edile";
+ if (l_flgTipo.equals("C4"))
+ return "Inversione Contabile N6.4 Cessione Fabbricati";
+ if (l_flgTipo.equals("C5"))
+ return "Inversione Contabile N6.5 Cessione Tel. Cellulari";
+ if (l_flgTipo.equals("C6"))
+ return "Inversione Contabile N6.6 Cessione Prod. Elettronici";
+ if (l_flgTipo.equals("C7"))
+ return "Inversione Contabile N6.7 Prestaz. comparto edile e connessi";
+ if (l_flgTipo.equals("C8"))
+ return "Inversione Contabile N6.8 Oper. Settore Energetico";
+ if (l_flgTipo.equals("C9"))
+ return "Inversione Contabile N6.9 Altri Casi";
+ if (l_flgTipo.equals("A"))
+ return "Assolta UE N7";
+ return "";
+ }
+
+ public static final String getFENatura(String l_flgTipo) {
+ if (l_flgTipo.equals("I"))
+ return "";
+ if (l_flgTipo.equals("X"))
+ return "N1";
+ if (l_flgTipo.equals("S"))
+ return "N2";
+ if (l_flgTipo.equals("S1"))
+ return "N2.1";
+ if (l_flgTipo.equals("S2"))
+ return "N2.2";
+ if (l_flgTipo.equals("N"))
+ return "N3";
+ if (l_flgTipo.equals("N1"))
+ return "N3.1";
+ if (l_flgTipo.equals("N2"))
+ return "N3.2";
+ if (l_flgTipo.equals("N3"))
+ return "N3.3";
+ if (l_flgTipo.equals("N4"))
+ return "N3.4";
+ if (l_flgTipo.equals("N5"))
+ return "N3.5";
+ if (l_flgTipo.equals("N6"))
+ return "N3.6";
+ if (l_flgTipo.equals("E"))
+ return "N4";
+ if (l_flgTipo.equals("R"))
+ return "N5";
+ if (l_flgTipo.equals("C"))
+ return "N6";
+ if (l_flgTipo.equals("C1"))
+ return "N6.1";
+ if (l_flgTipo.equals("C2"))
+ return "N6.2";
+ if (l_flgTipo.equals("C3"))
+ return "N6.3";
+ if (l_flgTipo.equals("C4"))
+ return "N6.4";
+ if (l_flgTipo.equals("C5"))
+ return "N6.5";
+ if (l_flgTipo.equals("C6"))
+ return "N6.6";
+ if (l_flgTipo.equals("C7"))
+ return "N6.7";
+ if (l_flgTipo.equals("C8"))
+ return "N6.8";
+ if (l_flgTipo.equals("C9"))
+ return "N6.9";
+ if (l_flgTipo.equals("A"))
+ return "N7";
+ return "";
+ }
+
+ public String getFENatura() {
+ return getFENatura(getFlgTipo());
+ }
+
+ public String getTipo() {
+ return getTipo(getFlgTipo());
+ }
+
+ public long getId_iva() {
+ return this.id_iva;
+ }
+
+ public String getNotaEsenzione() {
+ return (this.notaEsenzione == null) ? "" : this.notaEsenzione;
+ }
+
+ public void setAliquota(long newAliquota) {
+ this.aliquota = newAliquota;
+ }
+
+ public void setAliquotaIndetraibile(long l) {
+ this.aliquotaIndetraibile = l;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setFlgTipo(String string) {
+ this.flgTipo = string;
+ }
+
+ public void setId_iva(long newId_iva) {
+ this.id_iva = newId_iva;
+ }
+
+ public void setNotaEsenzione(String l_notaEsenzione) {
+ this.notaEsenzione = l_notaEsenzione;
+ }
+
+ public String getCodiceExport() {
+ return (this.codiceExport == null) ? "" : this.codiceExport;
+ }
+
+ public void setCodiceExport(String codiceExport) {
+ this.codiceExport = codiceExport;
+ }
+
+ public long getAliquotaFE() {
+ if (getFlgTipo().equals("R"))
+ return 0L;
+ return getAliquota();
+ }
+
+ public boolean isRegimeMargine() {
+ return getFlgTipo().equals("R");
+ }
+
+ public String getDescrizioneRigaStampa() {
+ return (this.descrizioneRigaStampa == null) ? "" : this.descrizioneRigaStampa.trim();
+ }
+
+ public void setDescrizioneRigaStampa(String descrizioneRigaStampa) {
+ this.descrizioneRigaStampa = descrizioneRigaStampa;
+ }
+
+ public String getDescrizioneRigaStampaAuto() {
+ return getDescrizioneRigaStampa().isEmpty() ? getDescrizione() : getDescrizioneRigaStampa();
+ }
+
+ public long getFlgOss() {
+ return this.flgOss;
+ }
+
+ public void setFlgOss(long flgOss) {
+ this.flgOss = flgOss;
+ }
+
+ public Vectumerator findAllOss() {
+ String s_Sql_Find = "select A.* from IVA AS A";
+ String s_Sql_Order = " order by A.descrizione";
+ WcString wc = new WcString();
+ wc.addWc("A.flgOss=1");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + String.valueOf(wc));
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public long getId_ivaStdRM() {
+ return this.id_ivaStdRM;
+ }
+
+ public void setId_ivaStdRM(long id_ivaStdRM) {
+ this.id_ivaStdRM = id_ivaStdRM;
+ setIvaStdRM(null);
+ }
+
+ public Iva getIvaStdRM() {
+ this.ivaStdRM = (Iva)getSecondaryObject(this.ivaStdRM, Iva.class, new Long(getId_ivaStdRM()));
+ return this.ivaStdRM;
+ }
+
+ public void setIvaStdRM(Iva ivaStdRM) {
+ this.ivaStdRM = ivaStdRM;
+ }
+
+ public ResParm save() {
+ if (getFlgTipo().equals("R")) {
+ if (getId_ivaStdRM() == 0L)
+ return new ResParm(false, "Errore! Indicare una aliquota iva per il calcolo dell'iva sul margine");
+ } else {
+ setId_ivaStdRM(0L);
+ }
+ return super.save();
+ }
+
+ public Vectumerator findAllNoRM() {
+ String s_Sql_Find = "select A.* from IVA AS A";
+ String s_Sql_Order = " order by A.descrizione";
+ WcString wc = new WcString();
+ wc.addWc("A.flgTipo!='R'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + String.valueOf(wc));
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public Vectumerator findAllNonOss() {
+ String s_Sql_Find = "select A.* from IVA AS A";
+ String s_Sql_Order = " order by A.descrizione";
+ WcString wc = new WcString();
+ wc.addWc("(A.flgOss=0 or A.flgOss is null)");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + String.valueOf(wc));
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/IvaCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/IvaCR.java
new file mode 100644
index 00000000..196ca22d
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/IvaCR.java
@@ -0,0 +1,12 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class IvaCR extends CRAdapter {
+ public IvaCR() {}
+
+ public IvaCR(ApplParmFull newAp) {
+ super(newAp);
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/IvaInterface.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/IvaInterface.java
new file mode 100644
index 00000000..16e68218
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/IvaInterface.java
@@ -0,0 +1,41 @@
+package it.acxent.anag;
+
+public interface IvaInterface {
+ long getAliquota();
+
+ long getAliquotaIndetraibile();
+
+ String getDescrizione();
+
+ String getFlgTipo();
+
+ String getFENatura();
+
+ String getTipo();
+
+ long getId_iva();
+
+ String getNotaEsenzione();
+
+ void setAliquota(long paramLong);
+
+ void setAliquotaIndetraibile(long paramLong);
+
+ void setDescrizione(String paramString);
+
+ void setFlgTipo(String paramString);
+
+ void setId_iva(long paramLong);
+
+ void setNotaEsenzione(String paramString);
+
+ String getCodiceExport();
+
+ void setCodiceExport(String paramString);
+
+ long getAliquotaFE();
+
+ boolean isRegimeMargine();
+
+ Iva getIvaStdRM();
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Lang.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Lang.java
new file mode 100644
index 00000000..5909fc72
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Lang.java
@@ -0,0 +1,39 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+
+public class Lang extends _AnagAdapter {
+ private String descrizione;
+
+ public Lang() {}
+
+ public Lang(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione;
+ }
+
+ public void setDescrizione(String descrizione) {
+ this.descrizione = descrizione;
+ }
+
+ public Vectumerator findLingue() {
+ Vectumerator vec = new Vectumerator();
+ String lingue = getParm("TAGLIE_LINGUE").getTesto();
+ StringTokenizer st = new StringTokenizer(lingue, ",");
+ while (st.hasMoreTokens()) {
+ Lang lg = new Lang(getApFull());
+ lg.setDescrizione(st.nextToken());
+ vec.add(lg);
+ }
+ return vec;
+ }
+
+ protected boolean isDatabaseBean() {
+ return false;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Listino.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Listino.java
new file mode 100644
index 00000000..18ff3226
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Listino.java
@@ -0,0 +1,696 @@
+package it.acxent.anag;
+
+import it.acxent.art.Articolo;
+import it.acxent.art.ArticoloVariante;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.DoubleOperator;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class Listino extends _AnagAdapter implements Serializable {
+ private static final long serialVersionUID = -8525948766452916580L;
+
+ public static final int TIPO_LISTINO_PERC_SCONTO_VEND = 0;
+
+ public static final int TIPO_LISTINO_RICARICO_ACQ = 1;
+
+ public static final int TIPO_LISTINO_RICARICO_PREZZO_BASE = 2;
+
+ public static final int TIPO_LISTINO_BASE = 99;
+
+ public static final int PREZZO = 0;
+
+ public static final int PERTCENTUALE = 1;
+
+ private long id_listino;
+
+ private long flgTipoL;
+
+ private String descrizione;
+
+ private double percL;
+
+ private double percL1;
+
+ private double percL2;
+
+ private double percL3;
+
+ public Listino(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Listino() {}
+
+ public void setId_listino(long newId_listino) {
+ this.id_listino = newId_listino;
+ }
+
+ public void setFlgTipoL(long newFlgTipo) {
+ this.flgTipoL = newFlgTipo;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setPercL(double newPercL) {
+ this.percL = newPercL;
+ }
+
+ public long getId_listino() {
+ return this.id_listino;
+ }
+
+ public long getFlgTipoL() {
+ return this.flgTipoL;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public double getPercL() {
+ return this.percL;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(ListinoCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from LISTINO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.descrizione like '%" + token + "%' or A.descrizione like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ if (!CR.getDescrizione().trim().isEmpty())
+ wc.addWc("A.descrizione like'%" + CR.getDescrizione() + "%'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getTipoL() {
+ return getTipoL(getFlgTipoL());
+ }
+
+ public String getDescrizioneCompleta() {
+ if (getId_listino() == 0L)
+ return "";
+ return getDescrizione() + " " + getDescrizione() + " " + getTipoL();
+ }
+
+ public ResParm addListinoTipo(ListinoTipo row) {
+ ListinoTipo bean = new ListinoTipo(getApFull());
+ bean.findByPrimaryKey(row.getId_listinoTipo());
+ if (bean.getDBState() == 1)
+ row.setDBState(bean.getDBState());
+ ResParm rp = row.save();
+ return rp;
+ }
+
+ public ResParm delListinoTipo(ListinoTipo row) {
+ ListinoTipo bean = new ListinoTipo(getApFull());
+ bean.findByPrimaryKey(row.getId_listinoTipo());
+ return bean.delete();
+ }
+
+ public Vectumerator getListinoTipo() {
+ return new ListinoTipo(getApFull()).findByListino(getId_listino(), 0, 0);
+ }
+
+ public boolean hasListinoTipo() {
+ Vectumerator vec = new ListinoTipo(getApFull()).findByListino(getId_listino(), 1, 1);
+ if (vec.hasMoreElements())
+ return true;
+ return false;
+ }
+
+ public boolean hasListinoArticolo(Articolo bean) {
+ ListinoArticolo la = new ListinoArticolo(getApFull());
+ la.findByArticoloListino(bean.getId_articolo(), getId_listino());
+ if (la.getId_listinoArticolo() > 0L)
+ return true;
+ return false;
+ }
+
+ public boolean hasListinoArticoloVariante(ArticoloVariante bean) {
+ ListinoArticolo la = new ListinoArticolo(getApFull());
+ la.findByArticoloVarianteListino(bean.getId_articoloVariante(), getId_listino());
+ if (la.getId_listinoArticolo() > 0L)
+ return true;
+ return false;
+ }
+
+ public double getPercSconto(Articolo articolo) {
+ if (getId_listino() == 0L || getFlgTipoL() == 1L)
+ return 0.0D;
+ ListinoArticolo listinoArticolo = new ListinoArticolo(getApFull());
+ listinoArticolo.findByArticoloListino(articolo.getId_articolo(), getId_listino());
+ if (listinoArticolo.getId_listinoArticolo() > 0L)
+ return listinoArticolo.getPercEffettiva();
+ double percSconto = getPercEffettiva();
+ ListinoTipo listinoTipo = new ListinoTipo(getApFull());
+ listinoTipo.findByListinoTipo(getId_listino(), articolo.getId_tipo());
+ if (listinoTipo.getId_listinoTipo() > 0L)
+ percSconto = listinoTipo.getPercEffettiva();
+ return percSconto;
+ }
+
+ public double getPercSconto(ArticoloVariante articoloVariante) {
+ if (getId_listino() == 0L || getFlgTipoL() == 1L)
+ return 0.0D;
+ ListinoArticolo listinoArticolo = new ListinoArticolo(getApFull());
+ listinoArticolo.findByArticoloListino(articoloVariante.getId_articolo(), getId_listino());
+ if (listinoArticolo.getId_listinoArticolo() > 0L)
+ return listinoArticolo.getPercEffettiva();
+ return getPercSconto(articoloVariante.getArticolo());
+ }
+
+ public PrezzoArticolo getPrezzoIva(Articolo articolo) {
+ return getPrezzo(articolo).conIva((double)articolo.getIva().getAliquota());
+ }
+
+ public PrezzoArticolo getPrezzoIva(Articolo articolo, Iva l_iva) {
+ return getPrezzo(articolo).conIva((double)l_iva.getAliquota());
+ }
+
+ public PrezzoArticolo getPrezzoBaseLA(Articolo articolo) {
+ PrezzoArticolo pa = new PrezzoArticolo(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
+ if (getId_listino() == 0L || articolo == null || articolo.getId_articolo() == 0L || getFlgTipoL() != 99L)
+ return pa;
+ ListinoArticolo listinoArticolo = new ListinoArticolo(getApFull());
+ listinoArticolo.findByArticoloListino(articolo.getId_articolo(), getId_listino());
+ if (listinoArticolo.getId_listinoArticolo() > 0L)
+ pa = listinoArticolo.getPrezzoArticoloLA();
+ return pa;
+ }
+
+ public PrezzoArticolo getPrezzoBaseIvaLA(Articolo articolo) {
+ return getPrezzoBaseLA(articolo).conIva((double)articolo.getIva().getAliquota());
+ }
+
+ public PrezzoArticolo getPrezzo(Articolo articolo) {
+ PrezzoArticolo pa = new PrezzoArticolo(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
+ if (getId_listino() == 0L || articolo == null || articolo.getId_articolo() == 0L)
+ return pa;
+ if (getFlgTipoL() == 99L) {
+ ListinoArticolo listinoArticolo1 = new ListinoArticolo(getApFull());
+ listinoArticolo1.findByArticoloListino(articolo.getId_articolo(), getId_listino());
+ if (listinoArticolo1.getId_listinoArticolo() > 0L)
+ pa = listinoArticolo1.getPrezzoFinaleLA();
+ return pa;
+ }
+ PrezzoArticolo prezzoArticoloBase = dammiListinoBase(getApFull()).getPrezzo(articolo);
+ ListinoArticolo listinoArticolo = new ListinoArticolo(getApFull());
+ listinoArticolo.findByArticoloListino(articolo.getId_articolo(), getId_listino());
+ if (listinoArticolo.getId_listinoArticolo() > 0L) {
+ pa = listinoArticolo.getPrezzoFinaleLA();
+ } else {
+ ListinoTipo listinoTipo = new ListinoTipo(getApFull());
+ listinoTipo.findByListinoTipo(getId_listino(), articolo.getId_tipo());
+ if (listinoTipo.getId_listinoTipo() > 0L) {
+ pa = listinoTipo.getPrezzoFinaleLT(articolo);
+ } else {
+ double prezzoBase = articolo.getPrezzoBase();
+ double perc = getPercEffettiva();
+ if (perc > 0.0D) {
+ if (getFlgTipoL() == 0L) {
+ DoubleOperator pps = new DoubleOperator(100.0F);
+ pps.setScale(4, 5);
+ pps.subtract(perc);
+ pps.multiply(prezzoBase);
+ pps.divide(100.0F);
+ pps.setScale(2, 5);
+ pa = new PrezzoArticolo(prezzoBase, getPercL(), pps.getResult(), getPercL1(), getPercL2(), getPercL3(), 0.0D);
+ } else if (getFlgTipoL() == 1L) {
+ if (articolo.getCostoAcquistoUltimo() > 0.0D) {
+ DoubleOperator pps = new DoubleOperator(100.0F);
+ pps.setScale(4, 5);
+ pps.add(perc);
+ pps.multiply(articolo.getCostoAcquistoUltimo());
+ pps.divide(100.0F);
+ pps.setScale(2, 5);
+ pa = new PrezzoArticolo(0.0D, 0.0D, pps.getResult(), getPercL1(), getPercL2(), getPercL3(), 0.0D);
+ }
+ } else if (getFlgTipoL() == 2L) {
+ if (prezzoBase > 0.0D) {
+ DoubleOperator pps = new DoubleOperator(100.0F);
+ pps.setScale(4, 5);
+ pps.add(perc);
+ pps.multiply(prezzoBase);
+ pps.divide(100.0F);
+ pps.setScale(2, 5);
+ pa = new PrezzoArticolo(0.0D, 0.0D, pps.getResult(), getPercL1(), getPercL2(), getPercL3(), 0.0D);
+ }
+ }
+ } else {
+ return dammiListinoBase(getApFull()).getPrezzo(articolo);
+ }
+ }
+ }
+ if (pa.getPrezzoFinale() > 0.0D) {
+ double prezzoBaseFinale = prezzoArticoloBase.getPrezzoFinale();
+ if (getFlgTipoL() != 2L && prezzoBaseFinale < pa.getPrezzoFinale())
+ return prezzoArticoloBase;
+ return pa;
+ }
+ return prezzoArticoloBase;
+ }
+
+ public PrezzoArticolo getPrezzo(ArticoloVariante articoloVariante) {
+ PrezzoArticolo pa;
+ if (getId_listino() == 0L || articoloVariante == null || articoloVariante.getId_articoloVariante() == 0L) {
+ pa = new PrezzoArticolo(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
+ return pa;
+ }
+ ListinoArticolo listinoArticolo = new ListinoArticolo(getApFull());
+ listinoArticolo.findByArticoloVarianteListino(articoloVariante.getId_articoloVariante(), getId_listino());
+ if (listinoArticolo.getId_listinoArticolo() > 0L) {
+ pa = listinoArticolo.getPrezzoFinaleLA();
+ } else {
+ pa = getPrezzo(articoloVariante.getArticolo());
+ }
+ if (getFlgTipoL() != 99L) {
+ PrezzoArticolo prezzoArticoloBase = dammiListinoBase(getApFull()).getPrezzo(articoloVariante);
+ double prezzoBaseFinale = prezzoArticoloBase.getPrezzoFinale();
+ if (prezzoBaseFinale < pa.getPrezzoFinale())
+ return prezzoArticoloBase;
+ return pa;
+ }
+ return pa;
+ }
+
+ public static final String getTipoL(long l_flgTipo) {
+ switch ((int)l_flgTipo) {
+ case 0:
+ return "Sconto su Vendita";
+ case 1:
+ return "Ricarico su Acquisto";
+ case 99:
+ return "Listino base";
+ case 2:
+ return "Ricarico aggiuntivo su prezzo base";
+ }
+ return "??";
+ }
+
+ public Vectumerator getListinoArticoloVariante(int pageNumber, int pageRows) {
+ return new ListinoArticolo(getApFull()).findArticoliVarianteByListino(getId_listino(), pageNumber, pageRows);
+ }
+
+ public ResParm addListinoArticolo(ListinoArticolo row) {
+ ResParm rp = new ResParm(true);
+ ListinoArticolo bean = new ListinoArticolo(getApFull());
+ bean.findByPrimaryKey(row.getId_listinoArticolo());
+ if (bean.getDBState() == 1) {
+ bean.setPrezzoLA(row.getPrezzoLA());
+ bean.setPercLA(row.getPercLA());
+ bean.setPercLA1(row.getPercLA1());
+ bean.setPercLA2(row.getPercLA2());
+ bean.setPercLA3(row.getPercLA3());
+ rp = bean.save();
+ } else {
+ row.setDBState(0);
+ rp = row.save();
+ }
+ return rp;
+ }
+
+ public ResParm addListinoArticoloVariante(ListinoArticolo row) {
+ ResParm rp = new ResParm(true);
+ ListinoArticolo bean = new ListinoArticolo(getApFull());
+ bean.findByPrimaryKey(row.getId_listinoArticolo());
+ if (bean.getDBState() == 1) {
+ bean.setPrezzoLA(row.getPrezzoLA());
+ bean.setPercLA(row.getPercLA());
+ bean.setPercLA1(row.getPercLA1());
+ bean.setPercLA2(row.getPercLA2());
+ bean.setPercLA3(row.getPercLA3());
+ bean.setDataScadenzaOffertaLA(row.getDataScadenzaOffertaLA());
+ bean.setPrezzoOffertaLA(row.getPrezzoOffertaLA());
+ rp = bean.save();
+ } else {
+ row.setDBState(0);
+ rp = row.save();
+ }
+ return rp;
+ }
+
+ public ResParm delListinoArticolo(ListinoArticolo row) {
+ ListinoArticolo bean = new ListinoArticolo(getApFull());
+ bean.findByPrimaryKey(row.getId_listinoArticolo());
+ return bean.delete();
+ }
+
+ public Vectumerator getListinoArticolo(int pageNumber, int pageRows) {
+ return new ListinoArticolo(getApFull()).findArticoliByListino(getId_listino(), pageNumber, pageRows);
+ }
+
+ public void findListinoBase() {
+ String s_Sql_Find = "select A.* from LISTINO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("A.flgTipoL = 99");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public void creaListinoBase() {
+ setDescrizione("Listino Base");
+ setFlgTipoL(99L);
+ save();
+ }
+
+ public double getPercLAByArticoloListino(long id_articolo, long id_listino) {
+ double percentuale = 0.0D;
+ ListinoArticolo la = new ListinoArticolo(getApFull());
+ la.findByArticoloListino(id_articolo, id_listino);
+ if (getFlgTipoL() == 99L) {
+ if (la.isOffertaValida()) {
+ percentuale = 0.0D;
+ } else {
+ percentuale = la.getPercLA();
+ }
+ } else {
+ double perc = 0.0D;
+ if (la.getPercLA() != 0.0D) {
+ perc = la.getPercLA();
+ } else {
+ perc = getPercL();
+ }
+ Listino lis = dammiListinoBase(getApFull());
+ double prezzoBase = getPrezzoByArticoloListino(id_articolo, lis.getId_listino(), true);
+ DoubleOperator dp = new DoubleOperator(prezzoBase);
+ dp.multiply(perc);
+ dp.divide(100.0F);
+ dp.add(prezzoBase);
+ double prezzoLisCli = dp.getResult();
+ double prezzoLisBase = lis.getPrezzoByArticoloListino(id_articolo, lis.getId_listino(), false);
+ if (prezzoLisCli > prezzoLisBase) {
+ percentuale = lis.getPercLAByArticoloListino(id_articolo, lis.getId_listino());
+ } else {
+ percentuale = perc;
+ }
+ }
+ return percentuale;
+ }
+
+ public double getPercLAByArticoloVarianteListino(long id_articoloVariante, long id_listino) {
+ double percentuale = 0.0D;
+ ListinoArticolo la = new ListinoArticolo(getApFull());
+ la.findByArticoloVarianteListino(id_articoloVariante, id_listino);
+ if (getFlgTipoL() == 99L) {
+ if (la.isOffertaValida()) {
+ percentuale = 0.0D;
+ } else {
+ percentuale = la.getPercLA();
+ }
+ } else {
+ double perc = 0.0D;
+ if (la.getPercLA() != 0.0D) {
+ perc = la.getPercLA();
+ } else {
+ perc = getPercL();
+ }
+ Listino lis = dammiListinoBase(getApFull());
+ double prezzoBase = getPrezzoByArticoloVarianteListino(id_articoloVariante, lis.getId_listino(), true);
+ DoubleOperator dp = new DoubleOperator(prezzoBase);
+ dp.multiply(perc);
+ dp.divide(100.0F);
+ dp.add(prezzoBase);
+ double prezzoLisCli = dp.getResult();
+ double prezzoLisBase = lis.getPrezzoByArticoloVarianteListino(id_articoloVariante, lis.getId_listino(), false);
+ if (prezzoLisCli > prezzoLisBase) {
+ percentuale = lis.getPercLAByArticoloVarianteListino(id_articoloVariante, lis.getId_listino());
+ } else {
+ percentuale = perc;
+ }
+ }
+ return percentuale;
+ }
+
+ public double getPrezzoByArticoloListino(long id_articolo, long id_listino, boolean rendiPrezzoBase) {
+ double prezzo = 0.0D;
+ ListinoArticolo la = new ListinoArticolo(getApFull());
+ la.findByArticoloListino(id_articolo, id_listino);
+ if (rendiPrezzoBase) {
+ prezzo = la.getPrezzoLA();
+ } else if (getFlgTipoL() == 99L) {
+ if (la.isOffertaValida()) {
+ DoubleOperator dp = new DoubleOperator(la.getPrezzoLA());
+ dp.multiply(la.getPercLA());
+ dp.divide(100.0F);
+ dp.add(la.getPrezzoLA());
+ if (dp.getResult() > la.getPrezzoOffertaLA())
+ prezzo = la.getPrezzoOffertaLA();
+ } else {
+ prezzo = la.getPrezzoLA();
+ }
+ } else {
+ double perc = 0.0D;
+ if (la.getPercLA() != 0.0D) {
+ perc = la.getPercLA();
+ } else {
+ perc = getPercL();
+ }
+ Listino lis = dammiListinoBase(getApFull());
+ double prezzoBase = getPrezzoByArticoloListino(id_articolo, lis.getId_listino(), true);
+ DoubleOperator dp = new DoubleOperator(prezzoBase);
+ dp.multiply(perc);
+ dp.divide(100.0F);
+ dp.add(prezzoBase);
+ double prezzoLisCli = dp.getResult();
+ double prezzoLisBase = lis.getPrezzoByArticoloListino(id_articolo, lis.getId_listino(), false);
+ if (prezzoLisCli > prezzoLisBase) {
+ if (lis.getPercLAByArticoloListino(id_articolo, id_listino) > 0.0D) {
+ prezzo = prezzoBase;
+ } else {
+ prezzo = prezzoLisBase;
+ }
+ } else {
+ prezzo = prezzoLisCli;
+ }
+ }
+ return prezzo;
+ }
+
+ public double getPrezzoByArticoloVarianteListino(long id_articoloVariante, long id_listino, boolean rendiPrezzoBase) {
+ double prezzo = 0.0D;
+ ListinoArticolo la = new ListinoArticolo(getApFull());
+ la.findByArticoloVarianteListino(id_articoloVariante, id_listino);
+ if (rendiPrezzoBase) {
+ prezzo = la.getPrezzoLA();
+ } else if (getFlgTipoL() == 99L) {
+ if (la.isOffertaValida()) {
+ DoubleOperator dp = new DoubleOperator(la.getPrezzoLA());
+ dp.multiply(la.getPercLA());
+ dp.divide(100.0F);
+ dp.add(la.getPrezzoLA());
+ if (dp.getResult() > la.getPrezzoOffertaLA())
+ if (la.getPercLA() > 0.0D) {
+ prezzo = la.getPrezzoLA();
+ } else {
+ prezzo = la.getPrezzoOffertaLA();
+ }
+ } else {
+ prezzo = la.getPrezzoLA();
+ }
+ } else {
+ double perc = 0.0D;
+ if (la.getPercLA() != 0.0D) {
+ perc = la.getPercLA();
+ } else {
+ perc = getPercL();
+ }
+ Listino lis = dammiListinoBase(getApFull());
+ double prezzoBase = getPrezzoByArticoloVarianteListino(id_articoloVariante, lis.getId_listino(), true);
+ DoubleOperator dp = new DoubleOperator(prezzoBase);
+ dp.multiply(perc);
+ dp.divide(100.0F);
+ dp.add(prezzoBase);
+ double prezzoLisCli = dp.getResult();
+ double prezzoLisBase = lis.getPrezzoByArticoloVarianteListino(id_articoloVariante, lis.getId_listino(), false);
+ if (prezzoLisCli > prezzoLisBase) {
+ if (lis.getPercLAByArticoloVarianteListino(id_articoloVariante, id_listino) > 0.0D) {
+ prezzo = prezzoBase;
+ } else {
+ prezzo = prezzoLisBase;
+ }
+ } else {
+ prezzo = prezzoBase;
+ }
+ }
+ return prezzo;
+ }
+
+ public double getPrezzoOld(Articolo articolo) {
+ if (getId_listino() == 0L)
+ return articolo.getPrezzoPubblico();
+ ListinoArticolo listinoArticolo = new ListinoArticolo(getApFull());
+ listinoArticolo.findByArticoloListino(articolo.getId_articolo(), getId_listino());
+ if (listinoArticolo.getId_listinoArticolo() > 0L) {
+ if (listinoArticolo.getPrezzoLA() > 0.0D)
+ return listinoArticolo.getPrezzoLA();
+ if (getFlgTipoL() == 0L || listinoArticolo.getPercLA() == 0.0D)
+ return articolo.getPrezzoPubblico();
+ DoubleOperator pps = new DoubleOperator(100.0F);
+ pps.setScale(4, 5);
+ pps.add(listinoArticolo.getPercLA());
+ pps.multiply(articolo.getCostoAcquistoUltimo());
+ pps.divide(100.0F);
+ pps.setScale(2, 5);
+ return pps.getResult();
+ }
+ if (getFlgTipoL() == 1L) {
+ double percRicarico = getPercL();
+ ListinoTipo listinoTipo = new ListinoTipo(getApFull());
+ listinoTipo.findByListinoTipo(getId_listino(), articolo.getId_tipo());
+ if (listinoTipo.getId_listinoTipo() > 0L)
+ percRicarico = listinoTipo.getPercLT();
+ if (percRicarico > 0.0D) {
+ DoubleOperator pps = new DoubleOperator(100.0F);
+ pps.setScale(4, 5);
+ pps.add(percRicarico);
+ pps.multiply(articolo.getCostoAcquistoUltimo());
+ pps.divide(100.0F);
+ pps.setScale(2, 5);
+ return pps.getResult();
+ }
+ return articolo.getPrezzoPubblico();
+ }
+ return articolo.getPrezzoPubblico();
+ }
+
+ public double getPrezzoOld(ArticoloVariante articoloVariante) {
+ if (getId_listino() == 0L)
+ return articoloVariante.getArticolo().getPrezzoPubblico();
+ ListinoArticolo listinoArticolo = new ListinoArticolo(getApFull());
+ listinoArticolo.findByArticoloVarianteListino(articoloVariante.getId_articoloVariante(), getId_listino());
+ if (listinoArticolo.getId_listinoArticolo() > 0L) {
+ if (listinoArticolo.getPrezzoLA() > 0.0D)
+ return listinoArticolo.getPrezzoLA();
+ if (getFlgTipoL() == 0L || listinoArticolo.getPercLA() == 0.0D)
+ return articoloVariante.getArticolo().getPrezzoPubblico();
+ DoubleOperator pps = new DoubleOperator(100.0F);
+ pps.setScale(4, 5);
+ pps.add(listinoArticolo.getPercLA());
+ pps.multiply(articoloVariante.getArticolo().getCostoAcquistoUltimo());
+ pps.divide(100.0F);
+ pps.setScale(2, 5);
+ return pps.getResult();
+ }
+ return 0.0D;
+ }
+
+ public PrezzoArticolo getPrezzoIva(ArticoloVariante articoloVariante) {
+ return getPrezzo(articoloVariante).conIva((double)articoloVariante.getArticolo().getIva().getAliquota());
+ }
+
+ public ListinoArticolo getListinoArticoloBase(Articolo articolo) {
+ if (getApFull() != null && articolo.getId_articolo() != 0L) {
+ ListinoArticolo listinoArticoloBase = new ListinoArticolo(getApFull());
+ listinoArticoloBase.findByArticoloListino(articolo.getId_articolo(), dammiListinoBase(getApFull()).getId_listino());
+ return listinoArticoloBase;
+ }
+ return null;
+ }
+
+ public double getPercL1() {
+ return this.percL1;
+ }
+
+ public double getPercL2() {
+ return this.percL2;
+ }
+
+ public double getPercL3() {
+ return this.percL3;
+ }
+
+ public void setPercL1(double percL1) {
+ this.percL1 = percL1;
+ }
+
+ public void setPercL2(double percL2) {
+ this.percL2 = percL2;
+ }
+
+ public void setPercL3(double percL3) {
+ this.percL3 = percL3;
+ }
+
+ public String getDescrizionePercentuale() {
+ if (isPercentualiSconto3())
+ return getNf2().format(getPercL1()) + " + " + getNf2().format(getPercL1()) + " + " + getNf2().format(getPercL2()) + " %";
+ return getNf2().format(getPercL()) + " %";
+ }
+
+ public double getPercEffettiva() {
+ if (isPercentualiSconto3()) {
+ double perc = getPercL1();
+ if (perc > 0.0D &&
+ getPercL2() > 0.0D) {
+ perc = getSommaPercentuali(perc, getPercL2());
+ if (getPercL3() > 0.0D)
+ perc = getSommaPercentuali(perc, getPercL3());
+ }
+ return perc;
+ }
+ return getPercL();
+ }
+
+ public Vectumerator findNoListinoBase() {
+ String s_Sql_Find = "select A.* from LISTINO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("A.flgTipoL <> 99");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public static final Listino dammiListinoBase(ApplParmFull apFull) {
+ Listino bean = new Listino(apFull);
+ bean.findListinoBase();
+ if (bean.getDBState() == 0)
+ bean.creaListinoBase();
+ return bean;
+ }
+
+ public static final double getSommaPercentuali(double perc1, double perc2) {
+ DoubleOperator dop = new DoubleOperator(100.0F);
+ dop.setScale(2, 5);
+ dop.subtract(perc1);
+ dop.multiply(perc2);
+ dop.divide(100.0F);
+ dop.add(perc1);
+ return dop.getResult();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoArticolo.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoArticolo.java
new file mode 100644
index 00000000..293bc9f7
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoArticolo.java
@@ -0,0 +1,500 @@
+package it.acxent.anag;
+
+import it.acxent.art.Articolo;
+import it.acxent.art.ArticoloVariante;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.DoubleOperator;
+import it.acxent.util.Vectumerator;
+import java.sql.Date;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+public class ListinoArticolo extends _AnagAdapter {
+ private long id_listinoArticolo;
+
+ private long id_listino;
+
+ private long id_articolo;
+
+ private long id_articoloVariante;
+
+ private double prezzoLA;
+
+ private Listino listino;
+
+ private Articolo articolo;
+
+ private ArticoloVariante articoloVariante;
+
+ private double percLA;
+
+ private double prezzoOffertaLA;
+
+ private Date dataScadenzaOffertaLA;
+
+ private double abbuonoPrezzoPubblicoLA;
+
+ private Date dataCambiamentoPrezzoLA;
+
+ private double prezzoLADb;
+
+ private double prezzoConIvaLA;
+
+ private double percLA1;
+
+ private double percLA3;
+
+ private double percLA2;
+
+ private double percScontoOffertaLA;
+
+ public ListinoArticolo(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public ListinoArticolo() {}
+
+ public long getId_listinoArticolo() {
+ return this.id_listinoArticolo;
+ }
+
+ public void setId_listinoArticolo(long id_listinoArticolo) {
+ this.id_listinoArticolo = id_listinoArticolo;
+ }
+
+ public long getId_listino() {
+ return this.id_listino;
+ }
+
+ public void setId_listino(long id_listino) {
+ this.id_listino = id_listino;
+ }
+
+ public long getId_articolo() {
+ return this.id_articolo;
+ }
+
+ public void setId_articolo(long id_articolo) {
+ this.id_articolo = id_articolo;
+ }
+
+ public long getId_articoloVariante() {
+ return this.id_articoloVariante;
+ }
+
+ public void setId_articoloVariante(long id_articoloVariante) {
+ this.id_articoloVariante = id_articoloVariante;
+ }
+
+ public double getPrezzoLA() {
+ return Math.abs(this.prezzoLA);
+ }
+
+ public double getPrezzoIvaLA() {
+ return DBAdapter.conIva(getPrezzoLA(), (double)getArticolo().getIva().getAliquota());
+ }
+
+ public PrezzoArticolo getPrezzoFinaleIvaLA() {
+ return getPrezzoFinaleLA().conIva((double)getArticolo().getIva().getAliquota());
+ }
+
+ public double getPrezzoIvaAbbuonoLA() {
+ DoubleOperator dp = new DoubleOperator(DBAdapter.conIva(getPrezzoLA(), (double)getArticolo().getIva().getAliquota()));
+ if (getListino().getFlgTipoL() == 99L) {
+ dp.subtract(getAbbuonoPrezzoPubblicoLA());
+ dp.setScale(2, 5);
+ }
+ return dp.getResult();
+ }
+
+ public double getPrezzoScontatoLA() {
+ double perc = getPercEffettiva();
+ if (perc != 0.0D) {
+ DoubleOperator pps = new DoubleOperator(100.0F);
+ pps.setScale(4, 5);
+ pps.subtract(perc);
+ pps.multiply(getPrezzoLA());
+ pps.divide(100.0F);
+ pps.setScale(2, 5);
+ return pps.getResult();
+ }
+ return getPrezzoLA();
+ }
+
+ public PrezzoArticolo getPrezzoArticoloLA() {
+ return new PrezzoArticolo(getPrezzoLA(), 0.0D, getPrezzoLA(), 0.0D, 0.0D, 0.0D, 0.0D);
+ }
+
+ public PrezzoArticolo getPrezzoArticoloIvaLA() {
+ return getPrezzoArticoloLA().conIva((double)getArticolo().getIva().getAliquota());
+ }
+
+ public PrezzoArticolo getPrezzoFinaleLA() {
+ if (getId_listino() > 0L) {
+ if (getListino().getFlgTipoL() == 99L) {
+ if (isOffertaValida()) {
+ PrezzoArticolo prezzoArticolo2 = new PrezzoArticolo(getPrezzoOffertaLA(), 0.0D, getPrezzoOffertaLA(), 0.0D, 0.0D, 0.0D, 0.0D);
+ prezzoArticolo2.setOfferta(true);
+ prezzoArticolo2.setDataScadenzaOfferta(getDataScadenzaOffertaLA());
+ return prezzoArticolo2;
+ }
+ PrezzoArticolo prezzoArticolo1 = new PrezzoArticolo(getPrezzoLA(), getPercLA(), getPrezzoScontatoLA(), getPercLA1(), getPercLA2(), getPercLA3(),
+ getAbbuonoPrezzoPubblicoLA());
+ return prezzoArticolo1;
+ }
+ if (isOffertaValida()) {
+ PrezzoArticolo prezzoArticolo1 = new PrezzoArticolo(getPrezzoOffertaLA(), 0.0D, getPrezzoOffertaLA(), 0.0D, 0.0D, 0.0D, 0.0D);
+ prezzoArticolo1.setOfferta(true);
+ prezzoArticolo1.setDataScadenzaOfferta(getDataScadenzaOffertaLA());
+ return prezzoArticolo1;
+ }
+ double perc = getPercEffettiva();
+ if (perc > 0.0D) {
+ if (getListino().getFlgTipoL() == 0L) {
+ double prezzobase = getArticolo().getPrezzoBase();
+ DoubleOperator pps = new DoubleOperator(100.0F);
+ pps.setScale(4, 5);
+ pps.subtract(perc);
+ pps.multiply(prezzobase);
+ pps.divide(100.0F);
+ pps.setScale(2, 5);
+ PrezzoArticolo prezzoArticolo2 = new PrezzoArticolo(prezzobase, getPercLA(), pps.getResult(), getPercLA1(), getPercLA2(), getPercLA3(),
+ getAbbuonoPrezzoPubblicoLA());
+ return prezzoArticolo2;
+ }
+ if (getListino().getFlgTipoL() == 1L) {
+ if (this.articolo.getCostoAcquistoUltimo() > 0.0D) {
+ DoubleOperator pps = new DoubleOperator(100.0F);
+ pps.setScale(4, 5);
+ pps.add(perc);
+ pps.multiply(getArticolo().getCostoAcquistoUltimo());
+ pps.divide(100.0F);
+ pps.setScale(2, 5);
+ PrezzoArticolo prezzoArticolo3 = new PrezzoArticolo(0.0D, 0.0D, pps.getResult(), 0.0D, 0.0D, 0.0D, 0.0D);
+ return prezzoArticolo3;
+ }
+ PrezzoArticolo prezzoArticolo2 = new PrezzoArticolo(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
+ return prezzoArticolo2;
+ }
+ if (getListino().getFlgTipoL() == 2L) {
+ DoubleOperator pps = new DoubleOperator(100.0F);
+ pps.setScale(4, 5);
+ pps.add(perc);
+ pps.multiply(getArticolo().getPrezzoBase());
+ pps.divide(100.0F);
+ pps.setScale(2, 5);
+ PrezzoArticolo prezzoArticolo2 = new PrezzoArticolo(0.0D, 0.0D, pps.getResult(), 0.0D, 0.0D, 0.0D, 0.0D);
+ return prezzoArticolo2;
+ }
+ PrezzoArticolo prezzoArticolo1 = new PrezzoArticolo(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
+ return prezzoArticolo1;
+ }
+ PrezzoArticolo prezzoArticolo = new PrezzoArticolo(getPrezzoLA(), 0.0D, getPrezzoLA(), 0.0D, 0.0D, 0.0D, 0.0D);
+ return prezzoArticolo;
+ }
+ PrezzoArticolo pa = new PrezzoArticolo(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
+ return pa;
+ }
+
+ public double getPercEffettiva() {
+ if (isPercentualiSconto3()) {
+ double perc = getPercLA1();
+ if (perc > 0.0D &&
+ getPercLA2() > 0.0D) {
+ perc = Listino.getSommaPercentuali(perc, getPercLA2());
+ if (getPercLA3() > 0.0D)
+ perc = Listino.getSommaPercentuali(perc, getPercLA3());
+ }
+ return perc;
+ }
+ return getPercLA();
+ }
+
+ public void setPrezzoLA(double prezzoLA) {
+ this.prezzoLA = prezzoLA;
+ }
+
+ public Articolo getArticolo() {
+ this.articolo = (Articolo)getSecondaryObject(this.articolo, Articolo.class, getId_articolo());
+ return this.articolo;
+ }
+
+ public ArticoloVariante getArticoloVariante() {
+ this.articoloVariante = (ArticoloVariante)getSecondaryObject(this.articoloVariante, ArticoloVariante.class, getId_articoloVariante());
+ return this.articoloVariante;
+ }
+
+ public Listino getListino() {
+ this.listino = (Listino)getSecondaryObject(this.listino, Listino.class, getId_listino());
+ return this.listino;
+ }
+
+ public void findByArticoloListino(long id_articolo, long id_listino) {
+ String s_Sql_Find = "select A.* from LISTINO_ARTICOLO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("A.id_listino=" + id_listino);
+ wc.addWc("A.id_articolo=" + id_articolo);
+ wc.addWc("(A.id_articoloVariante=0 OR A.id_articoloVariante IS NULL)");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ if (getId_listinoArticolo() == 0L) {
+ setId_articolo(id_articolo);
+ setId_listino(id_listino);
+ }
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public Vectumerator findPrezziByArticolo(long id_articolo) {
+ String s_Sql_Find = "select A.*, B.nome as b_nome from LISTINO_ARTICOLO AS A INNER JOIN ARTICOLO AS B ON A.id_articolo = B.id_articolo";
+ String s_Sql_Order = " ORDER BY B.nome";
+ WcString wc = new WcString();
+ wc.addWc("A.id_articolo=" + id_articolo);
+ wc.addWc("(A.id_articoloVariante=0 OR A.id_articoloVariante IS NULL)");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public void findByArticoloVarianteListino(long id_articoloVariante, long id_listino) {
+ String s_Sql_Find = "select A.* from LISTINO_ARTICOLO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("id_listino=" + id_listino);
+ wc.addWc("id_articoloVariante=" + id_articoloVariante);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public Vectumerator findPrezziByArticoloVariante(long id_articoloVariante) {
+ String s_Sql_Find = "select A.* from LISTINO_ARTICOLO AS A INNER JOIN ARTICOLO_VARIANTE AS B ON A.id_articoloVariante = B.id_articoloVariante";
+ String s_Sql_Order = " ORDER BY B.nomeV";
+ WcString wc = new WcString();
+ wc.addWc("A.id_articoloVariante=" + id_articoloVariante);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public double getPercLA() {
+ return this.percLA;
+ }
+
+ public void setPercLA(double percLA) {
+ this.percLA = percLA;
+ }
+
+ public Vectumerator findArticoliByListino(long id_listino, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from LISTINO_ARTICOLO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("A.id_listino=" + id_listino);
+ wc.addWc("(A.id_articoloVariante=0 OR A.id_articoloVariante IS NULL)");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public Vectumerator findArticoliVarianteByListino(long id_listino, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from LISTINO_ARTICOLO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("id_listino=" + id_listino);
+ wc.addWc("id_articoloVariante!=0");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public double getPrezzoOffertaLA() {
+ return this.prezzoOffertaLA;
+ }
+
+ public double getPrezzoOffertaIvaLA() {
+ return DBAdapter.conIva(getPrezzoOffertaLA(), (double)getArticolo().getIva().getAliquota());
+ }
+
+ public void setPrezzoOffertaLA(double prezzoOfferta) {
+ this.prezzoOffertaLA = prezzoOfferta;
+ }
+
+ public Date getDataScadenzaOffertaLA() {
+ return this.dataScadenzaOffertaLA;
+ }
+
+ public void setDataScadenzaOffertaLA(Date dataScadenzaOfferta) {
+ this.dataScadenzaOffertaLA = dataScadenzaOfferta;
+ }
+
+ public boolean isOffertaValida() {
+ if (getDataScadenzaOffertaLA() == null || getDateDiff(getToday(), getDataScadenzaOffertaLA()) < 0L || getPrezzoOffertaLA() == 0.0D ||
+ getPrezzoOffertaLA() >= getPrezzoLA())
+ return false;
+ return true;
+ }
+
+ public ResParm save() {
+ if (getId_listino() == 0L || getId_articolo() == 0L)
+ return new ResParm(false, "ERRORE! Impossibile salvare listino con riferimenti a listino o articolo nulli. id_listino=" +
+ getId_listino() + " id_articolo=" + getId_articolo());
+ ResParm rp = super.save();
+ if (rp.getStatus()) {
+ getArticolo().setDataScadenzaOfferta(getDataScadenzaOffertaLA());
+ rp.append(getArticolo().superSave());
+ }
+ return rp;
+ }
+
+ public double getAbbuonoPrezzoPubblicoLA() {
+ return this.abbuonoPrezzoPubblicoLA;
+ }
+
+ public double getAbbuonoPrezzoPubblicoLA(Clifor l_clifor) {
+ return this.abbuonoPrezzoPubblicoLA;
+ }
+
+ public void setAbbuonoPrezzoPubblicoLA(double abbuonoPrezzoPubblico) {
+ this.abbuonoPrezzoPubblicoLA = abbuonoPrezzoPubblico;
+ }
+
+ public Date getDataCambiamentoPrezzoLA() {
+ return this.dataCambiamentoPrezzoLA;
+ }
+
+ public void setDataCambiamentoPrezzoLA(Date dataCambiamentoPrezzoLA) {
+ this.dataCambiamentoPrezzoLA = dataCambiamentoPrezzoLA;
+ }
+
+ protected void prepareSave(PreparedStatement ps) throws SQLException {
+ if (getPrezzoConIvaLA() != 0.0D)
+ setPrezzoLA(DBAdapter.scorporaIva(getPrezzoConIvaLA(), (double)getArticolo().getIva().getAliquota()));
+ if (getPrezzoLA() != getPrezzoLADb())
+ setDataCambiamentoPrezzoLA(getToday());
+ double costoNetto = getArticolo().getCostoNetto();
+ if (getDateDiff(getToday(), getDataScadenzaOffertaLA()) >= 0L && getPercScontoOffertaLA() > 0.0D && costoNetto > 0.0D) {
+ double percRicaricoOfferta = getArticolo().getPercRicarico() - getPercScontoOffertaLA();
+ if (percRicaricoOfferta < getParm("CC_RICARICO_MINIMO_OFFERTE").getNumero())
+ percRicaricoOfferta = getParm("CC_RICARICO_MINIMO_OFFERTE").getNumero();
+ DoubleOperator prNetto = new DoubleOperator(costoNetto);
+ prNetto.multiply(percRicaricoOfferta + 100.0D);
+ prNetto.divide(100.0F);
+ prNetto.setScale(2, 5);
+ double prPubblicoConIva = conIva(prNetto.getResult(), (double)getArticolo().getIva().getAliquota());
+ if (prPubblicoConIva >= getParm("CC_ARROTONDA_PREZZO_A_EURO_SOPRA").getNumero()) {
+ prPubblicoConIva = arrotonda(prPubblicoConIva, 1.0D);
+ } else {
+ prPubblicoConIva = arrotonda(prPubblicoConIva, getParm("CC_ARROTONDA_DECIMALE_PER_PREZZI_BASSI").getNumero());
+ }
+ setPrezzoOffertaLA(scorporaIva(prPubblicoConIva, (double)getArticolo().getIva().getAliquota()));
+ }
+ super.prepareSave(ps);
+ }
+
+ protected void initFields() {
+ super.initFields();
+ setPrezzoLADb(0.0D);
+ }
+
+ protected void fillFields(ResultSet rst) {
+ super.fillFields(rst);
+ setPrezzoLADb(getPrezzoLA());
+ }
+
+ public double getPrezzoLADb() {
+ return this.prezzoLADb;
+ }
+
+ public void setPrezzoLADb(double prezzLADb) {
+ this.prezzoLADb = prezzLADb;
+ }
+
+ public double getPrezzoScontatoIvaLA() {
+ return DBAdapter.conIva(getPrezzoScontatoLA(), (double)getArticolo().getIva().getAliquota());
+ }
+
+ public double getPrezzoConIvaLA() {
+ return this.prezzoConIvaLA;
+ }
+
+ public void setPrezzoConIvaLA(double prezzoConIvaLA) {
+ this.prezzoConIvaLA = prezzoConIvaLA;
+ }
+
+ public boolean hasStessiValori(ListinoArticolo la) {
+ if (la.getPrezzoConIvaLA() != 0.0D && la.getPrezzoLA() == 0.0D)
+ la.setPrezzoLA(DBAdapter.scorporaIva(la.getPrezzoConIvaLA(), (double)getArticolo().getIva().getAliquota()));
+ if (getPrezzoConIvaLA() != 0.0D && getPrezzoLA() == 0.0D)
+ setPrezzoLA(DBAdapter.scorporaIva(getPrezzoConIvaLA(), (double)getArticolo().getIva().getAliquota()));
+ if (la.getPrezzoLA() != getPrezzoLA() || la.getPercLA() != getPercLA() || la.getPercLA1() != getPercLA1() ||
+ la.getPercLA2() != getPercLA2() || la.getPercLA3() != getPercLA3() || la.getPrezzoOffertaLA() != getPrezzoOffertaLA() ||
+ la.getDataScadenzaOffertaLA() != getDataScadenzaOffertaLA() ||
+ la.getAbbuonoPrezzoPubblicoLA() != getAbbuonoPrezzoPubblicoLA())
+ return false;
+ return true;
+ }
+
+ public String getDescrizionePercentuale() {
+ if (isPercentualiSconto3())
+ return getNf2().format(getPercLA1()) + " + " + getNf2().format(getPercLA1()) + " + " + getNf2().format(getPercLA2()) + " %";
+ return getNf2().format(getPercLA()) + " %";
+ }
+
+ public double getPercLA1() {
+ return this.percLA1;
+ }
+
+ public void setPercLA1(double percLA1) {
+ this.percLA1 = percLA1;
+ }
+
+ public double getPercLA3() {
+ return this.percLA3;
+ }
+
+ public void setPercLA3(double percLA3) {
+ this.percLA3 = percLA3;
+ }
+
+ public double getPercLA2() {
+ return this.percLA2;
+ }
+
+ public void setPercLA2(double percLA2) {
+ this.percLA2 = percLA2;
+ }
+
+ public double getPercScontoOffertaLA() {
+ return this.percScontoOffertaLA;
+ }
+
+ public void setPercScontoOffertaLA(double percScontoOffertaLA) {
+ this.percScontoOffertaLA = percScontoOffertaLA;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoArticoloCOPIA.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoArticoloCOPIA.java
new file mode 100644
index 00000000..f187e273
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoArticoloCOPIA.java
@@ -0,0 +1,446 @@
+package it.acxent.anag;
+
+import it.acxent.art.Articolo;
+import it.acxent.art.ArticoloVariante;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.DoubleOperator;
+import it.acxent.util.Vectumerator;
+import java.sql.Date;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+public class ListinoArticoloCOPIA extends _AnagAdapter {
+ private long id_listinoArticolo;
+
+ private long id_listino;
+
+ private long id_articolo;
+
+ private long id_articoloVariante;
+
+ private double prezzoLA;
+
+ private Listino listino;
+
+ private Articolo articolo;
+
+ private ArticoloVariante articoloVariante;
+
+ private double percLA;
+
+ private double prezzoOffertaLA;
+
+ private Date dataScadenzaOffertaLA;
+
+ private double abbuonoPrezzoPubblicoLA;
+
+ private Date dataCambiamentoPrezzoLA;
+
+ private double prezzoLADb;
+
+ private double prezzoConIvaLA;
+
+ private double percLA1;
+
+ private double percLA3;
+
+ private double percLA2;
+
+ public ListinoArticoloCOPIA(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public ListinoArticoloCOPIA() {}
+
+ public long getId_listinoArticolo() {
+ return this.id_listinoArticolo;
+ }
+
+ public void setId_listinoArticolo(long id_listinoArticolo) {
+ this.id_listinoArticolo = id_listinoArticolo;
+ }
+
+ public long getId_listino() {
+ return this.id_listino;
+ }
+
+ public void setId_listino(long id_listino) {
+ this.id_listino = id_listino;
+ }
+
+ public long getId_articolo() {
+ return this.id_articolo;
+ }
+
+ public void setId_articolo(long id_articolo) {
+ this.id_articolo = id_articolo;
+ }
+
+ public long getId_articoloVariante() {
+ return this.id_articoloVariante;
+ }
+
+ public void setId_articoloVariante(long id_articoloVariante) {
+ this.id_articoloVariante = id_articoloVariante;
+ }
+
+ public double getPrezzoLA() {
+ if (getArticolo().getFlgNegativo() == 1L)
+ return -Math.abs(this.prezzoLA);
+ return Math.abs(this.prezzoLA);
+ }
+
+ public double getPrezzoIvaLA() {
+ return DBAdapter.conIva(getPrezzoLA(), (double)getArticolo().getIva().getAliquota());
+ }
+
+ public PrezzoArticolo getPrezzoFinaleIvaLA() {
+ return getPrezzoFinaleLA().conIva((double)getArticolo().getIva().getAliquota());
+ }
+
+ public double getPrezzoIvaAbbuonoLA() {
+ DoubleOperator dp = new DoubleOperator(DBAdapter.conIva(getPrezzoLA(), (double)getArticolo().getIva().getAliquota()));
+ if (getListino().getFlgTipoL() == 99L) {
+ dp.subtract(getAbbuonoPrezzoPubblicoLA());
+ dp.setScale(2, 5);
+ }
+ return dp.getResult();
+ }
+
+ public double getPrezzoScontatoLA() {
+ double perc = getPercEffettiva();
+ if (perc != 0.0D) {
+ DoubleOperator pps = new DoubleOperator(100.0F);
+ pps.setScale(4, 5);
+ pps.subtract(perc);
+ pps.multiply(getPrezzoLA());
+ pps.divide(100.0F);
+ pps.setScale(2, 5);
+ return pps.getResult();
+ }
+ return getPrezzoLA();
+ }
+
+ public PrezzoArticolo getPrezzoFinaleLA() {
+ if (getId_listino() > 0L) {
+ if (getListino().getFlgTipoL() == 99L) {
+ if (isOffertaValida()) {
+ PrezzoArticolo prezzoArticolo2 = new PrezzoArticolo(getPrezzoOffertaLA(), 0.0D, getPrezzoOffertaLA(), 0.0D, 0.0D, 0.0D, 0.0D);
+ prezzoArticolo2.setOfferta(true);
+ prezzoArticolo2.setDataScadenzaOfferta(getDataScadenzaOffertaLA());
+ return prezzoArticolo2;
+ }
+ PrezzoArticolo prezzoArticolo1 = new PrezzoArticolo(getPrezzoLA(), getPercLA(), getPrezzoScontatoLA(), getPercLA1(), getPercLA2(), getPercLA3(),
+ getAbbuonoPrezzoPubblicoLA());
+ return prezzoArticolo1;
+ }
+ if (isOffertaValida()) {
+ PrezzoArticolo prezzoArticolo1 = new PrezzoArticolo(getPrezzoOffertaLA(), 0.0D, getPrezzoOffertaLA(), 0.0D, 0.0D, 0.0D, 0.0D);
+ prezzoArticolo1.setOfferta(true);
+ prezzoArticolo1.setDataScadenzaOfferta(getDataScadenzaOffertaLA());
+ return prezzoArticolo1;
+ }
+ double perc = getPercEffettiva();
+ if (perc > 0.0D) {
+ if (getListino().getFlgTipoL() == 0L) {
+ double prezzobase = getArticolo().getPrezzoBase();
+ DoubleOperator pps = new DoubleOperator(100.0F);
+ pps.setScale(4, 5);
+ pps.subtract(perc);
+ pps.multiply(prezzobase);
+ pps.divide(100.0F);
+ pps.setScale(2, 5);
+ PrezzoArticolo prezzoArticolo2 = new PrezzoArticolo(prezzobase, getPercLA(), pps.getResult(), getPercLA1(), getPercLA2(), getPercLA3(), getAbbuonoPrezzoPubblicoLA());
+ return prezzoArticolo2;
+ }
+ if (getListino().getFlgTipoL() == 0L) {
+ if (this.articolo.getCostoAcquistoUltimo() > 0.0D) {
+ DoubleOperator pps = new DoubleOperator(100.0F);
+ pps.setScale(4, 5);
+ pps.add(perc);
+ pps.multiply(getArticolo().getCostoAcquistoUltimo());
+ pps.divide(100.0F);
+ pps.setScale(2, 5);
+ PrezzoArticolo prezzoArticolo3 = new PrezzoArticolo(pps.getResult(), 0.0D, pps.getResult(), getPercLA1(), getPercLA2(), getPercLA3(), getAbbuonoPrezzoPubblicoLA());
+ return prezzoArticolo3;
+ }
+ PrezzoArticolo prezzoArticolo2 = new PrezzoArticolo(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
+ return prezzoArticolo2;
+ }
+ PrezzoArticolo prezzoArticolo1 = new PrezzoArticolo(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
+ return prezzoArticolo1;
+ }
+ PrezzoArticolo prezzoArticolo = new PrezzoArticolo(getPrezzoLA(), 0.0D, getPrezzoLA(), 0.0D, 0.0D, 0.0D, 0.0D);
+ return prezzoArticolo;
+ }
+ PrezzoArticolo pa = new PrezzoArticolo(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
+ return pa;
+ }
+
+ public double getPercEffettiva() {
+ if (isPercentualiSconto3()) {
+ double perc = getPercLA1();
+ if (perc > 0.0D &&
+ getPercLA2() > 0.0D) {
+ perc = Listino.getSommaPercentuali(perc, getPercLA2());
+ if (getPercLA3() > 0.0D)
+ perc = Listino.getSommaPercentuali(perc, getPercLA3());
+ }
+ return perc;
+ }
+ return getPercLA();
+ }
+
+ public void setPrezzoLA(double prezzoLA) {
+ this.prezzoLA = prezzoLA;
+ }
+
+ public Articolo getArticolo() {
+ this.articolo = (Articolo)getSecondaryObject(this.articolo, Articolo.class, getId_articolo());
+ return this.articolo;
+ }
+
+ public ArticoloVariante getArticoloVariante() {
+ this.articoloVariante = (ArticoloVariante)getSecondaryObject(this.articoloVariante, ArticoloVariante.class, getId_articoloVariante());
+ return this.articoloVariante;
+ }
+
+ public Listino getListino() {
+ this.listino = (Listino)getSecondaryObject(this.listino, Listino.class, getId_listino());
+ return this.listino;
+ }
+
+ public void findByArticoloListino(long id_articolo, long id_listino) {
+ String s_Sql_Find = "select A.* from LISTINO_ARTICOLO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("A.id_listino=" + id_listino);
+ wc.addWc("A.id_articolo=" + id_articolo);
+ wc.addWc("(A.id_articoloVariante=0 OR A.id_articoloVariante IS NULL)");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public Vectumerator findPrezziByArticolo(long id_articolo) {
+ String s_Sql_Find = "select A.* from LISTINO_ARTICOLO AS A INNER JOIN ARTICOLO AS B ON A.id_articolo = B.id_articolo";
+ String s_Sql_Order = " ORDER BY B.nome";
+ WcString wc = new WcString();
+ wc.addWc("A.id_articolo=" + id_articolo);
+ wc.addWc("(A.id_articoloVariante=0 OR A.id_articoloVariante IS NULL)");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public void findByArticoloVarianteListino(long id_articoloVariante, long id_listino) {
+ String s_Sql_Find = "select A.* from LISTINO_ARTICOLO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("id_listino=" + id_listino);
+ wc.addWc("id_articoloVariante=" + id_articoloVariante);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public Vectumerator findPrezziByArticoloVariante(long id_articoloVariante) {
+ String s_Sql_Find = "select A.* from LISTINO_ARTICOLO AS A INNER JOIN ARTICOLO_VARIANTE AS B ON A.id_articoloVariante = B.id_articoloVariante";
+ String s_Sql_Order = " ORDER BY B.nomeV";
+ WcString wc = new WcString();
+ wc.addWc("A.id_articoloVariante=" + id_articoloVariante);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public double getPercLA() {
+ return this.percLA;
+ }
+
+ public void setPercLA(double percLA) {
+ this.percLA = percLA;
+ }
+
+ public Vectumerator findArticoliByListino(long id_listino, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from LISTINO_ARTICOLO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("A.id_listino=" + id_listino);
+ wc.addWc("(A.id_articoloVariante=0 OR A.id_articoloVariante IS NULL)");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public Vectumerator findArticoliVarianteByListino(long id_listino, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from LISTINO_ARTICOLO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("id_listino=" + id_listino);
+ wc.addWc("id_articoloVariante!=0");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public double getPrezzoOffertaLA() {
+ return this.prezzoOffertaLA;
+ }
+
+ public double getPrezzoOffertaIvaLA() {
+ return DBAdapter.conIva(getPrezzoOffertaLA(), (double)getArticolo().getIva().getAliquota());
+ }
+
+ public void setPrezzoOffertaLA(double prezzoOfferta) {
+ this.prezzoOffertaLA = prezzoOfferta;
+ }
+
+ public Date getDataScadenzaOffertaLA() {
+ return this.dataScadenzaOffertaLA;
+ }
+
+ public void setDataScadenzaOffertaLA(Date dataScadenzaOfferta) {
+ this.dataScadenzaOffertaLA = dataScadenzaOfferta;
+ }
+
+ public boolean isOffertaValida() {
+ if (getDateDiff(getToday(), getDataScadenzaOffertaLA()) < 0L || getPrezzoOffertaLA() == 0.0D)
+ return false;
+ return true;
+ }
+
+ public ResParm save() {
+ if (getId_listino() == 0L || getId_articolo() == 0L)
+ return new ResParm(false, "ERRORE! Impossibile salvare listino con riferimenti a listino o articolo nulli. id_listino=" +
+ getId_listino() + " id_articolo=" + getId_articolo());
+ return super.save();
+ }
+
+ public double getAbbuonoPrezzoPubblicoLA() {
+ return this.abbuonoPrezzoPubblicoLA;
+ }
+
+ public double getAbbuonoPrezzoPubblicoLA(Clifor l_clifor) {
+ return this.abbuonoPrezzoPubblicoLA;
+ }
+
+ public void setAbbuonoPrezzoPubblicoLA(double abbuonoPrezzoPubblico) {
+ this.abbuonoPrezzoPubblicoLA = abbuonoPrezzoPubblico;
+ }
+
+ public Date getDataCambiamentoPrezzoLA() {
+ return this.dataCambiamentoPrezzoLA;
+ }
+
+ public void setDataCambiamentoPrezzoLA(Date dataCambiamentoPrezzoLA) {
+ this.dataCambiamentoPrezzoLA = dataCambiamentoPrezzoLA;
+ }
+
+ protected void prepareSave(PreparedStatement ps) throws SQLException {
+ if (getPrezzoConIvaLA() != 0.0D)
+ setPrezzoLA(DBAdapter.scorporaIva(getPrezzoConIvaLA(), (double)getArticolo().getIva().getAliquota()));
+ if (getPrezzoLA() != getPrezzoLADb())
+ setDataCambiamentoPrezzoLA(getToday());
+ super.prepareSave(ps);
+ }
+
+ protected void initFields() {
+ super.initFields();
+ setPrezzoLADb(0.0D);
+ }
+
+ protected void fillFields(ResultSet rst) {
+ super.fillFields(rst);
+ setPrezzoLADb(getPrezzoLA());
+ }
+
+ public double getPrezzoLADb() {
+ return this.prezzoLADb;
+ }
+
+ public void setPrezzoLADb(double prezzLADb) {
+ this.prezzoLADb = prezzLADb;
+ }
+
+ public double getPrezzoScontatoIvaLA() {
+ return DBAdapter.conIva(getPrezzoScontatoLA(), (double)getArticolo().getIva().getAliquota());
+ }
+
+ public double getPrezzoConIvaLA() {
+ return this.prezzoConIvaLA;
+ }
+
+ public void setPrezzoConIvaLA(double prezzoConIvaLA) {
+ this.prezzoConIvaLA = prezzoConIvaLA;
+ }
+
+ public boolean hasStessiValori(ListinoArticoloCOPIA la) {
+ if (la.getPrezzoConIvaLA() != 0.0D && la.getPrezzoLA() == 0.0D)
+ la.setPrezzoLA(DBAdapter.scorporaIva(la.getPrezzoConIvaLA(), (double)getArticolo().getIva().getAliquota()));
+ if (getPrezzoConIvaLA() != 0.0D && getPrezzoLA() == 0.0D)
+ setPrezzoLA(DBAdapter.scorporaIva(getPrezzoConIvaLA(), (double)getArticolo().getIva().getAliquota()));
+ if (la.getPrezzoLA() != getPrezzoLA() || la.getPercLA() != getPercLA() || la.getPercLA1() != getPercLA1() ||
+ la.getPercLA2() != getPercLA2() || la.getPercLA3() != getPercLA3() || la.getPrezzoOffertaLA() != getPrezzoOffertaLA() ||
+ la.getDataScadenzaOffertaLA() != getDataScadenzaOffertaLA() ||
+ la.getAbbuonoPrezzoPubblicoLA() != getAbbuonoPrezzoPubblicoLA())
+ return false;
+ return true;
+ }
+
+ public String getDescrizionePercentuale() {
+ if (isPercentualiSconto3())
+ return getNf2().format(getPercLA1()) + " + " + getNf2().format(getPercLA1()) + " + " + getNf2().format(getPercLA2()) + " %";
+ return getNf2().format(getPercLA()) + " %";
+ }
+
+ public double getPercLA1() {
+ return this.percLA1;
+ }
+
+ public void setPercLA1(double percLA1) {
+ this.percLA1 = percLA1;
+ }
+
+ public double getPercLA3() {
+ return this.percLA3;
+ }
+
+ public void setPercLA3(double percLA3) {
+ this.percLA3 = percLA3;
+ }
+
+ public double getPercLA2() {
+ return this.percLA2;
+ }
+
+ public void setPercLA2(double percLA2) {
+ this.percLA2 = percLA2;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoArticoloCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoArticoloCR.java
new file mode 100644
index 00000000..57cfea94
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoArticoloCR.java
@@ -0,0 +1,110 @@
+package it.acxent.anag;
+
+import it.acxent.art.Articolo;
+import it.acxent.art.ArticoloVariante;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import java.sql.Date;
+
+public class ListinoArticoloCR extends CRAdapter {
+ private long id_listinoArticolo;
+
+ private long id_listino;
+
+ private long id_articolo;
+
+ private long id_articoloVariante;
+
+ private double prezzoLA;
+
+ private Listino listino;
+
+ private Articolo articolo;
+
+ private ArticoloVariante articoloVariante;
+
+ private Date dataScadenzaOfferta;
+
+ private double prezzoOfferta;
+
+ public ListinoArticoloCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public ListinoArticoloCR() {}
+
+ public long getId_listinoArticolo() {
+ return this.id_listinoArticolo;
+ }
+
+ public void setId_listinoArticolo(long id_listinoArticolo) {
+ this.id_listinoArticolo = id_listinoArticolo;
+ }
+
+ public long getId_listino() {
+ return this.id_listino;
+ }
+
+ public void setId_listino(long id_listino) {
+ this.id_listino = id_listino;
+ }
+
+ public long getId_articolo() {
+ return this.id_articolo;
+ }
+
+ public void setId_articolo(long id_articolo) {
+ this.id_articolo = id_articolo;
+ }
+
+ public long getId_articoloVariante() {
+ return this.id_articoloVariante;
+ }
+
+ public void setId_articoloVariante(long id_articoloVariante) {
+ this.id_articoloVariante = id_articoloVariante;
+ }
+
+ public double getPrezzoLA() {
+ return this.prezzoLA;
+ }
+
+ public void setPrezzoLA(double prezzoLA) {
+ this.prezzoLA = prezzoLA;
+ }
+
+ public Articolo getArticolo() {
+ this.articolo = (Articolo)getSecondaryObject(this.articolo, Articolo.class,
+ getId_articolo());
+ return this.articolo;
+ }
+
+ public ArticoloVariante getArticoloVariante() {
+ this.articoloVariante = (ArticoloVariante)getSecondaryObject(this.articoloVariante, ArticoloVariante.class,
+
+ getId_articoloVariante());
+ return this.articoloVariante;
+ }
+
+ public Listino getListino() {
+ this.listino = (Listino)getSecondaryObject(this.listino, Listino.class,
+ getId_listino());
+ return this.listino;
+ }
+
+ public Date getDataScadenzaOfferta() {
+ return this.dataScadenzaOfferta;
+ }
+
+ public void setDataScadenzaOfferta(Date dataScadenzaOfferta) {
+ this.dataScadenzaOfferta = dataScadenzaOfferta;
+ }
+
+ public double getPrezzoOfferta() {
+ return this.prezzoOfferta;
+ }
+
+ public void setPrezzoOfferta(double prezzoOfferta) {
+ this.prezzoOfferta = prezzoOfferta;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoCR.java
new file mode 100644
index 00000000..4437b99b
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoCR.java
@@ -0,0 +1,73 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import java.sql.Timestamp;
+
+public class ListinoCR extends CRAdapter {
+ private long id_listino;
+
+ private long flgTipoL;
+
+ private String descrizione;
+
+ private double percL;
+
+ private Timestamp lastUpdTmst;
+
+ private long lastUpdId_user;
+
+ public ListinoCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public ListinoCR() {}
+
+ public void setId_listino(long newId_listino) {
+ this.id_listino = newId_listino;
+ }
+
+ public void setFlgTipoL(long newFlgTipo) {
+ this.flgTipoL = newFlgTipo;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setPercL(double newPercL) {
+ this.percL = newPercL;
+ }
+
+ public void setLastUpdTmst(Timestamp newLastUpdTmst) {
+ this.lastUpdTmst = newLastUpdTmst;
+ }
+
+ public void setLastUpdId_user(long newLastUpdId_user) {
+ this.lastUpdId_user = newLastUpdId_user;
+ }
+
+ public long getId_listino() {
+ return this.id_listino;
+ }
+
+ public long getFlgTipoL() {
+ return this.flgTipoL;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public double getPercL() {
+ return this.percL;
+ }
+
+ public Timestamp getLastUpdTmst() {
+ return this.lastUpdTmst;
+ }
+
+ public long getLastUpdId_user() {
+ return this.lastUpdId_user;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoTipo.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoTipo.java
new file mode 100644
index 00000000..d7edb6b5
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoTipo.java
@@ -0,0 +1,315 @@
+package it.acxent.anag;
+
+import it.acxent.art.Articolo;
+import it.acxent.art.Tipo;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.DoubleOperator;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class ListinoTipo extends _AnagAdapter implements Serializable {
+ private long id_listinoTipo;
+
+ private long flgTipoLT;
+
+ private double percLT;
+
+ private long id_tipo;
+
+ private long id_listino;
+
+ private Tipo tipo;
+
+ private Listino listino;
+
+ private String indiciTipo;
+
+ private double prezzoLT;
+
+ private double percLT2;
+
+ private double percLT3;
+
+ private double percLT1;
+
+ public ListinoTipo(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public ListinoTipo() {}
+
+ public void setId_listinoTipo(long newId_listinoTipo) {
+ this.id_listinoTipo = newId_listinoTipo;
+ }
+
+ public void setFlgTipoLT(long newFlgTipoLT) {
+ this.flgTipoLT = newFlgTipoLT;
+ }
+
+ public void setPercLT(double newPercLT) {
+ this.percLT = newPercLT;
+ }
+
+ public void setId_tipo(long newId_tipo) {
+ this.id_tipo = newId_tipo;
+ setTipo(null);
+ }
+
+ public void setId_listino(long newId_listino) {
+ this.id_listino = newId_listino;
+ setListino(null);
+ }
+
+ public long getId_listinoTipo() {
+ return this.id_listinoTipo;
+ }
+
+ public long getFlgTipoLT() {
+ return this.flgTipoLT;
+ }
+
+ public double getPercLT() {
+ return this.percLT;
+ }
+
+ public double getPercEffettiva() {
+ if (isPercentualiSconto3()) {
+ double perc = getPercLT1();
+ if (perc > 0.0D &&
+ getPercLT2() > 0.0D) {
+ perc = Listino.getSommaPercentuali(perc, getPercLT2());
+ if (getPercLT3() > 0.0D)
+ perc = Listino.getSommaPercentuali(perc, getPercLT3());
+ }
+ return perc;
+ }
+ return getPercLT();
+ }
+
+ public long getId_tipo() {
+ return this.id_tipo;
+ }
+
+ public long getId_listino() {
+ return this.id_listino;
+ }
+
+ public void setTipo(Tipo newTipo) {
+ this.tipo = newTipo;
+ }
+
+ public Tipo getTipo() {
+ this.tipo = (Tipo)getSecondaryObject(this.tipo, Tipo.class, getId_tipo());
+ return this.tipo;
+ }
+
+ public void setListino(Listino newListino) {
+ this.listino = newListino;
+ }
+
+ public Listino getListino() {
+ this.listino = (Listino)getSecondaryObject(this.listino, Listino.class, getId_listino());
+ return this.listino;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(ListinoTipoCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from LISTINO_TIPO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public Vectumerator findByListino(long l_id_listino, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from LISTINO_TIPO AS A ";
+ WcString wc = new WcString();
+ wc.addWc("A.id_listino=" + l_id_listino);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find);
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getIndiciTipo() {
+ return (this.indiciTipo == null) ? "" : this.indiciTipo;
+ }
+
+ public void setIndiciTipo(String indiciTipo) {
+ this.indiciTipo = indiciTipo;
+ }
+
+ public ResParm save() {
+ setIndiciTipo(calcolaIndiciTipo());
+ ResParm rp = super.save();
+ return rp;
+ }
+
+ protected String calcolaIndiciTipo() {
+ StringBuffer idx = new StringBuffer(":");
+ idx.append(calcolaIndiciTipoR(getTipo()));
+ idx.append(":");
+ return idx.toString();
+ }
+
+ private StringBuffer calcolaIndiciTipoR(Tipo l_tipo) {
+ StringBuffer idx = new StringBuffer();
+ Vectumerator vec = l_tipo.findFigli(0, 0);
+ if (vec.hasMoreElements()) {
+ boolean first = true;
+ while (vec.hasMoreElements()) {
+ Tipo row = (Tipo)vec.nextElement();
+ if (first) {
+ first = false;
+ } else {
+ idx.insert(0, ":");
+ }
+ idx.insert(0, (CharSequence)calcolaIndiciTipoR(row));
+ }
+ idx.insert(0, ":");
+ idx.insert(0, l_tipo.getId_tipo());
+ } else {
+ idx = new StringBuffer(String.valueOf(l_tipo.getId_tipo()));
+ }
+ return idx;
+ }
+
+ public static final String getTipoListino(long l_flgTipo) {
+ return Listino.getTipoL(l_flgTipo);
+ }
+
+ public void findByCliforTipo(long l_id_clifor, long l_id_tipo) {
+ String s_Sql_Find = "select A.* from LISTINO_PERS AS A , TIPO AS B";
+ WcString wc = new WcString();
+ wc.addWc("A.id_tipo=B.id_tipo");
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ wc.addWc(" B.indici like'%:" + l_id_tipo + ":%'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find);
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public void findByListinoTipo(long l_id_listino, long l_id_tipo) {
+ String s_Sql_Find = "select A.* from LISTINO_TIPO AS A ";
+ WcString wc = new WcString();
+ wc.addWc("A.id_listino=" + l_id_listino);
+ wc.addWc(" A.indiciTipo like'%:" + l_id_tipo + ":%'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find);
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public double getPercLT1() {
+ return this.percLT1;
+ }
+
+ public void setPercLT1(double percLT1) {
+ this.percLT1 = percLT1;
+ }
+
+ public double getPercLT2() {
+ return this.percLT2;
+ }
+
+ public void setPercLT2(double percLT2) {
+ this.percLT2 = percLT2;
+ }
+
+ public double getPercLT3() {
+ return this.percLT3;
+ }
+
+ public void setPercLT3(double percLT3) {
+ this.percLT3 = percLT3;
+ }
+
+ public String getDescrizionePercentuale() {
+ if (isPercentualiSconto3())
+ return getNf2().format(getPercLT1()) + " + " + getNf2().format(getPercLT1()) + " + " + getNf2().format(getPercLT2()) + " %";
+ return getNf2().format(getPercLT()) + " %";
+ }
+
+ public double getPrezzoLT() {
+ return this.prezzoLT;
+ }
+
+ public void setPrezzoLT(double prezzoLT) {
+ this.prezzoLT = prezzoLT;
+ }
+
+ public PrezzoArticolo getPrezzoFinaleLT(Articolo articolo) {
+ if (getId_listinoTipo() > 0L) {
+ if (getListino().getFlgTipoL() == 99L) {
+ PrezzoArticolo prezzoArticolo1 = new PrezzoArticolo(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
+ return prezzoArticolo1;
+ }
+ double perc = getPercEffettiva();
+ if (perc > 0.0D) {
+ if (getListino().getFlgTipoL() == 0L) {
+ double prezzobase = articolo.getPrezzoBase();
+ DoubleOperator pps = new DoubleOperator(100.0F);
+ pps.setScale(4, 5);
+ pps.subtract(perc);
+ pps.multiply(prezzobase);
+ pps.divide(100.0F);
+ pps.setScale(2, 5);
+ PrezzoArticolo prezzoArticolo2 = new PrezzoArticolo(prezzobase, getPercLT(), pps.getResult(), getPercLT1(), getPercLT2(), getPercLT3(), 0.0D);
+ return prezzoArticolo2;
+ }
+ if (getListino().getFlgTipoL() == 1L) {
+ if (articolo.getCostoAcquistoUltimo() > 0.0D) {
+ DoubleOperator pps = new DoubleOperator(100.0F);
+ pps.setScale(4, 5);
+ pps.add(perc);
+ pps.multiply(articolo.getCostoAcquistoUltimo());
+ pps.divide(100.0F);
+ pps.setScale(2, 5);
+ PrezzoArticolo prezzoArticolo3 = new PrezzoArticolo(pps.getResult(), 0.0D, pps.getResult(), 0.0D, 0.0D, 0.0D, 0.0D);
+ return prezzoArticolo3;
+ }
+ PrezzoArticolo prezzoArticolo2 = new PrezzoArticolo(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
+ return prezzoArticolo2;
+ }
+ PrezzoArticolo prezzoArticolo1 = new PrezzoArticolo(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
+ return prezzoArticolo1;
+ }
+ PrezzoArticolo prezzoArticolo = new PrezzoArticolo(getPrezzoLT(), 0.0D, getPrezzoLT(), 0.0D, 0.0D, 0.0D, 0.0D);
+ return prezzoArticolo;
+ }
+ PrezzoArticolo pa = new PrezzoArticolo(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
+ return pa;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoTipoCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoTipoCR.java
new file mode 100644
index 00000000..fc3c51ca
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ListinoTipoCR.java
@@ -0,0 +1,91 @@
+package it.acxent.anag;
+
+import it.acxent.art.Tipo;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class ListinoTipoCR extends CRAdapter {
+ private long id_listinoTipo;
+
+ private long flgTipoLT;
+
+ private double percLT;
+
+ private long id_tipo;
+
+ private long id_listino;
+
+ private Tipo tipo;
+
+ private Listino listino;
+
+ public ListinoTipoCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public ListinoTipoCR() {}
+
+ public void setId_listinoTipo(long newId_listinoTipo) {
+ this.id_listinoTipo = newId_listinoTipo;
+ }
+
+ public void setFlgTipoLT(long newFlgTipoLT) {
+ this.flgTipoLT = newFlgTipoLT;
+ }
+
+ public void setPercLT(double newPercLT) {
+ this.percLT = newPercLT;
+ }
+
+ public void setId_tipo(long newId_tipo) {
+ this.id_tipo = newId_tipo;
+ setTipo(null);
+ }
+
+ public void setId_listino(long newId_listino) {
+ this.id_listino = newId_listino;
+ setListino(null);
+ }
+
+ public long getId_listinoTipo() {
+ return this.id_listinoTipo;
+ }
+
+ public long getFlgTipoLT() {
+ return this.flgTipoLT;
+ }
+
+ public double getPercLT() {
+ return this.percLT;
+ }
+
+ public long getId_tipo() {
+ return this.id_tipo;
+ }
+
+ public long getId_listino() {
+ return this.id_listino;
+ }
+
+ public void setTipo(Tipo newTipo) {
+ this.tipo = newTipo;
+ }
+
+ public Tipo getTipo() {
+ this.tipo = (Tipo)getSecondaryObject(this.tipo, Tipo.class,
+
+ getId_tipo());
+ return this.tipo;
+ }
+
+ public void setListino(Listino newListino) {
+ this.listino = newListino;
+ }
+
+ public Listino getListino() {
+ this.listino = (Listino)getSecondaryObject(this.listino, Listino.class,
+
+ getId_listino());
+ return this.listino;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/MagFisico.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/MagFisico.java
new file mode 100644
index 00000000..635d8af5
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/MagFisico.java
@@ -0,0 +1,299 @@
+package it.acxent.anag;
+
+import it.acxent.contab.CausaleMagazzino;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class MagFisico extends _AnagAdapter implements Serializable {
+ private long id_magFisico;
+
+ private String descrizione;
+
+ private long id_clifor;
+
+ private Clifor clifor;
+
+ private long flgTipo;
+
+ private long flgFineLavorazione;
+
+ public static final long TIPO_MAGAZZINO_TUTTI = 0L;
+
+ public static final long TIPO_MAGAZZINO_INTERNO = 1L;
+
+ public static final long TIPO_MAGAZZINO_LAVORAZIONE = 2L;
+
+ public static final long TIPO_MAGAZZINO_ORDINATO_A_FORNITORI = 3L;
+
+ public static final long FINE_LAVORAZIONE_NO = 0L;
+
+ public static final long FINE_LAVORAZIONE_SI = 1L;
+
+ public MagFisico(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Vectumerator findByClifor(long l_id_clifor) {
+ String s_Sql_Find = "select A.* from MAG_FISICO AS A";
+ String s_Sql_Order = " order by descrizione";
+ WcString wc = new WcString();
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public MagFisico() {}
+
+ public void setId_magFisico(long newId_magFisico) {
+ this.id_magFisico = newId_magFisico;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public long getId_magFisico() {
+ return this.id_magFisico;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class, getId_clifor());
+ return this.clifor;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(MagFisicoCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from MAG_FISICO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getTipo() {
+ return getTipo(getFlgTipo());
+ }
+
+ public void setFlgTipo(long flgInterno) {
+ this.flgTipo = flgInterno;
+ }
+
+ public Vectumerator findByTipo(long l_flgTipo) {
+ String s_Sql_Find = "select A.* from MAG_FISICO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (l_flgTipo > 0L)
+ wc.addWc(" A.flgTipo = " + l_flgTipo);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public Vectumerator findByCausalePartenza(CausaleMagazzino cm) {
+ String s_Sql_Find = "select A.* from MAG_FISICO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (cm.getId_magFisicoPartenza() > 0L) {
+ wc.addWc(" A.id_magFisico = " + cm.getId_magFisicoPartenza());
+ } else if (cm.getFlgPartenzaInterno() == 1L && cm.getFlgPartenzaLavorazione() == 1L) {
+ wc.addWc("(A.flgTipo = 1 or A.flgTipo=2)");
+ } else if (cm.getFlgPartenzaInterno() == 1L && cm.getFlgPartenzaLavorazione() == 0L) {
+ wc.addWc("A.flgTipo = 1");
+ } else if (cm.getFlgPartenzaInterno() == 0L && cm.getFlgPartenzaLavorazione() == 1L) {
+ wc.addWc("A.flgTipo=2");
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public Vectumerator findByCausaleArrivo(CausaleMagazzino cm) {
+ String s_Sql_Find = "select A.* from MAG_FISICO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (cm.getId_magFisicoArrivo() > 0L) {
+ wc.addWc(" A.id_magFisico = " + cm.getId_magFisicoArrivo());
+ } else if (cm.getFlgArrivoInterno() == 1L && cm.getFlgArrivoLavorazione() == 1L) {
+ wc.addWc("(A.flgTipo = 1 or A.flgTipo=2)");
+ } else if (cm.getFlgArrivoInterno() == 1L && cm.getFlgArrivoLavorazione() == 0L) {
+ wc.addWc("A.flgTipo = 1");
+ } else if (cm.getFlgArrivoInterno() == 0L && cm.getFlgArrivoLavorazione() == 1L) {
+ wc.addWc("A.flgTipo=2");
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public boolean isMagOrdinatoValorizzato() {
+ String s_Sql_Find = "select COUNT(*) as tot from MAG_FISICO AS A ";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc(" A.flgTipo = 3");
+ wc.addWc(" A.id_magFisico != " + getId_magFisico());
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ long tot = getCount(stmt, "tot");
+ if (tot > 0L)
+ return true;
+ return false;
+ } catch (SQLException e) {
+ handleDebug(e);
+ return false;
+ }
+ }
+
+ public void findMagazzinoOrdinato() {
+ String s_Sql_Find = "select A.* from MAG_FISICO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc(" A.flgTipo = 3");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public String getDescrizioneCompleta() {
+ if (getDescrizione().isEmpty())
+ return "Nessuno";
+ return getDescrizione() + " " + getDescrizione();
+ }
+
+ public long getFlgTipo() {
+ return this.flgTipo;
+ }
+
+ public static final String getTipo(long l_flgTipo) {
+ switch ((int)l_flgTipo) {
+ case 1:
+ return "Interno";
+ case 2:
+ return "Lavorazione";
+ case 3:
+ return "Ordinato a Fornitori";
+ }
+ return "??";
+ }
+
+ public long getFlgFineLavorazione() {
+ return this.flgFineLavorazione;
+ }
+
+ public void setFlgFineLavorazione(long flgFineLavorazione) {
+ this.flgFineLavorazione = flgFineLavorazione;
+ }
+
+ public static final String getFineLavorazione(long l_flgFineLavorazione) {
+ switch ((int)l_flgFineLavorazione) {
+ case 0:
+ return "No (solo prelievo)";
+ case 1:
+ return "Si (scarico e prelievo)";
+ }
+ return "??";
+ }
+
+ public String getFineLavorazione() {
+ return getFineLavorazione(getFlgFineLavorazione());
+ }
+
+ public String getHtmlTableHeaderInterni() {
+ Vectumerator vec = findByTipo(1L);
+ StringBuilder sb = new StringBuilder();
+ while (vec.hasMoreElements()) {
+ MagFisico row = (MagFisico)vec.nextElement();
+ sb.append("");
+ sb.append(row.getDescrizione());
+ sb.append(" ");
+ }
+ return sb.toString();
+ }
+
+ public String getHtmlTableHeaderInterniVuoti() {
+ Vectumerator vec = findByTipo(1L);
+ StringBuilder sb = new StringBuilder();
+ sb.append(" ");
+ sb.append(" ");
+ return sb.toString();
+ }
+
+ public String getDescrizioneTipo() {
+ StringBuilder sb = new StringBuilder(getTipo());
+ if (getFlgTipo() == 2L) {
+ sb.append(" ");
+ sb.append("-");
+ sb.append(" ");
+ sb.append("Fine lav: ");
+ sb.append(getFineLavorazione());
+ sb.append(" ");
+ sb.append("-");
+ sb.append(" ");
+ sb.append(getClifor().getCognomeNome());
+ }
+ return sb.toString().trim();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/MagFisicoCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/MagFisicoCR.java
new file mode 100644
index 00000000..a0114d02
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/MagFisicoCR.java
@@ -0,0 +1,90 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class MagFisicoCR extends CRAdapter {
+ private long id_magFisico;
+
+ private String descrizione;
+
+ private long id_clifor;
+
+ private Clifor clifor;
+
+ private long flgTipo;
+
+ private long flgFineLavorazione;
+
+ public MagFisicoCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public MagFisicoCR() {}
+
+ public void setId_magFisico(long newId_magFisico) {
+ this.id_magFisico = newId_magFisico;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public long getId_magFisico() {
+ return this.id_magFisico;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class, getId_clifor());
+ return this.clifor;
+ }
+
+ public String getTipo() {
+ return MagFisico.getTipo(getFlgTipo());
+ }
+
+ public long getFlgTipo() {
+ return this.flgTipo;
+ }
+
+ public void setFlgTipo(long flgTipo) {
+ this.flgTipo = flgTipo;
+ }
+
+ public String getFineLavorazione() {
+ return MagFisico.getFineLavorazione(getFlgFineLavorazione());
+ }
+
+ public static final String getFineLavorazione(long l_flgFineLavorazione) {
+ return MagFisico.getFineLavorazione(l_flgFineLavorazione);
+ }
+
+ public long getFlgFineLavorazione() {
+ return this.flgFineLavorazione;
+ }
+
+ public void setFlgFineLavorazione(long flgFineLavorazione) {
+ this.flgFineLavorazione = flgFineLavorazione;
+ }
+
+ public static final String getTipo(long l_flgTipo) {
+ return MagFisico.getTipo(l_flgTipo);
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/MeseEscluso.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/MeseEscluso.java
new file mode 100644
index 00000000..2314e0f4
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/MeseEscluso.java
@@ -0,0 +1,108 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class MeseEscluso extends _AnagAdapter implements Serializable {
+ private static final long serialVersionUID = 3164023737083124440L;
+
+ private long id_meseEscluso;
+
+ private long id_tipoPagamento;
+
+ private long meseEscluso;
+
+ private long giornoEscluso;
+
+ private TipoPagamento tipoPagamento;
+
+ public MeseEscluso(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public MeseEscluso() {}
+
+ public void setId_meseEscluso(long newId_vettore) {
+ this.id_meseEscluso = newId_vettore;
+ }
+
+ public long getId_meseEscluso() {
+ return this.id_meseEscluso;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(MeseEsclusoCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from MESE_ESCLUSO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ if (CR.getId_tipoPagamento() > 0L)
+ wc.addWc(" A.id_tipoPagamento = " + CR.getId_tipoPagamento());
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public long getId_tipoPagamento() {
+ return this.id_tipoPagamento;
+ }
+
+ public void setId_tipoPagamento(long id_tipoPagamento) {
+ this.id_tipoPagamento = id_tipoPagamento;
+ setTipoPagamento(null);
+ }
+
+ public long getMeseEscluso() {
+ return this.meseEscluso;
+ }
+
+ public void setMeseEscluso(long meseEscluso) {
+ this.meseEscluso = meseEscluso;
+ }
+
+ public long getGiornoEscluso() {
+ return this.giornoEscluso;
+ }
+
+ public void setGiornoEscluso(long giornoEscluso) {
+ this.giornoEscluso = giornoEscluso;
+ }
+
+ public TipoPagamento getTipoPagamento() {
+ this.tipoPagamento = (TipoPagamento)getSecondaryObject(this.tipoPagamento, TipoPagamento.class, getId_tipoPagamento());
+ return this.tipoPagamento;
+ }
+
+ public void setTipoPagamento(TipoPagamento tipoPagamento) {
+ this.tipoPagamento = tipoPagamento;
+ }
+
+ public String getDescrizioneMese() {
+ return getDescrizioneMese(getMeseEscluso());
+ }
+
+ public String getDescrizioneMese(long id_mese) {
+ return MONTH_DES[(int)id_mese - 1];
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/MeseEsclusoCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/MeseEsclusoCR.java
new file mode 100644
index 00000000..1926090c
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/MeseEsclusoCR.java
@@ -0,0 +1,63 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class MeseEsclusoCR extends CRAdapter {
+ private long id_meseEscluso;
+
+ private long id_tipoPagamento;
+
+ private long meseEscluso;
+
+ private long giornoEscluso;
+
+ private TipoPagamento tipoPagamento;
+
+ public MeseEsclusoCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public MeseEsclusoCR() {}
+
+ public void setId_meseEscluso(long newId_vettore) {
+ this.id_meseEscluso = newId_vettore;
+ }
+
+ public long getId_meseEscluso() {
+ return this.id_meseEscluso;
+ }
+
+ public long getId_tipoPagamento() {
+ return this.id_tipoPagamento;
+ }
+
+ public void setId_tipoPagamento(long id_tipoPagamento) {
+ this.id_tipoPagamento = id_tipoPagamento;
+ }
+
+ public long getMeseEscluso() {
+ return this.meseEscluso;
+ }
+
+ public void setMeseEscluso(long meseEscluso) {
+ this.meseEscluso = meseEscluso;
+ }
+
+ public long getGiornoEscluso() {
+ return this.giornoEscluso;
+ }
+
+ public void setGiornoEscluso(long giornoEscluso) {
+ this.giornoEscluso = giornoEscluso;
+ }
+
+ public TipoPagamento getTipoPagamento() {
+ this.tipoPagamento = (TipoPagamento)getSecondaryObject(this.tipoPagamento, TipoPagamento.class, getId_tipoPagamento());
+ return this.tipoPagamento;
+ }
+
+ public void setTipoPagamento(TipoPagamento tipoPagamento) {
+ this.tipoPagamento = tipoPagamento;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Nazione.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Nazione.java
new file mode 100644
index 00000000..cd089f0c
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Nazione.java
@@ -0,0 +1,402 @@
+package it.acxent.anag;
+
+import it.acxent.cart.Cart;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.util.Locale;
+
+public class Nazione extends _AnagAdapter implements Serializable {
+ private static final String MESSAGGIO_IMPORTO_MINIMO = "messaggioImportoMinimo";
+
+ private static final long serialVersionUID = 1282454814109856597L;
+
+ public static final String CODICE_IT = "IT";
+
+ private String id_nazione;
+
+ private String lang;
+
+ private String descrizione_en;
+
+ private String descrizione_it;
+
+ private String codiceIstat;
+
+ private long flgCee;
+
+ private double costoSpedizione;
+
+ private long flgAttiva;
+
+ private String codice;
+
+ private String descrizioneInLingua;
+
+ private long flgGoogleMerchant;
+
+ private long flgPreventivoWww;
+
+ private long id_iva;
+
+ private Iva iva;
+
+ private double importoMinimoWww;
+
+ private String tag;
+
+ private String prefissoTel;
+
+ public Nazione(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Nazione() {}
+
+ public void setId_nazione(String newId_nazione) {
+ this.id_nazione = newId_nazione;
+ }
+
+ public void setLang(String newId_lingua) {
+ this.lang = newId_lingua;
+ }
+
+ public void setFlgCee(long newFlgCee) {
+ this.flgCee = newFlgCee;
+ }
+
+ public String getId_nazione() {
+ return (this.id_nazione == null) ? "" : this.id_nazione.trim();
+ }
+
+ public String getLang() {
+ return (this.lang == null) ? "" : this.lang.trim();
+ }
+
+ public String getDescrizioneCompleta() {
+ return getDescrizione_it().trim();
+ }
+
+ public long getFlgCee() {
+ return this.flgCee;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(NazioneCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from NAZIONE AS A";
+ String s_Sql_Order = " order by descrizione_it";
+ if (CR.getLang().equals("en")) {
+ s_Sql_Order = " order by descrizione_en";
+ } else {
+ s_Sql_Order = " order by descrizione_it";
+ }
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.descrizione_it like '%" + token + "%' or A.descrizione_en like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ if (CR.getFlgAttivaS() == 0L) {
+ wc.addWc("(A.flgAttiva is null or A.flgAttiva=0)");
+ } else if (CR.getFlgAttivaS() == 1L) {
+ wc.addWc("A.flgAttiva = 1");
+ }
+ if (CR.getFlgCeeS() == 0L) {
+ wc.addWc("(A.flgCee is null or A.flgCee=0)");
+ } else if (CR.getFlgCeeS() == 1L) {
+ wc.addWc("A.flgCee = 1");
+ }
+ if (CR.getFlgGoogleMerchantS() == 0L) {
+ wc.addWc("(A.flgGoogleMerchant is null or A.flgGoogleMerchant=0)");
+ } else if (CR.getFlgGoogleMerchantS() == 1L) {
+ wc.addWc("A.flgGoogleMerchant = 1");
+ }
+ if (CR.getFlgPreventivoWwwS() == 0L) {
+ wc.addWc("(A.flgPreventivoWww is null or A.flgPreventivoWww=0)");
+ } else if (CR.getFlgPreventivoWwwS() == 1L) {
+ wc.addWc("A.flgPreventivoWww = 1");
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public static final String getCee(long l_flgCee) {
+ switch ((int)l_flgCee) {
+ case -1:
+ return " ";
+ case 0:
+ return "Extra Cee";
+ case 1:
+ return "Cee";
+ }
+ return "??";
+ }
+
+ public String getCee() {
+ return getCee(getFlgCee());
+ }
+
+ public String getAttiva() {
+ return (this.flgAttiva == 0L) ? "N" : "S";
+ }
+
+ public double getCostoSpedizione() {
+ return this.costoSpedizione;
+ }
+
+ public void setCostoSpedizione(double costoSpedizione) {
+ this.costoSpedizione = costoSpedizione;
+ }
+
+ public long getFlgAttiva() {
+ return this.flgAttiva;
+ }
+
+ public void setFlgAttiva(long flgAttiva) {
+ this.flgAttiva = flgAttiva;
+ }
+
+ public String getCodice() {
+ return (this.codice == null) ? getId_nazione() : this.codice.trim();
+ }
+
+ public void setCodice(String codice) {
+ this.codice = codice;
+ }
+
+ public String getCodiceIstat() {
+ return (this.codiceIstat == null) ? "" : this.codiceIstat.trim();
+ }
+
+ public void setCodiceIstat(String codiceIstat) {
+ this.codiceIstat = codiceIstat;
+ }
+
+ public String getDescrizione(String lang) {
+ if (lang.equals(Locale.ITALIAN.getLanguage()))
+ return getDescrizione_it();
+ return getDescrizione_en();
+ }
+
+ public boolean useDescLangTables() {
+ return false;
+ }
+
+ public void findByCodice(String l_codice) {
+ String s_Sql_Find = "select A.* from NAZIONE AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("A.codice='" + l_codice + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public Vectumerator findAllAttiveGoogle(String lang) {
+ String s_Sql_Find = "select A.* from NAZIONE AS A";
+ String s_Sql_Order = "";
+ if (lang.equals("en")) {
+ s_Sql_Order = " order by descrizione_en";
+ } else {
+ s_Sql_Order = " order by descrizione_it";
+ }
+ WcString wc = new WcString();
+ wc.addWc("A.flgAttiva=1");
+ wc.addWc("A.flgGoogleMerchant=1");
+ wc.addWc("(A.flgPreventivoWww is null or A.flgPreventivoWww=0)");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, 0, 0);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public Vectumerator findAll(String lang) {
+ String s_Sql_Find = "select A.* from NAZIONE AS A";
+ String s_Sql_Order = "";
+ if (lang.equals("en")) {
+ s_Sql_Order = " order by descrizione_en";
+ } else {
+ s_Sql_Order = " order by descrizione_it";
+ }
+ WcString wc = new WcString();
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, 0, 0);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getDescrizioneCompleta(String lang) {
+ if (getFlgPreventivoWww() == 0L)
+ return getDescrizione(lang);
+ return getDescrizione(lang) + " *";
+ }
+
+ protected String sqlStringfindAll() {
+ return "select * from NAZIONE order by descrizione_it";
+ }
+
+ public String getDescrizioneInLingua() {
+ return (this.descrizioneInLingua == null || this.descrizioneInLingua.isEmpty()) ? getDescrizione_it() : this.descrizioneInLingua.trim();
+ }
+
+ public void setDescrizioneInLingua(String descrizioneInLingua) {
+ this.descrizioneInLingua = descrizioneInLingua;
+ }
+
+ public double getCostoSpedizioneConIva() {
+ return conIva(getCostoSpedizione(), getParm(Cart.P_DELIVERY_IVA_ALIQUOTA).getNumeroDouble());
+ }
+
+ public long getFlgGoogleMerchant() {
+ return this.flgGoogleMerchant;
+ }
+
+ public void setFlgGoogleMerchant(long flgGoogleMerchant) {
+ this.flgGoogleMerchant = flgGoogleMerchant;
+ }
+
+ public long getFlgPreventivoWww() {
+ return this.flgPreventivoWww;
+ }
+
+ public void setFlgPreventivoWww(long flgPreventivoWww) {
+ this.flgPreventivoWww = flgPreventivoWww;
+ }
+
+ public long getId_iva() {
+ return this.id_iva;
+ }
+
+ public void setId_iva(long id_iva) {
+ this.id_iva = id_iva;
+ setIva(null);
+ }
+
+ public Iva getIva() {
+ this.iva = (Iva)getSecondaryObject(this.iva, Iva.class, new Long(getId_iva()));
+ return this.iva;
+ }
+
+ public void setIva(Iva iva) {
+ this.iva = iva;
+ }
+
+ protected void prepareSave(PreparedStatement ps) throws SQLException {
+ System.out.println(getDescTxtLang("descrizione", Locale.ITALIAN.getLanguage()) + " - " + getDescTxtLang("descrizione", Locale.ITALIAN.getLanguage()));
+ super.prepareSave(ps);
+ if (getFlgCee() == 0L)
+ setId_iva(0L);
+ }
+
+ public double getImportoMinimoWww() {
+ return this.importoMinimoWww;
+ }
+
+ public void setImportoMinimoWww(double importoMinimoWww) {
+ this.importoMinimoWww = importoMinimoWww;
+ }
+
+ public String getMessaggioImportoMinimo(String l_lang) {
+ if (l_lang.isEmpty())
+ l_lang = "it";
+ return getDescTxtLang("messaggioImportoMinimo", l_lang);
+ }
+
+ public boolean checkCart(Cart cart) {
+ if (getImportoMinimoWww() <= 0.0D)
+ return true;
+ if (cart.getTotCartVAT() < getImportoMinimoWww())
+ return false;
+ return true;
+ }
+
+ public String getTag() {
+ if (this.tag == null)
+ return "";
+ this.tag = this.tag.trim();
+ if (!this.tag.startsWith(","))
+ this.tag = "," + this.tag;
+ if (!this.tag.endsWith(","))
+ this.tag += ",";
+ if (this.tag.equals(","))
+ return "";
+ return this.tag;
+ }
+
+ public void setTag(String tag) {
+ this.tag = tag;
+ }
+
+ public String getDescrizione_en() {
+ return (this.descrizione_en == null) ? "" : this.descrizione_en;
+ }
+
+ public void setDescrizione_en(String descrizioneEn) {
+ this.descrizione_en = descrizioneEn;
+ }
+
+ public String getDescrizione_it() {
+ return (this.descrizione_it == null) ? "" : this.descrizione_it.trim();
+ }
+
+ public void setDescrizione_it(String descrizioneIt) {
+ this.descrizione_it = descrizioneIt;
+ }
+
+ public String getPrefissoTel() {
+ if (this.prefissoTel == null)
+ return "";
+ if (!this.prefissoTel.trim().startsWith("+"))
+ return "+" + this.prefissoTel.trim();
+ return this.prefissoTel.trim();
+ }
+
+ public void setPrefissoTel(String prefissoTel) {
+ this.prefissoTel = prefissoTel;
+ }
+
+ public Vectumerator findAllAttive(String lang) {
+ String s_Sql_Find = "select A.* from NAZIONE AS A";
+ String s_Sql_Order = "";
+ if (lang.equals("en")) {
+ s_Sql_Order = " order by descrizione_en";
+ } else {
+ s_Sql_Order = " order by descrizione_it";
+ }
+ WcString wc = new WcString();
+ wc.addWc("A.flgAttiva=1");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, 0, 0);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/NazioneCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/NazioneCR.java
new file mode 100644
index 00000000..94e0fc71
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/NazioneCR.java
@@ -0,0 +1,80 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class NazioneCR extends CRAdapter {
+ private long id_nazione;
+
+ private long flgCeeS = -1L;
+
+ private String id_lingua;
+
+ private long flgAttivaS = -1L;
+
+ private long flgGoogleMerchantS = -1L;
+
+ private long flgPreventivoWwwS = -1L;
+
+ public NazioneCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public NazioneCR() {}
+
+ public void setId_nazione(long newId_nazione) {
+ this.id_nazione = newId_nazione;
+ }
+
+ public void setFlgCeeS(long newFlgCee) {
+ this.flgCeeS = newFlgCee;
+ }
+
+ public long getId_nazione() {
+ return this.id_nazione;
+ }
+
+ public long getFlgCeeS() {
+ return this.flgCeeS;
+ }
+
+ public String getId_lingua() {
+ return (this.id_lingua == null) ? AB_EMPTY_STRING : this.id_lingua.trim();
+ }
+
+ public void setId_lingua(String newId_lingua) {
+ this.id_lingua = newId_lingua;
+ }
+
+ public long getFlgAttivaS() {
+ return this.flgAttivaS;
+ }
+
+ public void setFlgAttivaS(long flgAttivaS) {
+ this.flgAttivaS = flgAttivaS;
+ }
+
+ public static final String getCeeS(long l_flgCee) {
+ return Nazione.getCee(l_flgCee);
+ }
+
+ public String getCeeS() {
+ return Nazione.getCee(getFlgCeeS());
+ }
+
+ public long getFlgGoogleMerchantS() {
+ return this.flgGoogleMerchantS;
+ }
+
+ public void setFlgGoogleMerchantS(long flgGoogleMerchant) {
+ this.flgGoogleMerchantS = flgGoogleMerchant;
+ }
+
+ public long getFlgPreventivoWwwS() {
+ return this.flgPreventivoWwwS;
+ }
+
+ public void setFlgPreventivoWwwS(long flgPreventivoWwwS) {
+ this.flgPreventivoWwwS = flgPreventivoWwwS;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Ottoxmille.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Ottoxmille.java
new file mode 100644
index 00000000..89a35245
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Ottoxmille.java
@@ -0,0 +1,73 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class Ottoxmille extends DBAdapter implements Serializable {
+ private static final long serialVersionUID = 1684937946550L;
+
+ private long id_ottoxmille;
+
+ private String descrizione;
+
+ public Ottoxmille(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Ottoxmille() {}
+
+ public void setId_ottoxmille(long newId_ottoxmille) {
+ this.id_ottoxmille = newId_ottoxmille;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_ottoxmille() {
+ return this.id_ottoxmille;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ protected ResParm checkDeleteCascade() {
+ return new ResParm(true);
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(OttoxmilleCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from OTTOXMILLE AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/OttoxmilleCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/OttoxmilleCR.java
new file mode 100644
index 00000000..4a68162e
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/OttoxmilleCR.java
@@ -0,0 +1,32 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class OttoxmilleCR extends CRAdapter {
+ private long id_ottoxmille;
+
+ private String descrizione;
+
+ public OttoxmilleCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public OttoxmilleCR() {}
+
+ public void setId_ottoxmille(long newId_ottoxmille) {
+ this.id_ottoxmille = newId_ottoxmille;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_ottoxmille() {
+ return this.id_ottoxmille;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Porto.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Porto.java
new file mode 100644
index 00000000..d76da5f4
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Porto.java
@@ -0,0 +1,75 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class Porto extends _AnagAdapter implements Serializable {
+ private long id_porto;
+
+ private String descrizione;
+
+ private String nota;
+
+ public Porto(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Porto() {}
+
+ public void setId_porto(long newId_porto) {
+ this.id_porto = newId_porto;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setNota(String newNota) {
+ this.nota = newNota;
+ }
+
+ public long getId_porto() {
+ return this.id_porto;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public String getNota() {
+ return (this.nota == null) ? "" : this.nota.trim();
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(PortoCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from PORTO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/PortoCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/PortoCR.java
new file mode 100644
index 00000000..f831720b
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/PortoCR.java
@@ -0,0 +1,42 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class PortoCR extends CRAdapter {
+ private long id_porto;
+
+ private String descrizione;
+
+ private String nota;
+
+ public PortoCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public PortoCR() {}
+
+ public void setId_porto(long newId_porto) {
+ this.id_porto = newId_porto;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setNota(String newNota) {
+ this.nota = newNota;
+ }
+
+ public long getId_porto() {
+ return this.id_porto;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public String getNota() {
+ return (this.nota == null) ? "" : this.nota.trim();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Postazione.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Postazione.java
new file mode 100644
index 00000000..ef77b8ec
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Postazione.java
@@ -0,0 +1,84 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class Postazione extends it.acxent.common.Postazione implements Serializable {
+ private static final long serialVersionUID = -8882732861262606524L;
+
+ private long id_regCassa;
+
+ private RegCassa regCassa;
+
+ public Postazione(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Postazione() {}
+
+ public void setId_regCassa(long newId_regCassa) {
+ this.id_regCassa = newId_regCassa;
+ setRegCassa(null);
+ }
+
+ public long getId_regCassa() {
+ return this.id_regCassa;
+ }
+
+ public void setRegCassa(RegCassa newRegCassa) {
+ this.regCassa = newRegCassa;
+ }
+
+ public RegCassa getRegCassa() {
+ this.regCassa = (RegCassa)getSecondaryObject(this.regCassa, RegCassa.class,
+ getId_regCassa());
+ return this.regCassa;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(PostazioneCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from POSTAZIONE AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find +
+ wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public void findByIp(String l_ip) {
+ String s_Sql_Find = "select A.* from POSTAZIONE AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("A.ipAddress='" + l_ip + "'");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find +
+ wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/PostazioneCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/PostazioneCR.java
new file mode 100644
index 00000000..7a75f2dc
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/PostazioneCR.java
@@ -0,0 +1,34 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+
+public class PostazioneCR extends it.acxent.common.PostazioneCR {
+ private long id_regCassa;
+
+ private RegCassa regCassa;
+
+ public PostazioneCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public PostazioneCR() {}
+
+ public void setId_regCassa(long newId_regCassa) {
+ this.id_regCassa = newId_regCassa;
+ setRegCassa(null);
+ }
+
+ public long getId_regCassa() {
+ return this.id_regCassa;
+ }
+
+ public void setRegCassa(RegCassa newRegCassa) {
+ this.regCassa = newRegCassa;
+ }
+
+ public RegCassa getRegCassa() {
+ this.regCassa = (RegCassa)getSecondaryObject(this.regCassa, RegCassa.class,
+ getId_regCassa());
+ return this.regCassa;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/PrezzoArticolo.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/PrezzoArticolo.java
new file mode 100644
index 00000000..8dd4fcd6
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/PrezzoArticolo.java
@@ -0,0 +1,123 @@
+package it.acxent.anag;
+
+import it.acxent.db.DBAdapter;
+import it.acxent.util.DoubleOperator;
+import java.sql.Date;
+
+public class PrezzoArticolo {
+ private double prezzoBase;
+
+ private double percSconto;
+
+ private double prezzoFinale;
+
+ private long id_clifor;
+
+ private boolean isOfferta;
+
+ private Date dataScadenzaOfferta;
+
+ private double percSconto1;
+
+ private double percSconto3;
+
+ private double percSconto2;
+
+ private double abbuono;
+
+ public PrezzoArticolo() {}
+
+ public PrezzoArticolo(double prezzoBase, double percSconto, double prezzoFinale, double percSconto1, double percSconto2, double percSconto3, double abbuono) {
+ this.prezzoBase = prezzoBase;
+ this.percSconto = percSconto;
+ this.percSconto1 = percSconto1;
+ this.percSconto2 = percSconto2;
+ this.percSconto3 = percSconto3;
+ this.prezzoFinale = prezzoFinale;
+ this.abbuono = abbuono;
+ }
+
+ public double getPercSconto() {
+ return this.percSconto;
+ }
+
+ public void setPercSconto(double percSconto) {
+ this.percSconto = percSconto;
+ }
+
+ public double getPrezzoFinale() {
+ return this.prezzoFinale;
+ }
+
+ public PrezzoArticolo conIva(double l_aliquota) {
+ DoubleOperator prezzoFinale = new DoubleOperator(DBAdapter.conIva(getPrezzoFinale(), l_aliquota));
+ if (getAbbuono() != 0.0D)
+ prezzoFinale.subtract(getAbbuono());
+ return new PrezzoArticolo(DBAdapter.conIva(getPrezzoBase(), l_aliquota), getPercSconto(), prezzoFinale.getResult(),
+ getPercSconto1(), getPercSconto2(), getPercSconto3(), getAbbuono());
+ }
+
+ public double getPrezzoBase() {
+ return this.prezzoBase;
+ }
+
+ public void setPrezzoBase(double prezzoBase) {
+ this.prezzoBase = prezzoBase;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public void setId_clifor(long id_clifor) {
+ this.id_clifor = id_clifor;
+ }
+
+ public boolean isOfferta() {
+ return this.isOfferta;
+ }
+
+ public void setOfferta(boolean isOfferta) {
+ this.isOfferta = isOfferta;
+ }
+
+ public Date getDataScadenzaOfferta() {
+ return this.dataScadenzaOfferta;
+ }
+
+ public void setDataScadenzaOfferta(Date dataScadenzaOfferta) {
+ this.dataScadenzaOfferta = dataScadenzaOfferta;
+ }
+
+ public double getPercSconto1() {
+ return this.percSconto1;
+ }
+
+ public void setPercSconto1(double percSconto1) {
+ this.percSconto1 = percSconto1;
+ }
+
+ public double getPercSconto3() {
+ return this.percSconto3;
+ }
+
+ public void setPercSconto3(double percSconto3) {
+ this.percSconto3 = percSconto3;
+ }
+
+ public double getPercSconto2() {
+ return this.percSconto2;
+ }
+
+ public void setPercSconto2(double percSconto2) {
+ this.percSconto2 = percSconto2;
+ }
+
+ public double getAbbuono() {
+ return this.abbuono;
+ }
+
+ public void setAbbuono(double abbuono) {
+ this.abbuono = abbuono;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/RegCassa.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/RegCassa.java
new file mode 100644
index 00000000..8c7ee8a0
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/RegCassa.java
@@ -0,0 +1,112 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class RegCassa extends _AnagAdapter implements Serializable {
+ private long flgTipoCassa;
+
+ private String descrizione;
+
+ private String ipCassa;
+
+ private long porta;
+
+ private long id_regCassa;
+
+ public static final long TIPO_CASSA_SIEMENS = 0L;
+
+ public static final long TIPO_CASSA_EPSON = 1L;
+
+ public RegCassa(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public RegCassa() {}
+
+ public void setId_regCassa(long newId_regCassa) {
+ this.id_regCassa = newId_regCassa;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setIpCassa(String newIpCassa) {
+ this.ipCassa = newIpCassa;
+ }
+
+ public void setPorta(long newPorta) {
+ this.porta = newPorta;
+ }
+
+ public long getId_regCassa() {
+ return this.id_regCassa;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" :
+ this.descrizione.trim();
+ }
+
+ public String getIpCassa() {
+ return (this.ipCassa == null) ? "" : this.ipCassa.trim();
+ }
+
+ public long getPorta() {
+ return this.porta;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(RegCassaCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from REG_CASSA AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find +
+ wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public long getFlgTipoCassa() {
+ return this.flgTipoCassa;
+ }
+
+ public void setFlgTipoCassa(long flgTipoCassa) {
+ this.flgTipoCassa = flgTipoCassa;
+ }
+
+ public static final String getTipoCassa(long l_flgTipoCassa) {
+ if (l_flgTipoCassa == 0L)
+ return "Siemens";
+ if (l_flgTipoCassa == 1L)
+ return "Epson";
+ return "??";
+ }
+
+ public String getTipoCassa() {
+ return getTipoCassa(getFlgTipoCassa());
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/RegCassaCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/RegCassaCR.java
new file mode 100644
index 00000000..4adab0bd
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/RegCassaCR.java
@@ -0,0 +1,52 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class RegCassaCR extends CRAdapter {
+ private long id_regCassa;
+
+ private String descrizione;
+
+ private String ipCassa;
+
+ private long porta;
+
+ public RegCassaCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public RegCassaCR() {}
+
+ public void setId_regCassa(long newId_regCassa) {
+ this.id_regCassa = newId_regCassa;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setIpCassa(String newIpCassa) {
+ this.ipCassa = newIpCassa;
+ }
+
+ public void setPorta(long newPorta) {
+ this.porta = newPorta;
+ }
+
+ public long getId_regCassa() {
+ return this.id_regCassa;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public String getIpCassa() {
+ return (this.ipCassa == null) ? "" : this.ipCassa.trim();
+ }
+
+ public long getPorta() {
+ return this.porta;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Regione.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Regione.java
new file mode 100644
index 00000000..01198532
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Regione.java
@@ -0,0 +1,66 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class Regione extends _AnagAdapter implements Serializable {
+ private static final long serialVersionUID = 8182997964401040060L;
+
+ private String id_regione;
+
+ private String descrizione;
+
+ public Regione(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Regione() {}
+
+ public void setId_regione(String newId_regione) {
+ this.id_regione = newId_regione;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public String getId_regione() {
+ return (this.id_regione == null) ? "" : this.id_regione.trim();
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(RegioneCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from REGIONE AS A";
+ String s_Sql_Order = " order by A.descrizione";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/RegioneCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/RegioneCR.java
new file mode 100644
index 00000000..bcd6dfcb
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/RegioneCR.java
@@ -0,0 +1,32 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class RegioneCR extends CRAdapter {
+ private String id_regione;
+
+ private String descrizione;
+
+ public RegioneCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public RegioneCR() {}
+
+ public void setId_regione(String newId_regione) {
+ this.id_regione = newId_regione;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public String getId_regione() {
+ return (this.id_regione == null) ? "" : this.id_regione.trim();
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Rubrica.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Rubrica.java
new file mode 100644
index 00000000..e89c30c3
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Rubrica.java
@@ -0,0 +1,36 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.util.Vectumerator;
+
+public class Rubrica extends Clifor {
+ private static final long serialVersionUID = 1085261265605689583L;
+
+ private long id_rubrica;
+
+ public Rubrica() {}
+
+ public Rubrica(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public String getTableBeanName() {
+ return "CLIFOR";
+ }
+
+ public String getFlgTipo() {
+ return "R";
+ }
+
+ public Vectumerator findByCR(RubricaCR CR, int pageNumber, int pageRows) {
+ return findByCR(CR, pageNumber, pageRows);
+ }
+
+ public long getId_rubrica() {
+ return getId_clifor();
+ }
+
+ public void setId_rubrica(long id_rubrica) {
+ setId_clifor(id_rubrica);
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/RubricaCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/RubricaCR.java
new file mode 100644
index 00000000..3898a807
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/RubricaCR.java
@@ -0,0 +1,25 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+
+public class RubricaCR extends CliforCR {
+ private long id_cliente;
+
+ public RubricaCR() {}
+
+ public RubricaCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public String getFlgTipo() {
+ return "R";
+ }
+
+ public long getId_cliente() {
+ return getId_clifor();
+ }
+
+ public void setId_cliente(long id_cliente) {
+ setId_clifor(id_cliente);
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoAllegatoClifor.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoAllegatoClifor.java
new file mode 100644
index 00000000..32240c08
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoAllegatoClifor.java
@@ -0,0 +1,69 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class TipoAllegatoClifor extends _AnagAdapter implements Serializable {
+ private long id_tipoAllegatoClifor;
+
+ private String descrizione;
+
+ public TipoAllegatoClifor(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public TipoAllegatoClifor() {}
+
+ public void setId_tipoAllegatoClifor(long newId_tipoAllegatoClifor) {
+ this.id_tipoAllegatoClifor = newId_tipoAllegatoClifor;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_tipoAllegatoClifor() {
+ return this.id_tipoAllegatoClifor;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" :
+ this.descrizione.trim();
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(TipoAllegatoCliforCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from TIPO_ALLEGATO_CLIFOR AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (CR.getId_tipoAllegatoCliforS() > 0L)
+ wc.addWc("A.id_tipoAllegatoClifor > " + CR.getId_tipoAllegatoCliforS());
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.descrizione like '%" + token + "%' )");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find +
+ wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoAllegatoCliforCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoAllegatoCliforCR.java
new file mode 100644
index 00000000..f3fdb185
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoAllegatoCliforCR.java
@@ -0,0 +1,32 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class TipoAllegatoCliforCR extends CRAdapter {
+ private long id_tipoAllegatoCliforS;
+
+ private String descrizione;
+
+ public TipoAllegatoCliforCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public TipoAllegatoCliforCR() {}
+
+ public void setId_tipoAllegatoCliforS(long newId_tipoAllegatoClifor) {
+ this.id_tipoAllegatoCliforS = newId_tipoAllegatoClifor;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_tipoAllegatoCliforS() {
+ return this.id_tipoAllegatoCliforS;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoClifor.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoClifor.java
new file mode 100644
index 00000000..5f3b7480
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoClifor.java
@@ -0,0 +1,175 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class TipoClifor extends _AnagAdapter implements Serializable {
+ private static final long serialVersionUID = -8580769150946613128L;
+
+ public static final long TIPOLOGIA_FOR_NESSUNO = 0L;
+
+ public static final long TIPOLOGIA_FOR_AGENTE = 1L;
+
+ public static final long TIPOLOGIA_FOR_PROGETTISTA = 2L;
+
+ public static final long TIPOLOGIA_FOR_RESP_COMMERCIALE = 3L;
+
+ public static final long TIPOLOGIA_FOR_RESP_PRODUZIONE = 4L;
+
+ public static final long TIPOLOGIA_FOR_TEX_TESSITURA = 20L;
+
+ public static final long TIPOLOGIA_FOR_TEX_TINTORIA = 21L;
+
+ public static final long TIPOLOGIA_FOR_TEX_RIFINIZIONE = 22L;
+
+ public static final long TIPOLOGIA_FOR_TEX_ACCOPPIATURA = 23L;
+
+ public static final long TIPOLOGIA_FOR_AGENTE_E_RESP_COMM = 101L;
+
+ public static final long TIPOLOGIA_FOR_AGENTE_RESP_COMM_PROG = 102L;
+
+ private long id_tipoClifor;
+
+ private String descrizione;
+
+ private String flgTipo;
+
+ private long flgTipologia;
+
+ private long flgProvvCliente;
+
+ private long flgProvvArticolo;
+
+ public TipoClifor(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public TipoClifor() {}
+
+ public void setId_tipoClifor(long newId_causaleMagazzino) {
+ this.id_tipoClifor = newId_causaleMagazzino;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_tipoClifor() {
+ return this.id_tipoClifor;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(TipoCliforCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from TIPO_CLIFOR AS A";
+ String s_Sql_Order = " order by A.flgTipo,A.descrizione";
+ WcString wc = new WcString();
+ if (!CR.getFlgTipoS().isEmpty())
+ wc.addWc(" A.flgTipo = '" + CR.getFlgTipoS() + "' ");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getFlgTipo() {
+ return (this.flgTipo == null) ? "" : this.flgTipo;
+ }
+
+ public void setFlgTipo(String flgTipo) {
+ this.flgTipo = flgTipo;
+ }
+
+ public long getFlgTipologia() {
+ return this.flgTipologia;
+ }
+
+ public static final String getTipologia(long l_flgTipologia) {
+ switch ((int)l_flgTipologia) {
+ case 1:
+ return "Agente";
+ case 2:
+ return "Progettista";
+ case 3:
+ return "Responsabile Commerciale";
+ case 4:
+ return "Responsabile Produzione";
+ case 22:
+ return "Rifinizione";
+ case 20:
+ return "Tessitura";
+ case 21:
+ return "Tintoria";
+ case 23:
+ return "Accoppiatura";
+ }
+ return "";
+ }
+
+ public String getTipologia() {
+ return getTipologia(getFlgTipologia());
+ }
+
+ public void setFlgTipologia(long flgAgente) {
+ this.flgTipologia = flgAgente;
+ }
+
+ public String getDescrizioneTipologia(long l_id) {
+ if (getFlgTipo().equals("C"))
+ return "--";
+ String ret = "";
+ if (l_id == 0L) {
+ ret = "Nessuna";
+ } else if (l_id == 1L) {
+ ret = "Agente";
+ } else if (l_id == 2L) {
+ ret = "Progettista";
+ } else if (l_id == 3L) {
+ ret = "Resp. Commerciale";
+ } else if (l_id == 4L) {
+ ret = "Resp. Produzione";
+ }
+ return ret;
+ }
+
+ public Vectumerator findByTipo(String l_flgTipo) {
+ String s_Sql_Find = "select A.* from TIPO_CLIFOR AS A";
+ String s_Sql_Order = " order by A.descrizione";
+ WcString wc = new WcString();
+ wc.addWc(" A.flgTipo = '" + l_flgTipo + "' ");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public long getFlgProvvCliente() {
+ return this.flgProvvCliente;
+ }
+
+ public void setFlgProvvCliente(long flgProvvCliente) {
+ this.flgProvvCliente = flgProvvCliente;
+ }
+
+ public long getFlgProvvArticolo() {
+ return this.flgProvvArticolo;
+ }
+
+ public void setFlgProvvArticolo(long flgProvvArticolo) {
+ this.flgProvvArticolo = flgProvvArticolo;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoCliforCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoCliforCR.java
new file mode 100644
index 00000000..ee921275
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoCliforCR.java
@@ -0,0 +1,54 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import java.io.Serializable;
+
+public class TipoCliforCR extends CRAdapter implements Serializable {
+ private long id_tipoClifor;
+
+ private String descrizioneS;
+
+ private String flgTipoS;
+
+ private long flgTipologiaS;
+
+ public TipoCliforCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public TipoCliforCR() {}
+
+ public void setId_tipoClifor(long newId_causaleMagazzino) {
+ this.id_tipoClifor = newId_causaleMagazzino;
+ }
+
+ public void setDescrizioneS(String newDescrizione) {
+ this.descrizioneS = newDescrizione;
+ }
+
+ public long getId_tipoClifor() {
+ return this.id_tipoClifor;
+ }
+
+ public String getDescrizioneS() {
+ return (this.descrizioneS == null) ? "" :
+ this.descrizioneS.trim();
+ }
+
+ public String getFlgTipoS() {
+ return (this.flgTipoS == null) ? AB_EMPTY_STRING : this.flgTipoS;
+ }
+
+ public long getFlgTipologiaS() {
+ return this.flgTipologiaS;
+ }
+
+ public void setFlgTipoS(String flgTipo) {
+ this.flgTipoS = flgTipo;
+ }
+
+ public void setFlgTipologiaS(long flgAgente) {
+ this.flgTipologiaS = flgAgente;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoContratto.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoContratto.java
new file mode 100644
index 00000000..a9be5b5a
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoContratto.java
@@ -0,0 +1,132 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.Date;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class TipoContratto extends _AnagAdapter implements Serializable {
+ private long id_tipoContratto;
+
+ private String messaggioSms;
+
+ private Date dataFineValiditaContratto;
+
+ private long durataMesi;
+
+ private long flgPrepagato;
+
+ private String descrizione;
+
+ private long ggInvioMsg;
+
+ public TipoContratto(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public TipoContratto() {}
+
+ public void setId_tipoContratto(long newId_tipoContratto) {
+ this.id_tipoContratto = newId_tipoContratto;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setDataFineValiditaContratto(Date newDataFineValiditaContratto) {
+ this.dataFineValiditaContratto = newDataFineValiditaContratto;
+ }
+
+ public void setDurataMesi(long newMesiRinnovo) {
+ this.durataMesi = newMesiRinnovo;
+ }
+
+ public long getId_tipoContratto() {
+ return this.id_tipoContratto;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" :
+ this.descrizione.trim();
+ }
+
+ public Date getDataFineValiditaContratto() {
+ return this.dataFineValiditaContratto;
+ }
+
+ public long getDurataMesi() {
+ return this.durataMesi;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(TipoContrattoCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from TIPO_CONTRATTO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find +
+ wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public static String getPrepagato(long l_flgPrepagato) {
+ switch ((int)l_flgPrepagato) {
+ case 1:
+ return "Prepagato";
+ case 2:
+ return "Contratto";
+ }
+ return "??";
+ }
+
+ public void setFlgPrepagato(long flgPrepagato) {
+ this.flgPrepagato = flgPrepagato;
+ }
+
+ public long getFlgPrepagato() {
+ return this.flgPrepagato;
+ }
+
+ public String getPrepagato() {
+ return getPrepagato(getFlgPrepagato());
+ }
+
+ public String getMessaggioSms() {
+ return (this.messaggioSms == null) ? "" : this.messaggioSms.trim();
+ }
+
+ public void setMessaggioSms(String messaggioSms) {
+ this.messaggioSms = messaggioSms;
+ }
+
+ public long getGgInvioMsg() {
+ return this.ggInvioMsg;
+ }
+
+ public void setGgInvioMsg(long ggInvioMsg) {
+ this.ggInvioMsg = ggInvioMsg;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoContrattoCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoContrattoCR.java
new file mode 100644
index 00000000..ccdec3a0
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoContrattoCR.java
@@ -0,0 +1,74 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import java.sql.Date;
+import java.sql.Timestamp;
+
+public class TipoContrattoCR extends CRAdapter {
+ private long id_tipoContratto;
+
+ private String descrizione;
+
+ private Date dataFineValiditaContratto;
+
+ private long durataMesi;
+
+ private long lastUpdId_user;
+
+ private Timestamp lastUpdTmst;
+
+ public TipoContrattoCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public TipoContrattoCR() {}
+
+ public void setId_tipoContratto(long newId_tipoContratto) {
+ this.id_tipoContratto = newId_tipoContratto;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setDataFineValiditaContratto(Date newDataFineValiditaContratto) {
+ this.dataFineValiditaContratto = newDataFineValiditaContratto;
+ }
+
+ public void setDurataMesi(long newMesiRinnovo) {
+ this.durataMesi = newMesiRinnovo;
+ }
+
+ public void setLastUpdId_user(long newLastUpdId_user) {
+ this.lastUpdId_user = newLastUpdId_user;
+ }
+
+ public void setLastUpdTmst(Timestamp newLastUpdTmst) {
+ this.lastUpdTmst = newLastUpdTmst;
+ }
+
+ public long getId_tipoContratto() {
+ return this.id_tipoContratto;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public Date getDataFineValiditaContratto() {
+ return this.dataFineValiditaContratto;
+ }
+
+ public long getDurataMesi() {
+ return this.durataMesi;
+ }
+
+ public long getLastUpdId_user() {
+ return this.lastUpdId_user;
+ }
+
+ public Timestamp getLastUpdTmst() {
+ return this.lastUpdTmst;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoGlossario.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoGlossario.java
new file mode 100644
index 00000000..0c736941
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoGlossario.java
@@ -0,0 +1,83 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class TipoGlossario extends DBAdapter implements Serializable {
+ private static final long serialVersionUID = 1695626744400L;
+
+ private long id_tipoGlossario;
+
+ private String codice;
+
+ private String descrizione;
+
+ public TipoGlossario(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public TipoGlossario() {}
+
+ public void setId_tipoGlossario(long newId_tipoGlossario) {
+ this.id_tipoGlossario = newId_tipoGlossario;
+ }
+
+ public void setCodice(String newCodice) {
+ this.codice = newCodice;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_tipoGlossario() {
+ return this.id_tipoGlossario;
+ }
+
+ public String getCodice() {
+ return (this.codice == null) ? "" : this.codice.trim();
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ protected ResParm checkDeleteCascade() {
+ return new ResParm(true);
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(TipoGlossarioCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from TIPO_GLOSSARIO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoGlossarioCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoGlossarioCR.java
new file mode 100644
index 00000000..797ff9c8
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoGlossarioCR.java
@@ -0,0 +1,44 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class TipoGlossarioCR extends CRAdapter {
+ private static final long serialVersionUID = -4811961982357118183L;
+
+ private long id_tipoGlossario;
+
+ private String codice;
+
+ private String descrizione;
+
+ public TipoGlossarioCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public TipoGlossarioCR() {}
+
+ public void setId_tipoGlossario(long newId_tipoGlossario) {
+ this.id_tipoGlossario = newId_tipoGlossario;
+ }
+
+ public void setCodice(String newCodice) {
+ this.codice = newCodice;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_tipoGlossario() {
+ return this.id_tipoGlossario;
+ }
+
+ public String getCodice() {
+ return (this.codice == null) ? "" : this.codice.trim();
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoPagamento.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoPagamento.java
new file mode 100644
index 00000000..faf838f6
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoPagamento.java
@@ -0,0 +1,855 @@
+package it.acxent.anag;
+
+import it.acxent.contab.Documento;
+import it.acxent.contab.DocumentoScadenza;
+import it.acxent.db.AddImgInterface;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.DoubleOperator;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.Date;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.util.Calendar;
+
+public class TipoPagamento extends _AnagAdapter implements Serializable, AddImgInterface {
+ private static final long serialVersionUID = 1807466847085865884L;
+
+ public static final String PATH_IMG = "_img/_imgTipoPagamento/";
+
+ private long id_tipoPagamento;
+
+ private long ordineWww;
+
+ private long periodicita;
+
+ private String codiceTenderCassa;
+
+ private long flgTipoPagamento;
+
+ private long flgAbilitatoCorriere;
+
+ private long giornoFisso;
+
+ private long primaRata;
+
+ private long nRate;
+
+ private String descrizione_it;
+
+ private long flgWww;
+
+ private long flgAbilitatoNegozio;
+
+ private long flgAbilitatoStranieri;
+
+ private long codiceCassaEpson;
+
+ private long flgPrimaScadenza;
+
+ private long flgTipoPagamentoEcommerce;
+
+ private double tariffaAggiuntiva;
+
+ private double percWwwSconto;
+
+ private double percWwwCommissione;
+
+ private double wwwCommissionePercDefault;
+
+ private double wwwTariffaFissa;
+
+ private double wwwValoreSoglia;
+
+ private double wwwPercOltreSoglia;
+
+ private String codicePagamentoExport;
+
+ private long flgNoFermopoint;
+
+ private static TipoPagamento tipoPagamentoAmazon;
+
+ private static TipoPagamento tipoPagamentoEbay;
+
+ private static TipoPagamento tipoPagamentoPaypal;
+
+ private static TipoPagamento tipoPagamentoStripe;
+
+ public static final long PRIMA_SCADENZA_FINE_MESE = 1L;
+
+ public static final long PRIMA_SCADENZA_DATA_FATTURA = 2L;
+
+ public static final long TP_RIBA = 1L;
+
+ public static final long TP_BONIFICO = 2L;
+
+ public static final long TP_RIM_DIRETTA = 3L;
+
+ public static final long TP_DIFFERITO = 4L;
+
+ public static final long TP_CC = 5L;
+
+ public static final long WWW_NO_WWW = 0L;
+
+ public static final long WWW_SOLO_WWW = 1L;
+
+ public static final long WWW_ENTRAMBI_WWW = 2L;
+
+ public static final long TP_WWW_NESSUNO = 0L;
+
+ public static final long TP_WWW_PAYPAL = 1L;
+
+ public static final long TP_WWW_SELLA = 2L;
+
+ public static final long TP_WWW_STRIPE = 3L;
+
+ public static final long TP_WWW_PAYPAL_PLUS_STRIPE = 4L;
+
+ public static final long TP_WWW_EBAY = 99L;
+
+ public static final long TP_WWW_AMAZON = 98L;
+
+ public TipoPagamento(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public TipoPagamento() {}
+
+ public void setId_tipoPagamento(long newId_tipoPagamento) {
+ this.id_tipoPagamento = newId_tipoPagamento;
+ }
+
+ public void setPeriodicita(long newPeriodicita) {
+ this.periodicita = newPeriodicita;
+ }
+
+ @Deprecated
+ public void setDescrizione_it(String newDescrizione_it) {
+ this.descrizione_it = newDescrizione_it;
+ }
+
+ public void setFlgTipoPagamento(long newFlgTipoPagamento) {
+ this.flgTipoPagamento = newFlgTipoPagamento;
+ }
+
+ public void setFlgPrimaScadenza(long newFlgPrimaScadenza) {
+ this.flgPrimaScadenza = newFlgPrimaScadenza;
+ }
+
+ public void setGiornoFisso(long newGiornoFisso) {
+ this.giornoFisso = newGiornoFisso;
+ }
+
+ public void setPrimaRata(long newPrimaRata) {
+ this.primaRata = newPrimaRata;
+ }
+
+ public void setNRate(long newNRate) {
+ this.nRate = newNRate;
+ }
+
+ public long getId_tipoPagamento() {
+ return this.id_tipoPagamento;
+ }
+
+ public long getPeriodicita() {
+ return this.periodicita;
+ }
+
+ public String getDescrizioneTipo() {
+ String temp = getTipoPagamento() + " " + getTipoPagamento() + getPrimaScadenza();
+ if (getNRate() > 1L)
+ temp = temp + " per " + temp + " rate ogni " + getNRate();
+ if (getGiornoFisso() > 0L)
+ temp = temp + " al " + temp + " del mese";
+ return temp;
+ }
+
+ @Deprecated
+ public String getDescrizione_it() {
+ return getDescrizione("it");
+ }
+
+ public long getFlgTipoPagamento() {
+ return this.flgTipoPagamento;
+ }
+
+ public String getPeriodicitaDesc() {
+ return getPeriodicitaDesc(getPeriodicita());
+ }
+
+ public static final String getPrimaScadenza(long l_flgPrimaScadenza) {
+ switch ((int)l_flgPrimaScadenza) {
+ case 2:
+ return "Data Fattura";
+ case 1:
+ return "Fine Mese";
+ }
+ return "??";
+ }
+
+ public String getPrimaScadenza() {
+ return getPrimaScadenza(getFlgPrimaScadenza());
+ }
+
+ public String getTipoPagamento() {
+ return getTipoPagamento(getFlgTipoPagamento());
+ }
+
+ public long getFlgPrimaScadenza() {
+ return this.flgPrimaScadenza;
+ }
+
+ public long getGiornoFisso() {
+ return this.giornoFisso;
+ }
+
+ public long getPrimaRata() {
+ return this.primaRata;
+ }
+
+ public long getNRate() {
+ return (this.nRate == 0L) ? 1L : this.nRate;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(TipoPagamentoCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from TIPO_PAGAMENTO AS A";
+ String s_Sql_Order = " order by A.descrizione_it ";
+ if (CR.getFlgOrderBy() == TipoPagamentoCR.ORDER_BY_ORDINEWWW)
+ s_Sql_Order = " order by A.ordineWww, A.descrizione_it ";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ s_Sql_Find = "select A.* , B.descrizione from TIPO_PAGAMENTO AS A left JOIN DESC_TXT_LANG AS B ON A.id_tipoPagamento = B.idTabella AND B.tabella = 'TIPO_PAGAMENTO' AND B.campo = 'descrizione' ";
+ s_Sql_Order = " order by B.descrizione ";
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(B.descrizione like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ if (CR.getFlgTipoPagamento() > 0L)
+ wc.addWc("A.flgTipoPagamento=" + CR.getFlgTipoPagamento());
+ if (CR.getFlgWww() == 0L) {
+ wc.addWc("(A.flgWww is null or A.flgWww=0)");
+ } else if (CR.getFlgWww() > 0L) {
+ wc.addWc("A.flgWww=" + CR.getFlgWww());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getCodiceTenderCassa() {
+ return (this.codiceTenderCassa == null) ? "" : this.codiceTenderCassa.trim();
+ }
+
+ public void setCodiceTenderCassa(String codiceTenderCassa) {
+ this.codiceTenderCassa = codiceTenderCassa;
+ }
+
+ public Vectumerator findCodiciTender() {
+ String s_Sql_Find = "select A.* from TIPO_PAGAMENTO AS A";
+ String s_Sql_Order = " order by A.codiceTenderCassa";
+ WcString wc = new WcString();
+ wc.addWc("A.codiceTenderCassa is not null");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getDescrizione(int l_length) {
+ return subString(getDescrizione(), l_length);
+ }
+
+ public static final String getPeriodicitaDesc(long l_periodicita) {
+ switch ((int)l_periodicita) {
+ case 0:
+ return "Nessuna";
+ case 1:
+ return "30 gg";
+ case 2:
+ return "60 gg";
+ case 3:
+ return "90 gg";
+ case 4:
+ return "120 gg";
+ }
+ return "??";
+ }
+
+ public static final String getTipoPagamento(long l_flgTipoPagamento) {
+ switch ((int)l_flgTipoPagamento) {
+ case 2:
+ return "Bonifico";
+ case 1:
+ return "Ric. Banc.";
+ case 3:
+ return "Rim. Diretta";
+ case 4:
+ return "Differito";
+ case 5:
+ return "Carta di Credito";
+ }
+ return "??";
+ }
+
+ public long getFlgWww() {
+ return this.flgWww;
+ }
+
+ public void setFlgWww(long flgWww) {
+ this.flgWww = flgWww;
+ }
+
+ public void findPagamentoByTipoPagamentoEcommerce(long l_flgTipoPagamentoEcommerce) {
+ String s_Sql_Find = "select A.* from TIPO_PAGAMENTO AS A ";
+ String s_Sql_Order = " ";
+ WcString wc = new WcString();
+ wc.addWc("A.flgTipoPagamentoEcommerce=" + l_flgTipoPagamentoEcommerce);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public Vectumerator findPagamentiWww(boolean l_isStraniero, boolean noFermoPont) {
+ String s_Sql_Find = "select distinct A.* from TIPO_PAGAMENTO AS A left JOIN DESC_TXT_LANG AS B ON A.id_tipoPagamento = B.idTabella AND B.tabella = 'TIPO_PAGAMENTO' AND B.campo = 'descrizione' ";
+ String s_Sql_Order = " order by B.descrizione";
+ WcString wc = new WcString();
+ wc.addWc("A.flgWww>=1");
+ if (!l_isStraniero) {
+ wc.addWc("(A.flgAbilitatoStranieri is null or A.flgAbilitatoStranieri =0 or A.flgAbilitatoStranieri =1) ");
+ } else {
+ wc.addWc("(A.flgAbilitatoStranieri is null or A.flgAbilitatoStranieri =0 or A.flgAbilitatoStranieri =2) ");
+ }
+ if (noFermoPont)
+ wc.addWc("(A.flgNoFermopoint is null or A.flgNoFermopoint =0)");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public Vectumerator findPagamentiWwwByClifor(long l_id_clifor) {
+ String s_Sql_Find = "select distinct A.* from TIPO_PAGAMENTO AS A inner join CLIFOR_TIPO_PAGAMENTO as C on C.id_tipoPagamento=A.id_tipoPagamento left JOIN DESC_TXT_LANG AS B ON A.id_tipoPagamento = B.idTabella AND B.tabella = 'TIPO_PAGAMENTO' AND B.campo = 'descrizione' ";
+ String s_Sql_Order = " order by B.descrizione";
+ WcString wc = new WcString();
+ wc.addWc("C.id_clifor=" + l_id_clifor);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getWww() {
+ return getWww(getFlgWww());
+ }
+
+ public static final String getWww(long l_flgWww) {
+ switch ((int)l_flgWww) {
+ case 0:
+ return "No Www";
+ case 1:
+ return "Solo Www";
+ case 2:
+ return "Sempre";
+ }
+ return "??";
+ }
+
+ public long getFlgAbilitatoCorriere() {
+ return this.flgAbilitatoCorriere;
+ }
+
+ public void setFlgAbilitatoCorriere(long flgAbilitatoCorriere) {
+ this.flgAbilitatoCorriere = flgAbilitatoCorriere;
+ }
+
+ public long getFlgAbilitatoNegozio() {
+ return this.flgAbilitatoNegozio;
+ }
+
+ public void setFlgAbilitatoNegozio(long flgAbilitatoNegozio) {
+ this.flgAbilitatoNegozio = flgAbilitatoNegozio;
+ }
+
+ public boolean useDescLangTables() {
+ return true;
+ }
+
+ public String getDescrizione() {
+ return getDescrizione("it");
+ }
+
+ public String getDescrizione(String lang) {
+ if (lang.isEmpty())
+ lang = "it";
+ return getDescTxtLang("descrizione", lang);
+ }
+
+ public String getMsgMailProcedi(String lang) {
+ if (lang.isEmpty())
+ lang = "it";
+ return getDescTxtLang("msgMailProcedi", lang);
+ }
+
+ public String getMsgMailAspetta(String lang) {
+ if (lang.isEmpty())
+ lang = "it";
+ return getDescTxtLang("msgMailAspetta", lang);
+ }
+
+ public long getCodiceCassaEpson() {
+ return this.codiceCassaEpson;
+ }
+
+ public void setCodiceCassaEpson(long codiceCassaEpson) {
+ this.codiceCassaEpson = codiceCassaEpson;
+ }
+
+ public Vectumerator getMesiEsclusi() {
+ MeseEsclusoCR CR = new MeseEsclusoCR(getApFull());
+ MeseEscluso meseEscluso = new MeseEscluso(getApFull());
+ CR.setId_tipoPagamento(getId_tipoPagamento());
+ return meseEscluso.findByCR(CR, 0, 0);
+ }
+
+ public int getMesiPrimaRata() {
+ DoubleOperator dp = new DoubleOperator((float)getPrimaRata());
+ dp.divide(30.0F);
+ return (int)dp.getResult();
+ }
+
+ public Vectumerator getScadenzeDocumento(long id_documento) {
+ DocumentoScadenza dp = new DocumentoScadenza(getApFull());
+ DoubleOperator dop = new DoubleOperator();
+ DoubleOperator totaleRate = new DoubleOperator();
+ Calendar cal = Calendar.getInstance();
+ Calendar calBasePrimaRata = Calendar.getInstance();
+ Vectumerator vec = new Vectumerator();
+ Documento bean = new Documento(getApFull());
+ bean.findByPrimaryKey(id_documento);
+ double totaleDaPagare = bean.getTotaleDocumento();
+ if (bean.getClifor().getFlgSplitPayment() == 1L)
+ totaleDaPagare = bean.getImponibileTotale();
+ if (bean.getTipoPagamento().getFlgTipoPagamento() == 1L ||
+ bean.getTipoPagamento().getFlgTipoPagamento() == 2L ||
+ bean.getTipoPagamento().getFlgTipoPagamento() == 3L) {
+ Vectumerator vecme = bean.getTipoPagamento().getMesiEsclusi();
+ dop.add(totaleDaPagare);
+ dop.divide((float)bean.getTipoPagamento().getNRate());
+ dop.setScale(2, 5);
+ cal.setTime(bean.getDataDocumento());
+ if (bean.getTipoPagamento().getFlgPrimaScadenza() == 1L) {
+ cal.set(5, 1);
+ cal.add(2, 1);
+ cal.add(6, -1);
+ }
+ if (bean.getTipoPagamento().getMesiPrimaRata() > 0) {
+ cal.set(5, 1);
+ cal.add(2, bean.getTipoPagamento().getMesiPrimaRata() + 1);
+ cal.add(6, -1);
+ }
+ calBasePrimaRata.setTimeInMillis(cal.getTimeInMillis());
+ if (bean.getTipoPagamento().getGiornoFisso() > 0L) {
+ cal.add(5, 1);
+ cal.set(5, (int)bean.getTipoPagamento().getGiornoFisso());
+ }
+ long giorniEscluso = isMeseEscluso(vecme, cal);
+ if (giorniEscluso > -1L) {
+ cal.add(2, 1);
+ cal.set(5, (int)giorniEscluso);
+ }
+ dp = new DocumentoScadenza(getApFull());
+ dp.setDataScadenza(new Date(cal.getTimeInMillis()));
+ dp.setImportoScadenza(dop.getResult());
+ totaleRate.add(dop.getResult());
+ dp.setId_documento(id_documento);
+ vec.add(dp);
+ for (int i = 0; (long)i < bean.getTipoPagamento().getNRate() - 1L; i++) {
+ cal.setTimeInMillis(calBasePrimaRata.getTimeInMillis());
+ if (bean.getTipoPagamento().getFlgPrimaScadenza() == 1L) {
+ cal.set(5, 1);
+ cal.add(2, (int)bean.getTipoPagamento().getPeriodicita() + 1);
+ cal.add(6, -1);
+ } else {
+ cal.add(2, (int)bean.getTipoPagamento().getPeriodicita());
+ }
+ calBasePrimaRata.setTimeInMillis(cal.getTimeInMillis());
+ if (bean.getTipoPagamento().getGiornoFisso() > 0L) {
+ cal.add(5, 1);
+ cal.set(5, (int)bean.getTipoPagamento().getGiornoFisso());
+ }
+ giorniEscluso = isMeseEscluso(vecme, cal);
+ if (giorniEscluso > -1L) {
+ cal.add(2, 1);
+ cal.set(5, (int)giorniEscluso);
+ }
+ dp = new DocumentoScadenza(getApFull());
+ dp.setDataScadenza(new Date(cal.getTimeInMillis()));
+ if ((long)i == bean.getTipoPagamento().getNRate() - 2L) {
+ DoubleOperator rataFinale = new DoubleOperator(totaleDaPagare);
+ rataFinale.subtract(totaleRate.getResult());
+ rataFinale.setScale(2, 5);
+ dp.setImportoScadenza(rataFinale.getResult());
+ } else {
+ dp.setImportoScadenza(dop.getResult());
+ totaleRate.add(dop.getResult());
+ }
+ dp.setId_documento(id_documento);
+ vec.add(dp);
+ }
+ } else {
+ dp = new DocumentoScadenza(getApFull());
+ dp.setDataScadenza(bean.getDataDocumento());
+ dp.setImportoScadenza(totaleDaPagare);
+ dp.setId_documento(id_documento);
+ vec.add(dp);
+ }
+ return vec;
+ }
+
+ private long isMeseEscluso(Vectumerator vec, Calendar cal) {
+ long ret = -1L;
+ vec.moveFirst();
+ while (vec.hasMoreElements()) {
+ MeseEscluso m = (MeseEscluso)vec.nextElement();
+ if ((long)(cal.get(2) + 1) == m.getMeseEscluso()) {
+ ret = m.getGiornoEscluso();
+ break;
+ }
+ }
+ return ret;
+ }
+
+ public Vectumerator getScadenzeDocumentoOld(long id_documento) {
+ DocumentoScadenza dp = new DocumentoScadenza(getApFull());
+ DoubleOperator dop = new DoubleOperator();
+ Calendar cal = Calendar.getInstance();
+ Vectumerator vec = new Vectumerator();
+ Documento bean = new Documento(getApFull());
+ bean.findByPrimaryKey(id_documento);
+ if (bean.getTipoPagamento().getFlgTipoPagamento() == 1L) {
+ Vectumerator vecme = bean.getTipoPagamento().getMesiEsclusi();
+ dop.add(bean.getTotaleDocumento());
+ dop.divide((float)bean.getTipoPagamento().getNRate());
+ cal.setTime(bean.getDataDocumento());
+ if (bean.getTipoPagamento().getFlgPrimaScadenza() == 1L) {
+ cal.set(5, 1);
+ cal.add(2, 1);
+ cal.add(6, -1);
+ }
+ if (bean.getTipoPagamento().getMesiPrimaRata() > 0)
+ cal.add(2, bean.getTipoPagamento().getMesiPrimaRata());
+ if (bean.getTipoPagamento().getGiornoFisso() > 0L) {
+ cal.add(5, 1);
+ cal.set(5, (int)bean.getTipoPagamento().getGiornoFisso());
+ }
+ long giorniEscluso = isMeseEscluso(vecme, cal);
+ if (giorniEscluso > -1L) {
+ cal.add(2, 1);
+ cal.set(5, (int)giorniEscluso);
+ }
+ dp = new DocumentoScadenza(getApFull());
+ dp.setDataScadenza(new Date(cal.getTimeInMillis()));
+ dp.setImportoScadenza(dop.getResult());
+ dp.setId_documento(id_documento);
+ vec.add(dp);
+ for (int i = 0; (long)i < bean.getTipoPagamento().getNRate() - 1L; i++) {
+ cal.add(2, (int)bean.getTipoPagamento().getPeriodicita());
+ if (bean.getTipoPagamento().getFlgPrimaScadenza() == 1L) {
+ cal.set(5, 1);
+ cal.add(2, 1);
+ cal.add(6, -1);
+ }
+ if (bean.getTipoPagamento().getGiornoFisso() > 0L) {
+ cal.add(5, 1);
+ cal.set(5, (int)bean.getTipoPagamento().getGiornoFisso());
+ }
+ giorniEscluso = isMeseEscluso(vecme, cal);
+ if (giorniEscluso > -1L) {
+ cal.add(2, 1);
+ cal.set(5, (int)giorniEscluso);
+ }
+ dp = new DocumentoScadenza(getApFull());
+ dp.setDataScadenza(new Date(cal.getTimeInMillis()));
+ dp.setImportoScadenza(dop.getResult());
+ dp.setId_documento(id_documento);
+ vec.add(dp);
+ }
+ } else {
+ dp = new DocumentoScadenza(getApFull());
+ dp.setDataScadenza(bean.getDataDocumento());
+ dp.setImportoScadenza(bean.getTotaleDocumento());
+ dp.setId_documento(id_documento);
+ vec.add(dp);
+ }
+ return vec;
+ }
+
+ public ResParm save() {
+ if (getNRate() == 0L)
+ setNRate(1L);
+ if (getNRate() == 1L)
+ setPeriodicita(0L);
+ if (getNRate() > 1L && getPeriodicita() == 0L)
+ setPeriodicita(1L);
+ return super.save();
+ }
+
+ public static final String getFEModalitaPagamento(long l_flgTipoPagamento) {
+ switch ((int)l_flgTipoPagamento) {
+ case 2:
+ case 4:
+ return "MP05";
+ case 1:
+ return "MP12";
+ case 5:
+ return "MP08";
+ case 3:
+ return "MP01";
+ }
+ return "";
+ }
+
+ public String getFEModalitaPagamento() {
+ return getFEModalitaPagamento(getFlgTipoPagamento());
+ }
+
+ public long getFlgAbilitatoStranieri() {
+ return this.flgAbilitatoStranieri;
+ }
+
+ public void setFlgAbilitatoStranieri(long flgAbilitatoStranieri) {
+ this.flgAbilitatoStranieri = flgAbilitatoStranieri;
+ }
+
+ public long getFlgTipoPagamentoEcommerce() {
+ return this.flgTipoPagamentoEcommerce;
+ }
+
+ public void setFlgTipoPagamentoEcommerce(long flgTipoPagamentoEcommerce) {
+ this.flgTipoPagamentoEcommerce = flgTipoPagamentoEcommerce;
+ }
+
+ public String getTipoPagamentoEcommerce() {
+ return getTipoPagamentoEcommerce(getFlgTipoPagamentoEcommerce());
+ }
+
+ public static final String getTipoPagamentoEcommerce(long l_flgTipoPagamentoEcommerce) {
+ switch ((int)l_flgTipoPagamentoEcommerce) {
+ case 0:
+ return "Nessuno";
+ case 1:
+ return "Paypal";
+ case 4:
+ return "Paypal+Stripe";
+ case 3:
+ return "Stripe";
+ case 2:
+ return "Sella";
+ case 99:
+ return "Ebay";
+ case 98:
+ return "Amazon";
+ }
+ return "??";
+ }
+
+ public ResParm cambiaFlg(String l_flg) {
+ ResParm rp = new ResParm(true);
+ if (getId_tipoPagamento() > 0L) {
+ if (l_flg.equals("flgWww")) {
+ setFlgWww((getFlgWww() == 1L) ? 2L : ((getFlgWww() == 2L) ? 0L : 1L));
+ } else if (l_flg.equals("flgAbilitaNegozio")) {
+ setFlgAbilitatoNegozio((getFlgAbilitatoNegozio() == 1L) ? 0L : 1L);
+ } else if (l_flg.equals("flgAbilitatoCorriere")) {
+ setFlgAbilitatoCorriere((getFlgAbilitatoCorriere() == 1L) ? 0L : 1L);
+ } else if (l_flg.equals("flgNoFermopoint")) {
+ setFlgNoFermopoint((getFlgNoFermopoint() == 1L) ? 0L : 1L);
+ }
+ rp = save();
+ } else {
+ rp.setStatus(false);
+ rp.setMsg("Tipo non trovato!");
+ }
+ return rp;
+ }
+
+ public String getPathImg() {
+ return "_img/_imgTipoPagamento/";
+ }
+
+ public String getDescrizioneWww(String l_lang) {
+ if (l_lang.isEmpty())
+ l_lang = "it";
+ return getDescTxtLang("descrizioneWww", l_lang);
+ }
+
+ public String getSloganBreve(String l_lang) {
+ if (l_lang.isEmpty())
+ l_lang = "it";
+ return getDescTxtLang("sloganBreve", l_lang);
+ }
+
+ public double getPercWwwSconto() {
+ return this.percWwwSconto;
+ }
+
+ public void setPercWwwSconto(double percWwwSconto) {
+ this.percWwwSconto = percWwwSconto;
+ }
+
+ public double getPercWwwCommissione() {
+ return this.percWwwCommissione;
+ }
+
+ public void setPercWwwCommissione(double percWwwCommissione) {
+ this.percWwwCommissione = percWwwCommissione;
+ }
+
+ public double getWwwCommissionePercDefault() {
+ return this.wwwCommissionePercDefault;
+ }
+
+ public double getWwwTariffaFissa() {
+ return this.wwwTariffaFissa;
+ }
+
+ public void setWwwCommissionePercDefault(double wwwCommissionePercDefault) {
+ this.wwwCommissionePercDefault = wwwCommissionePercDefault;
+ }
+
+ public void setWwwTariffaFissa(double wwwTariffaFissa) {
+ this.wwwTariffaFissa = wwwTariffaFissa;
+ }
+
+ public String getDescCommissioni() {
+ StringBuilder sb = new StringBuilder();
+ if (getFlgTipoPagamentoEcommerce() > 0L) {
+ if (getWwwTariffaFissa() > 0.0D)
+ sb.append("Tar. fissa: " + getNf().format(getWwwTariffaFissa()));
+ if (getWwwCommissionePercDefault() > 0.0D)
+ sb.append(" % comm. def: " + getNf().format(getWwwCommissionePercDefault()) + "%");
+ }
+ return sb.toString();
+ }
+
+ public static TipoPagamento getTipoPagamentoEbay(ApplParmFull apFull) {
+ if (tipoPagamentoEbay == null) {
+ tipoPagamentoEbay = new TipoPagamento(apFull);
+ tipoPagamentoEbay.findPagamentoByTipoPagamentoEcommerce(99L);
+ }
+ return tipoPagamentoEbay;
+ }
+
+ public static TipoPagamento getTipoPagamentoStripe(ApplParmFull apFull) {
+ if (tipoPagamentoStripe == null) {
+ tipoPagamentoStripe = new TipoPagamento(apFull);
+ tipoPagamentoStripe.findPagamentoByTipoPagamentoEcommerce(3L);
+ }
+ return tipoPagamentoStripe;
+ }
+
+ public static TipoPagamento getTipoPagamentoPaypal(ApplParmFull apFull) {
+ if (tipoPagamentoPaypal == null) {
+ tipoPagamentoPaypal = new TipoPagamento(apFull);
+ tipoPagamentoPaypal.findPagamentoByTipoPagamentoEcommerce(1L);
+ }
+ return tipoPagamentoPaypal;
+ }
+
+ public static void setTipoPagamentoPaypal(TipoPagamento l_tipoPagamentoPaypal) {
+ tipoPagamentoPaypal = l_tipoPagamentoPaypal;
+ }
+
+ public static void setTipoPagamentoEbay(TipoPagamento l_tipoPagamentoEbay) {
+ tipoPagamentoEbay = l_tipoPagamentoEbay;
+ }
+
+ public double getTariffaAggiuntiva() {
+ return this.tariffaAggiuntiva;
+ }
+
+ public void setTariffaAggiuntiva(double tariffaAggiuntiva) {
+ this.tariffaAggiuntiva = tariffaAggiuntiva;
+ }
+
+ public long getOrdineWww() {
+ return this.ordineWww;
+ }
+
+ public void setOrdineWww(long ordineWww) {
+ this.ordineWww = ordineWww;
+ }
+
+ public static TipoPagamento getTipoPagamentoAmazon(ApplParmFull apFull) {
+ if (tipoPagamentoAmazon == null) {
+ tipoPagamentoAmazon = new TipoPagamento(apFull);
+ tipoPagamentoAmazon.findPagamentoByTipoPagamentoEcommerce(98L);
+ }
+ return tipoPagamentoAmazon;
+ }
+
+ public static void setTipoPagamentoStripe(TipoPagamento tipoPagamentoStripe) {
+ TipoPagamento.tipoPagamentoStripe = tipoPagamentoStripe;
+ }
+
+ public double getWwwValoreSoglia() {
+ return this.wwwValoreSoglia;
+ }
+
+ public void setWwwValoreSoglia(double wwwValoreSoglia) {
+ this.wwwValoreSoglia = wwwValoreSoglia;
+ }
+
+ public double getWwwPercOltreSoglia() {
+ return this.wwwPercOltreSoglia;
+ }
+
+ public void setWwwPercOltreSoglia(double wwwPercOltreSoglia) {
+ this.wwwPercOltreSoglia = wwwPercOltreSoglia;
+ }
+
+ public String getCodicePagamentoExport() {
+ return (this.codicePagamentoExport == null) ? "" : this.codicePagamentoExport.trim();
+ }
+
+ public void setCodicePagamentoExport(String codicePagamentoExport) {
+ this.codicePagamentoExport = codicePagamentoExport;
+ }
+
+ public long getFlgNoFermopoint() {
+ return this.flgNoFermopoint;
+ }
+
+ public void setFlgNoFermopoint(long flgNoFermopoint) {
+ this.flgNoFermopoint = flgNoFermopoint;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoPagamentoCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoPagamentoCR.java
new file mode 100644
index 00000000..d4e19a58
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/TipoPagamentoCR.java
@@ -0,0 +1,136 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class TipoPagamentoCR extends CRAdapter {
+ private long id_tipoPagamento;
+
+ private long periodicita;
+
+ private String descrizione_it;
+
+ private String descrizione_en;
+
+ private long flgTipoPagamento;
+
+ private long flgPrimaScadenza;
+
+ private long giornoFisso;
+
+ private long primaRata;
+
+ private long nRate;
+
+ private long flgWww = -1L;
+
+ private long flgNoFermopoint = -1L;
+
+ public static long ORDER_BY_ORDINEWWW = 1L;
+
+ public TipoPagamentoCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public TipoPagamentoCR() {}
+
+ public void setId_tipoPagamento(long newId_tipoPagamento) {
+ this.id_tipoPagamento = newId_tipoPagamento;
+ }
+
+ public void setPeriodicita(long newPeriodicita) {
+ this.periodicita = newPeriodicita;
+ }
+
+ public void setDescrizione_it(String newDescrizione_it) {
+ this.descrizione_it = newDescrizione_it;
+ }
+
+ public void setDescrizione_en(String newDescrizione_en) {
+ this.descrizione_en = newDescrizione_en;
+ }
+
+ public void setFlgTipoPagamento(long newFlgTipoPagamento) {
+ this.flgTipoPagamento = newFlgTipoPagamento;
+ }
+
+ public void setFlgPrimaScadenza(long newFlgPrimaScadenza) {
+ this.flgPrimaScadenza = newFlgPrimaScadenza;
+ }
+
+ public void setGiornoFisso(long newGiornoFisso) {
+ this.giornoFisso = newGiornoFisso;
+ }
+
+ public void setPrimaRata(long newPrimaRata) {
+ this.primaRata = newPrimaRata;
+ }
+
+ public void setNRate(long newNRate) {
+ this.nRate = newNRate;
+ }
+
+ public long getId_tipoPagamento() {
+ return this.id_tipoPagamento;
+ }
+
+ public long getPeriodicita() {
+ return this.periodicita;
+ }
+
+ public String getDescrizione_it() {
+ return (this.descrizione_it == null) ? "" : this.descrizione_it.trim();
+ }
+
+ public String getDescrizione_en() {
+ return (this.descrizione_en == null) ? "" : this.descrizione_en.trim();
+ }
+
+ public long getFlgTipoPagamento() {
+ return this.flgTipoPagamento;
+ }
+
+ public long getFlgPrimaScadenza() {
+ return this.flgPrimaScadenza;
+ }
+
+ public long getGiornoFisso() {
+ return this.giornoFisso;
+ }
+
+ public long getPrimaRata() {
+ return this.primaRata;
+ }
+
+ public long getNRate() {
+ return this.nRate;
+ }
+
+ public String getWww() {
+ return TipoPagamento.getWww(getFlgWww());
+ }
+
+ public static final String getTipoPagamento(long l_flgTipoPagamento) {
+ return TipoPagamento.getTipoPagamento(l_flgTipoPagamento);
+ }
+
+ public long getFlgWww() {
+ return this.flgWww;
+ }
+
+ public void setFlgWww(long flgWww) {
+ this.flgWww = flgWww;
+ }
+
+ public static final String getWww(long l_flgWww) {
+ return TipoPagamento.getWww(l_flgWww);
+ }
+
+ public long getFlgNoFermopoint() {
+ return this.flgNoFermopoint;
+ }
+
+ public void setFlgNoFermopoint(long flgNoFermopoint) {
+ this.flgNoFermopoint = flgNoFermopoint;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/UserClifor.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/UserClifor.java
new file mode 100644
index 00000000..a1330967
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/UserClifor.java
@@ -0,0 +1,120 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.Vectumerator;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class UserClifor extends _AnagAdapter {
+ private static final long serialVersionUID = -8722609970886488948L;
+
+ private long id_userClifor;
+
+ private long id_users;
+
+ private long id_clifor;
+
+ private Users users;
+
+ private Clifor clifor;
+
+ public UserClifor() {}
+
+ public UserClifor(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public long getId_userClifor() {
+ return this.id_userClifor;
+ }
+
+ public void setId_userClifor(long id_userClifor) {
+ this.id_userClifor = id_userClifor;
+ }
+
+ public long getId_users() {
+ return this.id_users;
+ }
+
+ public void setId_users(long id_users) {
+ this.id_users = id_users;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public void setId_clifor(long id_clifor) {
+ this.id_clifor = id_clifor;
+ }
+
+ public Vectumerator findByUser(long l_id_users) {
+ String s_Sql_Find = "select A.* from USER_CLIFOR AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc(" A.id_users = " + l_id_users);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public void findByUserClifor(long l_id_users, long l_id_clifor) {
+ String s_Sql_Find = "select A.* from USER_CLIFOR AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc(" A.id_users = " + l_id_users);
+ wc.addWc(" A.id_clifor = " + l_id_clifor);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public Users getUsers() {
+ this.users = (Users)getSecondaryObject((DBAdapter)this.users, Users.class, getId_users());
+ return this.users;
+ }
+
+ public void setUsers(Users users) {
+ this.users = users;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class, getId_clifor());
+ return this.clifor;
+ }
+
+ public void setClifor(Clifor clifor) {
+ this.clifor = clifor;
+ }
+
+ public ResParm save() {
+ UserClifor uc = new UserClifor(getApFull());
+ uc.findByUserClifor(getId_users(), getId_clifor());
+ if (uc.getDBState() == 0)
+ return super.save();
+ return new ResParm(true);
+ }
+
+ public Vectumerator findByCR(UserCliforCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from USER_CLIFOR AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/UserCliforCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/UserCliforCR.java
new file mode 100644
index 00000000..5ba67945
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/UserCliforCR.java
@@ -0,0 +1,65 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+
+public class UserCliforCR extends _AnagAdapter {
+ private long id_userClifor;
+
+ private long id_users;
+
+ private long id_clifor;
+
+ private Users users;
+
+ private Clifor clifor;
+
+ public UserCliforCR() {}
+
+ public UserCliforCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public long getId_userClifor() {
+ return this.id_userClifor;
+ }
+
+ public void setId_userClifor(long id_userClifor) {
+ this.id_userClifor = id_userClifor;
+ }
+
+ public long getId_users() {
+ return this.id_users;
+ }
+
+ public void setId_users(long id_users) {
+ this.id_users = id_users;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public void setId_clifor(long id_clifor) {
+ this.id_clifor = id_clifor;
+ }
+
+ public Users getUsers() {
+ this.users = (Users)getSecondaryObject((DBAdapter)this.users, Users.class, getId_users());
+ return this.users;
+ }
+
+ public void setUsers(Users users) {
+ this.users = users;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class,
+ getId_clifor());
+ return this.clifor;
+ }
+
+ public void setClifor(Clifor clifor) {
+ this.clifor = clifor;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Users.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Users.java
new file mode 100644
index 00000000..3d66f123
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Users.java
@@ -0,0 +1,2552 @@
+package it.acxent.anag;
+
+import com.lowagie.text.Chunk;
+import com.lowagie.text.Document;
+import com.lowagie.text.Element;
+import com.lowagie.text.Font;
+import com.lowagie.text.Image;
+import com.lowagie.text.PageSize;
+import com.lowagie.text.Phrase;
+import com.lowagie.text.Table;
+import com.lowagie.text.pdf.Barcode128;
+import com.lowagie.text.pdf.PdfContentByte;
+import com.lowagie.text.pdf.PdfPCell;
+import com.lowagie.text.pdf.PdfPTable;
+import com.lowagie.text.pdf.PdfWriter;
+import it.acxent.api.amz.AmzSellerApi;
+import it.acxent.api.ebay.EbayAbliaApi;
+import it.acxent.art.Wishlist;
+import it.acxent.bank.consel.ConselReq;
+import it.acxent.bank.infogroup.ShopnetReq;
+import it.acxent.bank.paypal.PayPalReq;
+import it.acxent.bank.poste2019.PosteReq;
+import it.acxent.bank.sella.SellaReq;
+import it.acxent.bank.sellaPCredit.SellaPCreditReq;
+import it.acxent.bank.setefi.SetefiReq;
+import it.acxent.bank.stripe.StripeResp;
+import it.acxent.bank.xpay.XpayReq;
+import it.acxent.brt.api.BrtApi;
+import it.acxent.cart.Cart;
+import it.acxent.cc.GoogleReview;
+import it.acxent.common.Parm;
+import it.acxent.common.PostazioneI;
+import it.acxent.common.StatusMsg;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.fattele._FeXmlAdapter;
+import it.acxent.mail.MailMessage;
+import it.acxent.mail.MailProperties;
+import it.acxent.news.News;
+import it.acxent.newsletter.CodaMessaggi;
+import it.acxent.rd.RemoteDevice;
+import it.acxent.util.FileWr;
+import it.acxent.util.Vectumerator;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+import java.util.Calendar;
+import java.util.Date;
+
+public class Users extends it.acxent.common.Users implements Serializable {
+ private static final long serialVersionUID = -7378135042656835721L;
+
+ private RegCassa regCassa;
+
+ private long id_postazione;
+
+ protected Postazione postazione;
+
+ private Clifor clifor;
+
+ private long id_clifor;
+
+ private String id_nazione;
+
+ private Nazione nazione;
+
+ private String callingJsp;
+
+ private long flgOperatore;
+
+ private long flgNews;
+
+ protected Document document;
+
+ protected Table pdfcorpo;
+
+ protected PdfPTable pdfPcorpo;
+
+ protected PdfWriter writer;
+
+ private long id_documento;
+
+ private double tariffaProfessionista;
+
+ private double percProfessionista;
+
+ public static final Font PDF_fMedioB = new Font(2, 10.0F, 1);
+
+ public Users() {}
+
+ public Users(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public boolean isDeleteLogic() {
+ return false;
+ }
+
+ protected boolean isUseSafeUpdate() {
+ return true;
+ }
+
+ public Vectumerator findByClifor(long l_id_clifor, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from USERS AS A";
+ String s_Sql_Order = " order by A.cognome, A.nome";
+ WcString wc = new WcString();
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public void findFirstByClifor(long l_id_clifor) {
+ String s_Sql_Find = "select A.* from USERS AS A";
+ String s_Sql_Order = " order by A.cognome, A.nome";
+ WcString wc = new WcString();
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ findFirstRecord(stmt);
+ } catch (SQLException e) {
+ handleDebug(e);
+ }
+ }
+
+ public void initApplicationParms(ApplParmFull ap) {
+ boolean debug = false;
+ if (ap != null) {
+ String l_tipoParm = "";
+ Parm bean = new Parm(ap);
+ DBAdapter.logDebug(debug, "anag.Users initParms: start");
+ l_tipoParm = "PARM_SMS";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("SMS_URL");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SMS_URL");
+ bean.setDescrizione("SMS_URL");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("http://gateway.skebby.it/api/send/smseasy/advanced/http.php");
+ bean.setNota("URL DEL SERVIZIO DI SMS TRAMITE SKEBBY");
+ bean.save();
+ bean.findByCodice("SMS_USER");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SMS_USER");
+ bean.setDescrizione("SMS_USER");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("ENKOUNTER");
+ bean.setNota("NOME UTENTE PER INVIO SMS TRAMITE SKEBBY");
+ bean.save();
+ bean.findByCodice("SMS_PASS");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SMS_PASS");
+ bean.setDescrizione("SMS_PASS");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("TOPlan100099");
+ bean.setNota("PASSWORD PER INVIO SMS TRAMITE SKEBBY");
+ bean.save();
+ l_tipoParm = "PARM_FATTURA";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("PERC_CONT_INTEGRATIVO");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PERC_CONT_INTEGRATIVO");
+ bean.setDescrizione("PERC_CONT_INTEGRATIVO");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() <= 0.0D)
+ bean.setNumero(2.0D);
+ bean.setNota("PERCENTUALE CONTRIBUTO INTEGRATIVO");
+ bean.save();
+ bean.findByCodice("PERC_RITENUTA_ACCONTO");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PERC_RITENUTA_ACCONTO");
+ bean.setDescrizione("PERC_RITENUTA_ACCONTO");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() <= 0.0D)
+ bean.setNumero(20.0D);
+ bean.setNota("PERCENTUALE RITENUTA ACCONTO");
+ bean.save();
+ bean.findByCodice("TIPO_FATTURE_VENDITA");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("TIPO_FATTURE_VENDITA");
+ bean.setDescrizione("TIPO_FATTURE_VENDITA");
+ bean.setFlgTipo(0L);
+ bean.setNota("CODICi TIPO DOCUMENTO FATTURA VENDITA SEPARATI DA , ");
+ bean.save();
+ bean.findByCodice("TIPO_FATTURE_ACQUISTO");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("TIPO_FATTURE_ACQUISTO");
+ bean.setDescrizione("TIPO_FATTURE_ACQUISTO");
+ bean.setFlgTipo(0L);
+ bean.setNota("CODICI TIPO DOCUMENTO FATTURA ACQUISTO SEPARATI DA , ");
+ bean.save();
+ l_tipoParm = "APPS";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("ESERCIZIO");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ESERCIZIO");
+ bean.setDescrizione("ESERCIZIO");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() <= 0.0D) {
+ Calendar cal = Calendar.getInstance();
+ bean.setNumero((double)cal.get(1));
+ }
+ bean.setNota("ESERCIZIO CORRENTE");
+ bean.save();
+ bean.findByCodice("OTTIMIZZO");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("OTTIMIZZO");
+ bean.setDescrizione("OTTIMIZZO");
+ bean.setFlgTipo(5L);
+ bean.setNota("1: ATTIVA OTTIMIZAZIONE FINDBYCR");
+ bean.save();
+ l_tipoParm = "VERSIONE";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("FATTURA_ELETTRONICA_ON");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("FATTURA_ELETTRONICA_ON");
+ bean.setDescrizione("FATTURA_ELETTRONICA_ON");
+ bean.setFlgTipo(5L);
+ bean.setNota("Se true, viene abilitata la generazione delle fatture elettroniche");
+ bean.save();
+ bean.findByCodice("RIGA_DOC_CODICE_ARTICOLO_ESPLICITO");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("RIGA_DOC_CODICE_ARTICOLO_ESPLICITO");
+ bean.setDescrizione("RIGA_DOC_CODICE_ARTICOLO_ESPLICITO");
+ bean.setFlgTipo(5L);
+ bean.setNota("Se true, sulla riga documento il codice articolo puo' essere inserito nel caso di righe non nel db");
+ bean.save();
+ bean.findByCodice("AGENTI_ON");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("AGENTI_ON");
+ bean.setDescrizione("AGENTI_ON");
+ bean.setFlgTipo(5L);
+ bean.setNota("Se true, viene resa visibile l'inserimento agenti nelle anagrafica");
+ bean.save();
+ bean.findByCodice("ATR_ON");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ATR_ON");
+ bean.setDescrizione("ATR_ON");
+ bean.setFlgTipo(5L);
+ bean.setNota("Se true, viene reso visibile l'inserimento dati time report su cliente");
+ bean.save();
+ bean.findByCodice("PREZZO_CON_IVA");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PREZZO_CON_IVA");
+ bean.setDescrizione("PREZZO_CON_IVA");
+ bean.setFlgTipo(5L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("1");
+ bean.setNota("Gestione prezzo articolo con o senza iva");
+ bean.save();
+ bean.findByCodice("SERIALI_UNIVOCI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SERIALI_UNIVOCI");
+ bean.setDescrizione("SERIALI_UNIVOCI");
+ bean.setFlgTipo(5L);
+ bean.setNota("SERIALI UNIVOCI. IMPEDISCE L'INSERIMENTO DI DUE SERIALI UGUALI ANCHE PER ARTICOLI DIVERSI");
+ bean.save();
+ bean.findByCodice("VARIANTI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("VARIANTI");
+ bean.setDescrizione("VARIANTI");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("1");
+ bean.setNumero((double)Integer.valueOf(bean.getTesto()));
+ bean.setNota("Gestione varianti articolo: 0=NO, 1=SI");
+ bean.save();
+ bean.findByCodice("TAGLIE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("TAGLIE");
+ bean.setDescrizione("TAGLIE");
+ bean.setFlgTipo(5L);
+ bean.setNota("Gestione taglie articolI");
+ bean.save();
+ bean.findByCodice("TESSUTI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("TESSUTI");
+ bean.setDescrizione("TESSUTI");
+ bean.setFlgTipo(5L);
+ bean.setNota("Gestione articoli tessuti");
+ bean.save();
+ bean.findByCodice("PROGETTISTA_ARTICOLO");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PROGETTISTA_ARTICOLO");
+ bean.setDescrizione("PROGETTISTA_ARTICOLO");
+ bean.setFlgTipo(5L);
+ bean.setNota("Gestione progettisti articoli con perc. di provvigione");
+ bean.save();
+ bean.findByCodice("IMMOBILI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("IMMOBILI");
+ bean.setDescrizione("IMMOBILI");
+ bean.setFlgTipo(5L);
+ bean.setNota("Gestione immobili (es. Gaias)");
+ bean.save();
+ bean.findByCodice("ASTE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ASTE");
+ bean.setDescrizione("ASTE");
+ bean.setFlgTipo(5L);
+ bean.setNota("Gestione aste (es. Gaias)");
+ bean.save();
+ bean.findByCodice("TAGLIE_LINGUE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("TAGLIE_LINGUE");
+ bean.setDescrizione("TAGLIE_LINGUE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("");
+ bean.setNota("Gestione Lingue per le Taglie");
+ bean.save();
+ bean.findByCodice("ANAG_DESC_COMPLETA_CON_TIPO");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ANAG_DESC_COMPLETA_CON_TIPO");
+ bean.setDescrizione("ANAG_DESC_COMPLETA_CON_TIPO");
+ bean.setFlgTipo(5L);
+ bean.setNota("Nella descrizione clifor mette o non mette il tipo C o F in descrizione completa");
+ bean.save();
+ bean.findByCodice("ARTICOLO_CLIENTE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ARTICOLO_CLIENTE");
+ bean.setDescrizione("ARTICOLO_CLIENTE");
+ bean.setFlgTipo(5L);
+ bean.setNota("Ablilita legamne Articolo/Cliente B2B");
+ bean.save();
+ l_tipoParm = "ARTICOLO";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("ART_SIMBOLI_LAVAGGIO_DEFAULT");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ART_SIMBOLI_LAVAGGIO_DEFAULT");
+ bean.setDescrizione("ART_SIMBOLI_LAVAGGIO_DEFAULT");
+ bean.setFlgTipo(0L);
+ bean.setNota("SIMBOLI LAVAGGIO DEFAULT LAVAGGIO,CANDEGGIO,ASCIUGATURA,STIRO,PULITURA A SECCO ");
+ bean.save();
+ bean.findByCodice("SEO_VERSION");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SEO_VERSION");
+ bean.setDescrizione("SEO_VERSION");
+ bean.setFlgTipo(1L);
+ bean.setNota("0, versione CC standard, 1, versione Tuttofoto");
+ bean.save();
+ l_tipoParm = "PATH";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("PATH_IMG_TAB_TAG");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PATH_IMG_TAB_TAG");
+ bean.setDescrizione("PATH_IMG_TAB_TAG");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("_img/_imgTabellaTaglie/");
+ bean.setNota("Path immagini taglie relativo a docbase che finisce con /");
+ bean.save();
+ bean.findByCodice("PATH_IMG_BANNER");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PATH_IMG_BANNER");
+ bean.setDescrizione("PATH_IMG_BANNER");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("_img/_imgBanner/");
+ bean.setNota("Path relativo a docbase che finisce con /");
+ bean.save();
+ bean.findByCodice("PATH_IMG_ART");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PATH_IMG_ART");
+ bean.setDescrizione("PATH_IMG_ART");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("_img/_imgArt/");
+ bean.setNota("Path x immagini articoli relativo a docbase che finisce con /");
+ bean.save();
+ bean.findByCodice("PATH_IMG_TIPO");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PATH_IMG_TIPO");
+ bean.setDescrizione("PATH_IMG_TIPO");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("_img/_imgTipo/");
+ bean.setNota("Path x immagini tipo articolo relativo a docbase che finisce con /");
+ bean.save();
+ bean.findByCodice("ART_ATTACH_PATH");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ART_ATTACH_PATH");
+ bean.setDescrizione("ART_ATTACH_PATH");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("_attach/_art/");
+ bean.setNota("Path x attach articoli relativo a docbase che finisce con /");
+ bean.save();
+ bean.findByCodice("CLIFOR_ATTACH_PATH");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CLIFOR_ATTACH_PATH");
+ bean.setDescrizione("CLIFOR_ATTACH_PATH");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("_attach/_clifor/");
+ bean.setNota("Path x attach clienti fornitori relativo a docbase che finisce con /");
+ bean.save();
+ bean.findByCodice("DOC_ATTACH_PATH");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("DOC_ATTACH_PATH");
+ bean.setDescrizione("DOC_ATTACH_PATH");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("_attach/_doc/");
+ bean.setNota("Path x documenti relativo a docbase che finisce con /");
+ bean.save();
+ l_tipoParm = "IMPORT";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("ART_IMPORT_FILE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ART_IMPORT_FILE");
+ bean.setDescrizione("ART_IMPORT_FILE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("fileImport.csv");
+ bean.setNota("File di import in genere csv. Verrà messo su PATH_TMP");
+ bean.save();
+ l_tipoParm = "MAIL_MSG";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("MSG_ORDINE_SPEDITO");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MSG_ORDINE_SPEDITO");
+ bean.setDescrizione("MSG_ORDINE_SPEDITO");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("Ordine spedito");
+ bean.setNota("Messaggio che vogliamo aggiungere alla mail invio ordine nel caso di ordine spedito.");
+ bean.save();
+ bean.findByCodice(Cart.P_CHECKOUTMSG);
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice(Cart.P_CHECKOUTMSG);
+ bean.setDescrizione(Cart.P_CHECKOUTMSG);
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("mailMessage/checkOut.html");
+ bean.setNota("Path relativo a docbase");
+ bean.save();
+ bean.findByCodice(Parm.P_USERMSG);
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice(Parm.P_USERMSG);
+ bean.setDescrizione(Parm.P_USERMSG);
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("mailMessage/userMsg.html");
+ bean.setNota("Path relativo a docbase");
+ bean.save();
+ bean.findByCodice(Parm.P_LOSTPWDMSG);
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice(Parm.P_LOSTPWDMSG);
+ bean.setDescrizione(Parm.P_LOSTPWDMSG);
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("mailMessage/lostPwd.html");
+ bean.setNota("Path relativo a docbase");
+ bean.save();
+ bean.findByCodice(Parm.P_MLISTMSG);
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice(Parm.P_MLISTMSG);
+ bean.setDescrizione(Parm.P_MLISTMSG);
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("mailMessage/ml.txt");
+ bean.setNota("Path relativo. Registrazione Mailing List");
+ bean.save();
+ bean.findByCodice(Parm.P_USERMSG);
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice(Parm.P_USERMSG);
+ bean.setDescrizione(Parm.P_USERMSG);
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("mailMessage/userMsg.html");
+ bean.setNota("Path relativo. Registrazione Utente");
+ bean.save();
+ bean.findByCodice(Parm.P_RESOMSG);
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice(Parm.P_RESOMSG);
+ bean.setDescrizione(Parm.P_RESOMSG);
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("mailMessage/reso.html");
+ bean.setNota("Path relativo. Reso merce");
+ bean.save();
+ bean.findByCodice("MAIL_ADMIN_SCAD_CI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MAIL_ADMIN_SCAD_CI");
+ bean.setDescrizione("MAIL_ADMIN_SCAD_CI");
+ bean.setFlgTipo(0L);
+ bean.setNota("MAIL INVIATA DAL SISTEMA CON LA LISTA DEI CLIENTI CHE HANNO DOCUMENTI SCADUTI O IN SCADENZA.");
+ bean.save();
+ l_tipoParm = "CASSA SCONTRINI";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("DESC_SCONTRINO_FULL");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("DESC_SCONTRINO_FULL");
+ bean.setDescrizione("DESC_SCONTRINO_FULL");
+ bean.setFlgTipo(5L);
+ if (bean.getNumero() > 1.0D)
+ bean.setNumero(1.0D);
+ bean.setNota("STAMPA SU SCONTRINO DELLA DESCRIZIONE ARTICOLO COMPLETA");
+ bean.save();
+ bean.findByCodice("CASSA_STAMPA_DISPLAY");
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CASSA_STAMPA_DISPLAY");
+ bean.setDescrizione("CASSA_STAMPA_DISPLAY");
+ bean.setFlgTipo(0L);
+ bean.setNota("STRINGA DA STAMPARE SUL DISPLAY DELLA CASSA QUANDO NON E' IN USO. PRIMA RIGA MAX CAR. 20.");
+ bean.save();
+ bean.findByCodice("CASSA_STAMPA_DISPLAY_TIMEOUT");
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CASSA_STAMPA_DISPLAY_TIMEOUT");
+ bean.setDescrizione("CASSA_STAMPA_DISPLAY_TIMEOUT");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() == 0.0D)
+ bean.setNumero(5.0D);
+ bean.setNota("TIMEOUT IN SECONDI PER IL DISPLAY DELLA CASSA DOPO LE STAMPE SCONTRINI FISCALI E NON");
+ bean.save();
+ bean.findByCodice("CASSA_STAMPA_DISPLAY1");
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CASSA_STAMPA_DISPLAY1");
+ bean.setDescrizione("CASSA_STAMPA_DISPLAY1");
+ bean.setFlgTipo(0L);
+ bean.setNota("STRINGA DA STAMPARE SUL DISPLAY DELLA CASSA QUANDO NON E' IN USO. SECONDA RIGA MAX CAR. 20.");
+ bean.save();
+ bean.findByCodice("CASSA_STAMPA_PROMO");
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CASSA_STAMPA_PROMO");
+ bean.setDescrizione("CASSA_STAMPA_PROMO");
+ bean.setFlgTipo(0L);
+ bean.setNota("STRINGA DA STAMPARE IN FONDO ALLO SCONTRINO CON UN TESTO LIBERO.");
+ bean.save();
+ bean.findByCodice("DESC_SCONTRINO_FULL");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("DESC_SCONTRINO_FULL");
+ bean.setDescrizione("DESC_SCONTRINO_FULL");
+ bean.setFlgTipo(5L);
+ if (bean.getNumero() > 1.0D)
+ bean.setNumero(1.0D);
+ bean.setNota("STAMPA SU SCONTRINO DELLA DESCRIZIONE ARTICOLO COMPLETA");
+ bean.save();
+ l_tipoParm = "IVA";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("CODICE_IVA_STD_VEND");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CODICE_IVA_STD_VEND");
+ bean.setDescrizione("CODICE_IVA_STD_VEND");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() <= 0.0D)
+ bean.setNumero(1.0D);
+ bean.setNota("CODICE IVA STANDARD VENDITE ITALIA");
+ bean.save();
+ bean.findByCodice("CODICE_IVA_STD_ACQ");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CODICE_IVA_STD_ACQ");
+ bean.setDescrizione("CODICE_IVA_STD_ACQ");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() <= 0.0D)
+ bean.setNumero(1.0D);
+ bean.setNota("CODICE IVA STANDARD ACQUISTI");
+ bean.save();
+ bean.findByCodice("CODICE_IVA_ESENTE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CODICE_IVA_ESENTE");
+ bean.setDescrizione("CODICE_IVA_ESENTE");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() <= 0.0D)
+ bean.setNumero(1.0D);
+ bean.setNota("CODICE IVA ESENTE PER SPESE E BOLLI");
+ bean.save();
+ bean.findByCodice("CODICE_IVA_REGIME_MARGINE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CODICE_IVA_REGIME_MARGINE");
+ bean.setDescrizione("CODICE_IVA_REGIME_MARGINE");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() <= 0.0D)
+ bean.setNumero(11.0D);
+ bean.setNota("CODICE IVA ESENTE PER REGIME DEL MARGINE");
+ bean.save();
+ bean.findByCodice("CODICE_IVA_REVERSE_CHARGE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CODICE_IVA_REVERSE_CHARGE");
+ bean.setDescrizione("CODICE_IVA_REVERSE_CHARGE");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() <= 0.0D)
+ bean.setNumero(99.0D);
+ bean.setNota("CODICE IVA ESENTE REVERSE CHARGE");
+ bean.save();
+ bean.findByCodice("CODICE_IVA_ART8");
+ if ((long)bean.getDBState() == 1L) {
+ bean.setCodice("CODICE_IVA_ART8_A");
+ bean.setDescrizione("CODICE_IVA_ART8_A");
+ bean.save();
+ }
+ bean.findByCodice("CODICE_IVA_ART8_A");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CODICE_IVA_ART8_A");
+ bean.setDescrizione("CODICE_IVA_ART8_A");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() <= 0.0D)
+ bean.setNumero(1.0D);
+ bean.setNota("CODICE IVA ESENTE ART. 8 LETTERA A PER ARTICOLI IN VENDITA EXTRA CEE SIA AZIENDA CHE PRIVATO");
+ bean.save();
+ bean.findByCodice("CODICE_IVA_EXTRA_CEE_ESP_ABITUALE_ART8_C");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CODICE_IVA_EXTRA_CEE_ESP_ABITUALE_ART8_C");
+ bean.setDescrizione("CODICE_IVA_EXTRA_CEE_ESP_ABITUALE_ART8_C");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() <= 0.0D)
+ bean.setNumero(1.0D);
+ bean.setNota("CODICE IVA ESENTE ART. 8 LETTERA C PER VENDITE EXTRA CEE SIA AZIENDA CHE PRIVATO PER ESPORTATORI ABITUALI");
+ bean.save();
+ bean.findByCodice("CODICE_IVA_CEE_AZIENDA_ART41");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CODICE_IVA_CEE_AZIENDA_ART41");
+ bean.setDescrizione("CODICE_IVA_CEE_AZIENDA_ART41");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() <= 0.0D)
+ bean.setNumero(1.0D);
+ bean.setNota("CODICE IVA ESENTE ART. 41 PER VENDITE CEE AZIENDA (CASO CORRETTO CON IVA_ESTERO_AZIENDA_ESENTE=TRUE)");
+ bean.save();
+ bean.findByCodice("CODICE_IVA_ITA_CEE_AZIENDA_ART58");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CODICE_IVA_ITA_CEE_AZIENDA_ART58");
+ bean.setDescrizione("CODICE_IVA_ITA_CEE_AZIENDA_ART58");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() <= 0.0D)
+ bean.setNumero(1.0D);
+ bean.setNota("CODICE IVA non imponibile ex art. 58 comma 1, DL 331/1993. PER VENDITE DA ITA A CEE AZIENDA");
+ bean.save();
+ bean.findByCodice("CODICE_IVA_ART9");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CODICE_IVA_ART9");
+ bean.setDescrizione("CODICE_IVA_ART9");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() <= 0.0D)
+ bean.setNumero(1.0D);
+ bean.setNota("CODICE IVA ESENTE ART. 9 PER SPESE TRASPORTO EXTRA UE (RAVINALE?)");
+ bean.save();
+ bean.findByCodice("IVA_ESTERO_AZIENDA_ESENTE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("IVA_ESTERO_AZIENDA_ESENTE");
+ bean.setDescrizione("IVA_ESTERO_AZIENDA_ESENTE");
+ bean.setFlgTipo(5L);
+ bean.setNota("TRUE O FALSE: SE FALSE, VIENE COMUNQUE APPLICATA L'IVA ITALIANA PER EXTRACEE ANCHE ALLE AZIENDE, ANCHE SE NON SAREBBE CORRETTO!!! ALTRIMENTI PER LE AZIENDE VIENE ESPOSTO IL PREZZO SENZA IVA (ART 41 CEE ART 8/A EXTRA CEE - GESTIONE CORRETTA)");
+ bean.save();
+ bean.findByCodice("IVA_CEE_ONE_STOP_SHOP");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("IVA_CEE_ONE_STOP_SHOP");
+ bean.setDescrizione("IVA_CEE_ONE_STOP_SHOP");
+ bean.setFlgTipo(5L);
+ bean.setNota("TRUE O FALSE: MI INDICA COME COMPORTARSI NEL CASO DI VENDITE CEE A UTENTI FINALI. IN CASO ONE STOP SHOP= TRUE VANNO DEFINITE I CODICI IVA PER OGNI NAZIONE E ASSOCIATE ALLA NAZIONE, SIA IVA ORDINARIA CHE EVENTUALMENTE IVA REGIME DEL MARGINE ALTRIMENTI VIENE SEMPRE APPLICATA L'IVA ITALIANA (SOLO PER GLI UTENTI FINALI CASO 10.000 EUR MASSIMO DI VENDITE IN EUROPA L'ANNO A UTENTI FINALI)");
+ bean.save();
+ l_tipoParm = "DOCUMENTI";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("DOC_ARTICOLI_CON_CODICE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("DOC_ARTICOLI_CON_CODICE");
+ bean.setDescrizione("DOC_ARTICOLI_CON_CODICE");
+ bean.setFlgTipo(5L);
+ bean.setNota("SE IMPOSTATO LA DESCRIZIONE ARTICOLO COMPRENDE ANCHE IL CODICE (RAVINALE) PRIMA DEL NOME");
+ bean.save();
+ bean.findByCodice("DOC_ARTICOLI_CON_TIPO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("DOC_ARTICOLI_CON_TIPO");
+ bean.setDescrizione("DOC_ARTICOLI_CON_TIPO");
+ bean.setFlgTipo(5L);
+ bean.setNota("SE IMPOSTATO LA DESCRIZIONE ARTICOLO COMPRENDE ANCHE IL TIPO (RAVINALE) DOPO IL NOME");
+ bean.save();
+ bean.findByCodice("ORDINI_WWW_USA_PROG_WWW");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ORDINI_WWW_USA_PROG_WWW");
+ bean.setDescrizione("ORDINI_WWW_USA_PROG_WWW");
+ bean.setFlgTipo(5L);
+ bean.setNota("SE IMPOSTATO USO PROGRESSIVO WWW GENERALE. UTILIZZATO ANCHE SU STAMPA DEL RIFERIMENTO INTERNO (TF)");
+ bean.save();
+ bean.findByCodice("DATA_FATTURA_PRIMA_DISPONIBILE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("DATA_FATTURA_PRIMA_DISPONIBILE");
+ bean.setDescrizione("DATA_FATTURA_PRIMA_DISPONIBILE");
+ bean.setFlgTipo(1L);
+ bean.setNota("SE IMPOSTATO AD 1, AL SALVATAGGIO DELLE FATTURE EMESSE VIENE IMPOSTATA LA PRIMA DATA DISPONIBILE, ALTRIMENTI VIENE IMPOSTATA LA DATA DI OGGI.");
+ bean.save();
+ bean.findByCodice("BLOCCO_FATTURE_EMSTA");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("BLOCCO_FATTURE_EMSTA");
+ bean.setDescrizione("BLOCCO_FATTURE_EMSTA");
+ bean.setFlgTipo(1L);
+ bean.setNota("IMPOSTA SE LE FATTURE EMESSE (1) O STAMPATE (2) DEVONO ESSERE BLOCCATE (NO SALVATAGGIO ED ELIMINAZIONE) OPPURE NO (0)");
+ bean.save();
+ bean.findByCodice("DOC_FIRMA_INVIO_FATTURA");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("DOC_FIRMA_INVIO_FATTURA");
+ bean.setDescrizione("DOC_FIRMA_INVIO_FATTURA");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("In allegato Vi inviamo il ns. documento del quale e' fatto obbligo da parte del destinatario la stampa e la conservazione del cartaceo nel rispetto dei termini di legge (Ris. Min. 30/07/1990, n. 450217, Circ. Min. 23/02/1994 n. 13/e, Ris. Min. 28/05/1997, n. 132/e).");
+ bean.setNota("TESTO DA INVIARE PER EMAIL UNITAMENTE ALL'INVIO DI UNA FATTURA");
+ bean.save();
+ bean.findByCodice("DOC_BANCA_APPOGGIO_DESC");
+ bean.delete();
+ bean.findByCodice("DOC_BANCA_APPOGGIO_IBAN");
+ bean.delete();
+ bean.findByCodice("DOC_BCC");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("DOC_BCC");
+ bean.setDescrizione("DOC_BCC");
+ bean.setFlgTipo(0L);
+ bean.setNota("BCC PER L'INVIO DEI DOCUMENTI. IN GENERE amministrazione@xxx.xxx");
+ bean.save();
+ bean.findByCodice("RIP_NOTA_SCHEDA_RIPARAZIONE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("RIP_NOTA_SCHEDA_RIPARAZIONE");
+ bean.setDescrizione("RIP_NOTA_SCHEDA_RIPARAZIONE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("Note clientela scheda riparazione");
+ bean.setNota("RIP_NOTA_SCHEDA_RIPARAZIONE");
+ bean.save();
+ bean.findByCodice("RIP_NOTA_ACCETTAZIONE_PREVENTIVO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("RIP_NOTA_ACCETTAZIONE_PREVENTIVO");
+ bean.setDescrizione("RIP_NOTA_ACCETTAZIONE_PREVENTIVO");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("Note clientela per accettazione o non accettazione preventivo");
+ bean.setNota("RIP_NOTA_ACCETTAZIONE_PREVENTIVO");
+ bean.save();
+ bean.findByCodice("ID_DOC_ORDINE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ID_DOC_ORDINE");
+ bean.setDescrizione("ID_DOC_ORDINE");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() == 0.0D)
+ bean.setNumero(8.0D);
+ bean.setNota("Id tipo documento Ordine per la generazione automatica ordini");
+ bean.save();
+ bean.findByCodice("ID_DOC_ORDINE_TAGLIO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ID_DOC_ORDINE_TAGLIO");
+ bean.setDescrizione("ID_DOC_ORDINE_TAGLIO");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() == 0.0D)
+ bean.setNumero(26.0D);
+ bean.setNota("Id tipo documento Ordine Taglio per nuovo ordine direttamente da articolo");
+ bean.save();
+ bean.findByCodice("ID_DOC_ORDINE_WWW");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ID_DOC_ORDINE_WWW");
+ bean.setDescrizione("ID_DOC_ORDINE_WWW");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() == 0.0D)
+ bean.setNumero(-1.0D);
+ bean.setNota("Id tipo documento Ordine commercio elettronico");
+ bean.save();
+ bean.findByCodice("ID_DOC_PRENOTAZIONE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ID_DOC_PRENOTAZIONE");
+ bean.setDescrizione("ID_DOC_PRENOTAZIONE");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() == 0.0D)
+ bean.setNumero(0.0D);
+ bean.save();
+ bean.findByCodice("ID_DOC_RICEVUTA");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ID_DOC_RICEVUTA");
+ bean.setDescrizione("ID_DOC_RICEVUTA");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() == 0.0D)
+ bean.setNumero(9.0D);
+ bean.setNota("Id tipo documento Ricevuta per la gestione delle ricevute");
+ bean.save();
+ bean.findByCodice("ID_DOC_CASSA");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ID_DOC_CASSA");
+ bean.setDescrizione("ID_DOC_CASSA");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() == 0.0D)
+ bean.setNumero(1.0D);
+ bean.setNota("Id tipo documento cassa");
+ bean.save();
+ bean.findByCodice("ID_DOC_RIPARAZIONE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ID_DOC_RIPARAZIONE");
+ bean.setDescrizione("ID_DOC_RIPARAZIONE");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() == 0.0D)
+ bean.setNumero(16.0D);
+ bean.setNota("Id tipo documento riparazione");
+ bean.save();
+ bean.findByCodice("HEAD_SLIP");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("HEAD_SLIP");
+ bean.setDescrizione("HEAD_SLIP");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("");
+ bean.setNota("Intestazione stampe slip");
+ bean.save();
+ bean.findByCodice("MAIL_INVIO_DOC");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MAIL_INVIO_DOC");
+ bean.setDescrizione("MAIL_INVIO_DOC");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("mail@dominio.com");
+ bean.setNota("INDIRIZZO EMAIL DIDEFAULT PER INVIO DOCUMENTI");
+ bean.save();
+ bean.findByCodice("HEAD_DOC1");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("HEAD_DOC1");
+ bean.setDescrizione("HEAD_DOC1");
+ bean.setFlgTipo(0L);
+ bean.setNota("HEADER DOCUMENTI 1");
+ bean.save();
+ bean.findByCodice("HEAD_DOC2");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("HEAD_DOC2");
+ bean.setDescrizione("HEAD_DOC2");
+ bean.setFlgTipo(0L);
+ bean.setNota("HEADER DOCUMENTI 2");
+ bean.save();
+ bean.findByCodice("FOOT_DOC1");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("FOOT_DOC1");
+ bean.setDescrizione("FOOT_DOC1");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("Footer documenti 1");
+ bean.setNota("FOOTER DOCUMENTI 1");
+ bean.save();
+ bean.findByCodice("FOOT_DOC2");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("FOOT_DOC2");
+ bean.setDescrizione("FOOT_DOC2");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("Footer documenti 2");
+ bean.setNota("FOOTER DOCUMENTI 2");
+ bean.save();
+ bean.findByCodice("DOC_LEADROW");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("DOC_LEADROW");
+ bean.setDescrizione("DOC_LEADROW");
+ bean.setFlgTipo(1L);
+ bean.setNota("NUMERO RIGHE DI TESTA NEI DOCUMENTI. DEFAULT 12 SE NON IMPOSTATO");
+ bean.save();
+ bean.findByCodice("DOC_FONT_ROW_SIZE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("DOC_FONT_ROW_SIZE");
+ bean.setDescrizione("DOC_FONT_ROW_SIZE");
+ bean.setFlgTipo(1L);
+ if (bean.getNumeroInt() == 0)
+ bean.setNumero(12.0D);
+ bean.setNota("PUNTI DIMENSIONE CARATTERI RIGHE DI DEFAULT SE NON IMPOSTATO SU TIPO DOCUMENTO");
+ bean.save();
+ bean.findByCodice("DOC_FONT_ROW_SIZE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("DOC_FONT_ROW_SIZE");
+ bean.setDescrizione("DOC_FONT_ROW_SIZE");
+ bean.setFlgTipo(1L);
+ if (bean.getNumeroInt() == 0)
+ bean.setNumero(12.0D);
+ bean.setNota("PUNTI DIMENSIONE CARATTERI RIGHE");
+ bean.save();
+ bean.findByCodice("DOC_POSIZIONE_NOTA");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("DOC_POSIZIONE_NOTA");
+ bean.setDescrizione("DOC_POSIZIONE_NOTA");
+ bean.setFlgTipo(1L);
+ if (bean.getNumeroInt() == 0)
+ bean.setNumero(1.0D);
+ bean.setNota("POSIZIONE NOTA: 0--> PRIMA DELLE RIGHE, 1--> DOPO LE RIGHE");
+ bean.save();
+ bean.findByCodice("MSG_AVVISO_PREN_EMAIL");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MSG_AVVISO_PREN_EMAIL");
+ bean.setDescrizione("MSG_AVVISO_PREN_EMAIL");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("Gentile <%=cliente%>\n la prenotazione <%=ndocumento%> è disponibile presso il ns. negozio\n____firma___");
+ bean.setNota("MESSAGGIO VIA EMAIL PER AVVISO PRENOTAZIONI");
+ bean.save();
+ bean.findByCodice("MSG_AVVISO_PREN_SMS");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MSG_AVVISO_PREN_SMS");
+ bean.setDescrizione("MSG_AVVISO_PREN_SMS");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("Gentile <%=cliente%>\n la prenotazione <%=ndocumento%> e' disponibile presso il ns. negozio\n____firma___");
+ bean.setNota("MESSAGGIO VIA SMS PER AVVISO PRENOTAZIONI");
+ bean.save();
+ bean.findByCodice("MSG_AVVISO_RIP_EMAIL");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MSG_AVVISO_RIP_EMAIL");
+ bean.setDescrizione("MSG_AVVISO_RIP_EMAIL");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("Gentile <%=cliente%>\n l'oggetto relativo alla scheda riparazione n. <%=ndocumento%> è disponibile presso il ns. negozio\n____firma___");
+ bean.setNota("MESSAGGIO VIA EMAIL PER AVVISO RIPARAZIONI");
+ bean.save();
+ bean.findByCodice("MSG_AVVISO_RIP_SMS");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MSG_AVVISO_RIP_SMS");
+ bean.setDescrizione("MSG_AVVISO_RIP_SMS");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("Gentile <%=cliente%>\n l'oggetto relativo alla scheda riparazione n. <%=ndocumento%> e' disponibile presso il ns. negozio\n____firma___");
+ bean.setNota("MESSAGGIO VIA SMS PER AVVISO RIPARAZIONI");
+ bean.save();
+ bean.findByCodice("MSG_EMAIL_FROM");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MSG_EMAIL_FROM");
+ bean.setDescrizione("MSG_EMAIL_FROM");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("XXX@XXX.COM");
+ bean.setNota("CASELLA EMAIL FROM MESSAGGIO AVVISO VIA EMAIL");
+ bean.save();
+ bean.findByCodice("DESTINAZIONE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("DESTINAZIONE");
+ bean.setDescrizione("DESTINAZIONE");
+ bean.setFlgTipo(1L);
+ bean.setNumero(1.0D);
+ bean.setNota("SE LA DESTINAZIONE E' LA STESSA DEL CLIENTE 1. STAMPA DESTINAZIONE IDEM 0. NON STAMPA NIENTE");
+ bean.save();
+ bean.findByCodice("STAMPA_NOME_DOCUMENTO");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("STAMPA_NOME_DOCUMENTO");
+ bean.setDescrizione("STAMPA_NOME_DOCUMENTO");
+ bean.setFlgTipo(0L);
+ bean.setNota("NOME IDENTIFICATIVO DOCUMENTO PER LE STAMPE PDF. IL NOME E' DEL TIPO [TIPODOC]-[PROG]-[PROGAGG]-[ANNODOC]-[NOMEDOC].PDF");
+ bean.save();
+ bean.findByCodice("STAMPA_BORDI_COLONNE_DOCUMENTO");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("STAMPA_BORDI_COLONNE_DOCUMENTO");
+ bean.setDescrizione("STAMPA_BORDI_COLONNE_DOCUMENTO");
+ bean.setFlgTipo(1L);
+ bean.setNumero(0.0D);
+ bean.setNota("STAMPA AUTOMATICAMENTE I BORDI DEL CORPO SE SETTATO A 1 NEL METODO inserisciDescRigaDocumentoNew DI DOCUMENTO");
+ bean.save();
+ bean.findByCodice("STAMPA_INDENTAZIONE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("STAMPA_INDENTAZIONE");
+ bean.setDescrizione("STAMPA_INDENTAZIONE");
+ bean.setFlgTipo(1L);
+ bean.setNumero(1.0D);
+ bean.setNota("STAMPA AUTOMATICAMENTE UN'INDENTAZIONE SULLE RIGHE SUCCESSIVE ALLA PRIMA SE SETTATO A 1 NEL METODO inserisciDescRigaDocumentoNew DI DOCUMENTO");
+ bean.save();
+ l_tipoParm = "SMS";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("SMS_PDU");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SMS_PDU");
+ bean.setDescrizione("SMS_PDU");
+ bean.setFlgTipo(5L);
+ bean.setNota("INDICA SE IL MESSAGGIO DEVE ESSERE INVIATO IN FORMATO PDU");
+ bean.save();
+ bean.findByCodice("SMS_SERVER");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SMS_SERVER");
+ bean.setDescrizione("SMS_SERVER");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("localhost");
+ bean.setNota("INDIRIZZO IP SMS GATEWAY SERVER. INDIRIZZO IP O NOME HOST");
+ bean.save();
+ bean.findByCodice("SMS_PORT");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SMS_PORT");
+ bean.setDescrizione("SMS_PORT");
+ bean.setFlgTipo(1L);
+ if (bean.getNumeroInt() == 0)
+ bean.setNumero(441.0D);
+ bean.setNota("PORTA SMS GATEWAY SERVER. DEFAULT 443");
+ bean.save();
+ l_tipoParm = "MAILING LIST";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("MAIL_LIST_ON");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MAIL_LIST_ON");
+ bean.setDescrizione("MAIL_LIST_ON");
+ bean.setFlgTipo(5L);
+ bean.setNota("false: MAILING LIST OFF true: MAILING LIST ON (NECESSITA DI CONFIGURAZIONI LATO SERVER)");
+ bean.save();
+ bean.findByCodice("MAIL_LIST_FILE_CR");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MAIL_LIST_FILE_CR");
+ bean.setDescrizione("MAIL_LIST_FILE_CR");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("_tmp/list.txt");
+ bean.setNota("PATH RELATIVO A DOCBASE DEL FILE list MAILING LIST. UTILIZZATA PER ANAGRAFICA CLIENTI");
+ bean.save();
+ bean.findByCodice("MAIL_LIST_MAIL_CR");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MAIL_LIST_MAIL_CR");
+ bean.setDescrizione("MAIL_LIST_MAIL_CR");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("newsletter@dominio.it");
+ bean.setNota("INDIRIZZO MAIL PER INVIO MAILING LIST ANAGRAFICHE.");
+ bean.save();
+ l_tipoParm = "LABEL";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("LABEL_ANAG_SIZE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("LABEL_ANAG_SIZE");
+ bean.setDescrizione("LABEL_ANAG_SIZE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("57,32");
+ bean.setNota("DIMENSIONE ETICHETTA STAMPA SU ZEBRA ANAGRAFICHE IN mm. xx,yy");
+ bean.save();
+ bean.findByCodice("LABEL_ANAG_FONT_SIZE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("LABEL_ANAG_FONT_SIZE");
+ bean.setDescrizione("LABEL_ANAG_FONT_SIZE");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() == 0.0D)
+ bean.setNumero(10.0D);
+ bean.setNota("DIMENSIONE FONT ETICHETTA PER ANAGRAFICHE.");
+ bean.save();
+ bean.findByCodice("LABEL_ANAG_A4_COL_ROW");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("LABEL_ANAG_A4_COL_ROW");
+ bean.setDescrizione("LABEL_ANAG_A4_COL_ROW");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("4,10");
+ bean.setNota("DIMENSIONE ETICHETTA STAMPA SU A4 ANAGRAFICA IN NUMERO COLONNE,RIGHE col,row");
+ bean.save();
+ bean.findByCodice("LABEL_ANAG_A4_MARGINE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("LABEL_ANAG_A4_MARGINE");
+ bean.setDescrizione("LABEL_ANAG_A4_MARGINE");
+ bean.setFlgTipo(1L);
+ bean.setNota("DIMENSIONE MARGINE PER STAMPA ETICHETTE ANAGRAFICHE SU A4 ARTICOLI (DI SOLITO 2)");
+ bean.save();
+ bean.findByCodice("LABEL_ART_SIZE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("LABEL_ART_SIZE");
+ bean.setDescrizione("LABEL_ART_SIZE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("57,32");
+ bean.setNota("DIMENSIONE ETICHETTA STAMPA SU ZEBRA ARTICOLI IN mm. xx,yy");
+ bean.save();
+ bean.findByCodice("LABEL_ART_FONT_SIZE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("LABEL_ART_FONT_SIZE");
+ bean.setDescrizione("LABEL_ART_FONT_SIZE");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() == 0.0D)
+ bean.setNumero(6.0D);
+ bean.setNota("DIMENSIONE FONT ETICHETTA PER ARTICOLI.");
+ bean.save();
+ bean.findByCodice("LABEL_ART_A4_ZEBRA");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("LABEL_ART_A4_ZEBRA");
+ bean.setDescrizione("LABEL_ART_A4_ZEBRA");
+ bean.setFlgTipo(5L);
+ bean.setNota("0 O FALSE: STAMPA ETICHETTE IN A4 1 O TRUE: STAMPA ETICHETTE SU ZEBRA (O SIMILI)");
+ bean.save();
+ bean.findByCodice("LABEL_ART_A4_COL_ROW");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("LABEL_ART_A4_COL_ROW");
+ bean.setDescrizione("LABEL_ART_A4_COL_ROW");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("4,10");
+ bean.setNota("DIMENSIONE ETICHETTA STAMPA SU A4 ARTICOLI IN NUMERO COLONNE,RIGHE col,row");
+ bean.save();
+ bean.findByCodice("LABEL_ART_A4_MARGINE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("LABEL_ART_A4_MARGINE");
+ bean.setDescrizione("LABEL_ART_A4_MARGINE");
+ bean.setFlgTipo(1L);
+ bean.setNota("DIMENSIONE MARGINE PER STAMPA ETICHETTE A4 ARTICOLI (DI SOLITO 2)");
+ bean.save();
+ bean.findByCodice("LABEL_ART_ACC_FONT_SIZE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("LABEL_ART_ACC_FONT_SIZE");
+ bean.setDescrizione("LABEL_ART_ACC_FONT_SIZE");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() == 0.0D)
+ bean.setNumero(5.0D);
+ bean.setNota("DIMENSIONE FONT ETICHETTA PER LABEL ACCESSORI ARTICOLI.");
+ bean.save();
+ bean.findByCodice("LABEL_PK_LIST_SIZE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("LABEL_PK_LIST_SIZE");
+ bean.setDescrizione("LABEL_PK_LIST_SIZE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("159,104");
+ bean.setNota("DIMENSIONE ETICHETTA PAKING LIST STAMPA SU ZEBRA ARTICOLI IN mm. xx,yy");
+ bean.save();
+ bean.findByCodice("LABEL_PK_LIST_FONT_SIZE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("LABEL_PK_LIST_FONT_SIZE");
+ bean.setDescrizione("LABEL_PK_LIST_FONT_SIZE");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() == 0.0D)
+ bean.setNumero(6.0D);
+ bean.setNota("DIMENSIONE FONT ETICHETTA PER LABEL PACKING LIST ARTICOLI.");
+ bean.save();
+ bean.findByCodice("LABEL_PK_LIST_A4_ZEBRA");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("LABEL_PK_LIST_A4_ZEBRA");
+ bean.setDescrizione("LABEL_PK_LIST_A4_ZEBRA");
+ bean.setFlgTipo(5L);
+ bean.setNota("0 O FALSE: STAMPA ETICHETTE PACKING LIST IN A4 1 O TRUE: STAMPA ETICHETTE SU ZEBRA (O SIMILI)");
+ bean.save();
+ bean.findByCodice("LABEL_PK_LIST_A4_COL_ROW");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("LABEL_PK_LIST_A4_COL_ROW");
+ bean.setDescrizione("LABEL_PK_LIST_A4_COL_ROW");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("2,2");
+ bean.setNota("DIMENSIONE ETICHETTA PAKING LIST STAMPA SU A4 ARTICOLI IN NUMERO COLONNE,RIGHE col,row");
+ bean.save();
+ bean.findByCodice("LABEL_PK_LIST_A4_MARGINE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("LABEL_PK_LIST_A4_MARGINE");
+ bean.setDescrizione("LABEL_PK_LIST_A4_MARGINE");
+ bean.setFlgTipo(1L);
+ bean.setNota("DIMENSIONE MARGINE PER STAMPA ETICHETTE PACKING LIST SU A4 ARTICOLI (DI SOLITO 2)");
+ bean.save();
+ l_tipoParm = "ADMIN";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("DBNAME2");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("DBNAME2");
+ bean.setDescrizione("DBNAME2");
+ bean.setFlgTipo(0L);
+ bean.setNumero(0.0D);
+ bean.setNota("PERCORSO DB NUMERO SUPPLEMENTARE (ES. PER IMPORTAZIONI)");
+ bean.save();
+ bean.findByCodice("DBDRIVER2");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("DBDRIVER2");
+ bean.setDescrizione("DBDRIVER2");
+ bean.setFlgTipo(1L);
+ bean.setNota("DRIVER DB NUMERO SUPPLEMENTARE (ES. PER IMPORTAZIONI)");
+ bean.save();
+ bean.findByCodice("USER2");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("USER2");
+ bean.setDescrizione("USER2");
+ bean.setFlgTipo(0L);
+ bean.setNota("UTENTE DB NUMERO SUPPLEMENTARE (ES. PER IMPORTAZIONI)");
+ bean.save();
+ bean.findByCodice("PASSWORD2");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PASSWORD2");
+ bean.setDescrizione("PASSWORD2");
+ bean.setFlgTipo(0L);
+ bean.setNota("PASSWORD DB NUMERO SUPPLEMENTARE (ES. PER IMPORTAZIONI)");
+ bean.save();
+ bean.findByCodice("SCONTO_3_PERCENTUALI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SCONTO_3_PERCENTUALI");
+ bean.setDescrizione("SCONTO_3_PERCENTUALI");
+ bean.setFlgTipo(5L);
+ bean.setNota("SE TRUE UTILIZZIAMO LE 3 PERCENTUALI DI SCONTO");
+ bean.save();
+ l_tipoParm = "MAGAZZINO";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("USA_MAGAZZINO");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("USA_MAGAZZINO");
+ bean.setDescrizione("USA MAGAZZINO SU ARTICOLI");
+ bean.setFlgTipo(5L);
+ bean.setTesto("");
+ bean.setNota("FLAG USA MAGAZZINO. SERVE PER PRENDERE LA QUANTITA' TRAMITE I MOVIMENTI SU RIGA DOCUMENTO (0 false, DEFAULT) SE 1 TRUE LE QUANTITA' LE PRENDO DIRETTAMENTE DAI VALORI IMPOSTATI SU ARTICOLO O ARTICOLO VARIANTE OPPURE DIRETTAMENTE DALLE TABELLA ARTICOLO O ARTICOLO_VARIANTE (ES. ZANIERI). NON C'E' IN QUESTO CASO UNA GESTIONE VERA E PROPRIA DEL MAGAZZINO. UTILIZZATO NEL CASO IN CUI LE QUANTITà VENGANO AGGIORNATE TRAMITE CRONTAB DA UN PROGRAMMA ESTERNO");
+ bean.save();
+ bean.findByCodice("USA_QUANTITA_INTERE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("USA_QUANTITA_INTERE");
+ bean.setDescrizione("USA QUANTITA' INTERE, SUPRATTUTTO IN STAMPA DOCUMENTI");
+ bean.setFlgTipo(5L);
+ bean.setTesto("");
+ bean.setNota("SE VERO, SULLE STAMPE CONSIDERO QUANTITA' INTERE");
+ bean.save();
+ bean.findByCodice("STORNO_ORDINE_A_FORNITORE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("STORNO_ORDINE_A_FORNITORE");
+ bean.setDescrizione("STORNO_ORDINE_A_FORNITORE");
+ bean.setFlgTipo(1L);
+ bean.setTesto("");
+ bean.setNota("CAUSALE I MAGAZZINO DI STORNO PER LA CHIUSURA DI RIGHE ORDINE A FORNITORE PRIMA DELLO SCARICO DI TUTTA LA QUANTITA' ORDINATA.");
+ bean.save();
+ l_tipoParm = "SEISOFT";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("SEISOFT_CONTO_RM_IVA_ESENTE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SEISOFT_CONTO_RM_IVA_ESENTE");
+ bean.setDescrizione("SEISOFT_CONTO_RM_IVA_ESENTE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("rm36");
+ bean.setNota("SEISOFT_CONTO_RM_IVA_ESENTE");
+ bean.save();
+ bean.findByCodice("SEISOFT_CONTO_NOL_AZ");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SEISOFT_CONTO_NOL_AZ");
+ bean.setDescrizione("SEISOFT_CONTO_NOL_AZ");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("2020");
+ bean.setNota("SEISOFT_CONTO_NOL_AZ");
+ bean.save();
+ bean.findByCodice("SEISOFT_CONTO_RM_IVA_VEND");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SEISOFT_CONTO_RM_IVA_VEND");
+ bean.setDescrizione("SEISOFT_CONTO_RM_IVA_VEND");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("rm22");
+ bean.setNota("SEISOFT_CONTO_RM_IVA_VEND");
+ bean.save();
+ bean.findByCodice("SEISOFT_CONTO_NOL_PRIV");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SEISOFT_CONTO_NOL_PRIV");
+ bean.setDescrizione("SEISOFT_CONTO_NOL_PRIV");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("2021");
+ bean.setNota("SEISOFT_CONTO_NOL_PRIV");
+ bean.save();
+ bean.findByCodice("SEISOFT_CONTO_SPESE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SEISOFT_CONTO_SPESE");
+ bean.setDescrizione("SEISOFT_CONTO_SPESE");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("0099");
+ bean.setNota("SEISOFT_CONTO_SPESE");
+ bean.save();
+ bean.findByCodice("SEISOFT_CONTO_VEND_AZ");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SEISOFT_CONTO_VEND_AZ");
+ bean.setDescrizione("SEISOFT_CONTO_VEND_AZ");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("0001");
+ bean.setNota("SEISOFT_CONTO_VEND_AZ");
+ bean.save();
+ bean.findByCodice("SEISOFT_CONTO_VEND_PRIV");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SEISOFT_CONTO_VEND_PRIV");
+ bean.setDescrizione("SEISOFT_CONTO_VEND_PRIV");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("0002");
+ bean.setNota("SEISOFT_CONTO_VEND_PRIV");
+ bean.save();
+ bean.findByCodice("SEISOFT_CONTO_VEND_PRIV_USATO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SEISOFT_CONTO_VEND_PRIV_USATO");
+ bean.setDescrizione("SEISOFT_CONTO_VEND_PRIV_USATO");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("2030");
+ bean.setNota("SEISOFT_CONTO_VEND_PRIV_USATO");
+ bean.save();
+ bean.findByCodice("SEISOFT_CONTO_VEND_AZ_USATO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("SEISOFT_CONTO_VEND_AZ_USATO");
+ bean.setDescrizione("SEISOFT_CONTO_VEND_AZ_USATO");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("2030");
+ bean.setNota("SEISOFT_CONTO_VEND_AZ_USATO");
+ bean.save();
+ l_tipoParm = "WWW";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("WEB_SEND_ORDER_MAIL_CODE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("WEB_SEND_ORDER_MAIL_CODE");
+ bean.setDescrizione("WEB_SEND_ORDER_MAIL_CODE");
+ bean.setFlgTipo(1L);
+ bean.setNota("MODELLI INVIO ORDINE WWW AD HOC 0 --> STANDARD 1--> RAVINALE 2--> TUTTOFOTO 99--> FRAMEWORK CC");
+ bean.save();
+ bean.findByCodice("QTA_MINIMA_VISIBILE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("QTA_MINIMA_VISIBILE");
+ bean.setDescrizione("QTA_MINIMA_VISIBILE");
+ bean.setFlgTipo(1L);
+ bean.setNota("QUANTITA' MINIMA PER LA VISUALIZZAZIONE DELL'ARTICOLO SU WEB");
+ bean.save();
+ bean.findByCodice("ORDINI_WEB_ORE_ANNULLAMENTO");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("ORDINI_WEB_ORE_ANNULLAMENTO");
+ bean.setDescrizione("ORDINI_WEB_ORE_ANNULLAMENTO");
+ bean.setFlgTipo(1L);
+ bean.setNota("ORE DOPO LE QUALI L'ORDINE WEB NON FINALIZZATO VIENE CANCELLATO 0--> IGNORA");
+ bean.save();
+ bean.findByCodice("USE_SEARCH_LAST_2_OCCURRENCE");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("USE_SEARCH_LAST_2_OCCURRENCE");
+ bean.setDescrizione("USE_SEARCH_LAST_2_OCCURRENCE");
+ bean.setFlgTipo(5L);
+ bean.setNota("SE USE_FULL_TEXT E' DISATTIVATO, EFFETTUA LA RICERCA SMART PER OCCORRENZE, FALSE SOLO LE OCCORRENZE + ALTE, TRUE LE 2 OCCORRENZE + ALTE");
+ bean.save();
+ l_tipoParm = "RIBA AZIENDA";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("AZIENDA_CODICE_SIA");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("AZIENDA_CODICE_SIA");
+ bean.setDescrizione("AZIENDA_CODICE_SIA");
+ bean.setFlgTipo(0L);
+ bean.setNota("CODICE DELL'AZIENDA ATTRIBUITO DALLA SIA.");
+ bean.save();
+ bean.findByCodice("AZIENDA_PIVA");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("AZIENDA_PIVA");
+ bean.setDescrizione("AZIENDA_PIVA");
+ bean.setFlgTipo(0L);
+ bean.setNota("PARTITA IVA DELL'AZIENDA.");
+ bean.save();
+ l_tipoParm = "RIBA";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("PATH_FILE_RIBA");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PATH_FILE_RIBA");
+ bean.setDescrizione("PATH_FILE_RIBA");
+ bean.setFlgTipo(0L);
+ bean.setTesto("_tmp/riba/");
+ bean.setNota("PATH DI DESTINAZIONE DEI FILE RIBA.");
+ bean.save();
+ l_tipoParm = "MENU SIDEBAR";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("MNU_DOC_STD");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_DOC_STD");
+ bean.setDescrizione("MNU_DOC_STD");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR DOCUMENTI E ANAGRAFICHE");
+ bean.save();
+ bean.findByCodice("MNU_COAVE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_COAVE");
+ bean.setDescrizione("MNU_COAVE");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR AUTONOLEGGIO ");
+ bean.save();
+ bean.findByCodice("MNU_CONTRATTI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_CONTRATTI");
+ bean.setDescrizione("MNU_CONTRATTI");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR CONTRATTI");
+ bean.save();
+ bean.findByCodice("MNU_WWW");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_WWW");
+ bean.setDescrizione("MNU_WWW");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR WWW");
+ bean.save();
+ bean.findByCodice("MNU_BANNER");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_BANNER");
+ bean.setDescrizione("MNU_BANNER");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR BANNER");
+ bean.save();
+ bean.findByCodice("MNU_CONFIG_ADMIN");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_CONFIG_ADMIN");
+ bean.setDescrizione("MNU_CONFIG_ADMIN");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR CONFIGURAZIONE ADMIN");
+ bean.save();
+ bean.findByCodice("MNU_CONFIG_ANAG");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_CONFIG_ANAG");
+ bean.setDescrizione("MNU_CONFIG_ANAG");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR CONFIGURAZIONE ANAGRAFICHE");
+ bean.save();
+ bean.findByCodice("MNU_CONFIG_ART");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_CONFIG_ART");
+ bean.setDescrizione("MNU_CONFIG_ART");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR CONFIGURAZINE ARTICOLI");
+ bean.save();
+ bean.findByCodice("MNU_CONFIG_CONTAB");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_CONFIG_CONTAB");
+ bean.setDescrizione("MNU_CONFIG_CONTAB");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR CONFIGURAZIONE CONTABILITA'");
+ bean.save();
+ bean.findByCodice("MNU_FILATI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_FILATI");
+ bean.setDescrizione("MNU_FILATI");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR FILATI");
+ bean.save();
+ bean.findByCodice("MNU_LAVORAZIONI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_LAVORAZIONI");
+ bean.setDescrizione("MNU_LAVORAZIONI");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR LAVORAZIONI");
+ bean.save();
+ bean.findByCodice("MNU_NEWS");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_NEWS");
+ bean.setDescrizione("MNU_NEWS");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR NEWS");
+ bean.save();
+ bean.findByCodice("MNU_NEWSLETTER");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_NEWSLETTER");
+ bean.setDescrizione("MNU_NEWSLETTER");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR NEWSLETTER");
+ bean.save();
+ bean.findByCodice("MNU_TESSUTI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_TESSUTI");
+ bean.setDescrizione("MNU_TESSUTI");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR TESSUTI");
+ bean.save();
+ bean.findByCodice("MNU_TESSITURA");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_TESSITURA");
+ bean.setDescrizione("MNU_TESSITURA");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR TESSITURA");
+ bean.save();
+ bean.findByCodice("MNU_CONFEZIONE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_CONFEZIONE");
+ bean.setDescrizione("MNU_CONFEZIONE");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR CONFEZIONI");
+ bean.save();
+ bean.findByCodice("MNU_CC");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_CC");
+ bean.setDescrizione("MNU_CC");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR ECOMMERCE");
+ bean.save();
+ bean.findByCodice("MNU_FACE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_FACE");
+ bean.setDescrizione("MNU_FACE");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR FACE");
+ bean.save();
+ bean.findByCodice("MNU_FR");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_FR");
+ bean.setDescrizione("MNU_FR");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU SIDEBAR FACE RECOGNITION");
+ bean.save();
+ l_tipoParm = "MENU MAIN";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("MNU_M_DOC_STD");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_DOC_STD");
+ bean.setDescrizione("MNU_M_DOC_STD");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN STANDARD DOCUMENTI E ANAGRAFICHE");
+ bean.save();
+ bean.findByCodice("MNU_M_COAVE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_COAVE");
+ bean.setDescrizione("MNU_M_COAVE");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN COAVE. NON ATTIVARE MENU DOC STD");
+ bean.save();
+ bean.findByCodice("MNU_M_CASSA");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_CASSA");
+ bean.setDescrizione("MNU_M_CASSA");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN CASSA");
+ bean.save();
+ bean.findByCodice("MNU_M_EBAY");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_EBAY");
+ bean.setDescrizione("MNU_M_EBAY");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN EBAY");
+ bean.save();
+ bean.findByCodice("MNU_M_PRENOTAZIONI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_PRENOTAZIONI");
+ bean.setDescrizione("MNU_M_PRENOTAZIONI");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN PRENOTAZIONI");
+ bean.save();
+ bean.findByCodice("MNU_M_RIPARAZIONI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_RIPARAZIONI");
+ bean.setDescrizione("MNU_M_RIPARAZIONI");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN RIPARAZIONI");
+ bean.save();
+ bean.findByCodice("MNU_M_ORDINI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_ORDINI");
+ bean.setDescrizione("MNU_M_ORDINI");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN ORDINI");
+ bean.save();
+ bean.findByCodice("MNU_M_FILATI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_FILATI");
+ bean.setDescrizione("MNU_M_FILATI");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN FILATI");
+ bean.save();
+ bean.findByCodice("MNU_M_TESSUTI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_TESSUTI");
+ bean.setDescrizione("MNU_M_TESSUTI");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN TESSUTI");
+ bean.save();
+ bean.findByCodice("MNU_M_TESSITURA");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_TESSITURA");
+ bean.setDescrizione("MNU_M_TESSITURA");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN TESSITURA");
+ bean.save();
+ bean.findByCodice("MNU_M_TESSITURA_PRODUZIONE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_TESSITURA_PRODUZIONE");
+ bean.setDescrizione("MNU_M_TESSITURA_PRODUZIONE");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN TESSITURA AVANZAMENTO PRODUZIONE");
+ bean.save();
+ bean.findByCodice("MNU_M_ARTICOLI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_ARTICOLI");
+ bean.setDescrizione("MNU_M_ARTICOLI");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN GEST ARTICOLI");
+ bean.save();
+ bean.findByCodice("MNU_M_CC");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_CC");
+ bean.setDescrizione("MNU_M_CC");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN ECOMMERCE");
+ bean.save();
+ bean.findByCodice("MNU_CC_GODMODE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_CC_GODMODE");
+ bean.setDescrizione("MNU_CC_GODMODE");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN ECOMMERCE GODMODE PER ALTRI SITI ECOMMERCE VISIBILE SOLO DA UTENTE 1");
+ bean.save();
+ bean.findByCodice("MNU_M_CONFEZIONE");
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_CONFEZIONE");
+ bean.setDescrizione("MNU_M_CONFEZIONE");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU CONFEZIONI");
+ bean.save();
+ bean.findByCodice("MNU_M_FACE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_FACE");
+ bean.setDescrizione("MNU_M_FACE");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN FACE");
+ bean.save();
+ bean.findByCodice("MNU_M_FR");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_M_FR");
+ bean.setDescrizione("MNU_M_FR");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU MAIN FACE RECOGNITION");
+ bean.save();
+ l_tipoParm = "MENU GESTIONE";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("MNU_GEST_ARTICOLI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_GEST_ARTICOLI");
+ bean.setDescrizione("MNU_GEST_ARTICOLI");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU GEST ARTICOLI");
+ bean.save();
+ bean.findByCodice("MNU_GEST_CONTATTI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_GEST_CONTATTI");
+ bean.setDescrizione("MNU_GEST_CONTATTI");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU GEST CONTATTI");
+ bean.save();
+ bean.findByCodice("MNU_GEST_PAGAMENTI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_GEST_PAGAMENTI");
+ bean.setDescrizione("MNU_GEST_PAGAMENTI");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU GEST PAGAMENTI");
+ bean.save();
+ bean.findByCodice("MNU_GEST_RIBA");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_GEST_RIBA");
+ bean.setDescrizione("MNU_GEST_RIBA");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU GEST RIBA");
+ bean.save();
+ bean.findByCodice("MNU_GEST_SCADENZE");
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("MNU_GEST_SCADENZE");
+ bean.setDescrizione("MNU_GEST_SCADENZE");
+ bean.setFlgTipo(5L);
+ bean.setNota("MENU GEST SCADENZE");
+ bean.save();
+ l_tipoParm = "COSTI DEFAULT";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("PERC_RICARICO_DEFAULT");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("PERC_RICARICO_DEFAULT");
+ bean.setDescrizione("PERC_RICARICO_DEFAULT");
+ bean.setFlgTipo(1L);
+ bean.setNota("PERCENTUALE DI RICARICO DI DEFAULT PER ARTICOLI");
+ bean.save();
+ bean.findByCodice("COSTO_SPESE_FISSE_DEFAULT");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("COSTO_SPESE_FISSE_DEFAULT");
+ bean.setDescrizione("COSTO_SPESE_FISSE_DEFAULT");
+ bean.setFlgTipo(1L);
+ bean.setNota("COSTO DEFAULT PER SPESE FISSE PER CAPO");
+ bean.save();
+ bean.findByCodice("COSTO_STIRO_DEFAULT");
+ bean.setFlgAdmin(0L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("COSTO_STIRO_DEFAULT");
+ bean.setDescrizione("COSTO_STIRO_DEFAULT");
+ bean.setFlgTipo(1L);
+ bean.setNota("COSTO DEFAULT PER STIRO CONFEZIONI PER CAPO");
+ bean.save();
+ l_tipoParm = "DEFAULT VARI";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("CODICE_TIPO_TESSUTO_STD");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CODICE_TIPO_TESSUTO_STD");
+ bean.setDescrizione("CODICE_TIPO_TESSUTO_STD");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() <= 0.0D)
+ bean.setNumero(2.0D);
+ bean.setNota("CODICE ID TIPO STANDARD TESSUTO SE NON SPECIFICATO");
+ bean.save();
+ l_tipoParm = "CC";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("CC_LIMITA_AMM");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CC_LIMITA_AMM");
+ bean.setDescrizione("CC_LIMITA_AMM");
+ bean.setFlgTipo(5L);
+ bean.setNota("LIMITA LA PARTE AMMINISTRATIVA PER CC");
+ bean.save();
+ bean.findByCodice("CC_CHECK_AVAIL");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CC_CHECK_AVAIL");
+ bean.setDescrizione("CC_CHECK_AVAIL");
+ bean.setFlgTipo(5L);
+ bean.setNota("SE VERO, PERMETTE DI ACQUISTARE SOLO SE L'ARTICOLO E' DISPONIBILE ");
+ bean.save();
+ bean.findByCodice("CC_QTA_LOW");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CC_QTA_LOW");
+ bean.setDescrizione("CC_QTA_LOW");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() == 0.0D)
+ bean.setNumero(5.0D);
+ bean.setNota("QUANTITA' > 0 SOTTO LA QUALE VIENE INDICATA SCORTA BASSA. DI SOLITO 5");
+ bean.save();
+ bean.findByCodice("CC_SOSPENDI_DOPO_N_GG_NO_IMPORT");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CC_SOSPENDI_DOPO_N_GG_NO_IMPORT");
+ bean.setDescrizione("CC_SOSPENDI_DOPO_N_GG_NO_IMPORT");
+ bean.setFlgTipo(1L);
+ bean.setNota("NUMERO DI GIORNI CHE L'ARTICOLO NON E' STATO TROVATO DURANTE L'IMPORT DOPO I QUALI VIENE SOSPESO AUTOMATICAMENTE SE 0 --> NON SOSPENDE MAI");
+ bean.save();
+ bean.findByCodice("CC_COSTO_SPED_FULL");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CC_COSTO_SPED_FULL");
+ bean.setDescrizione("CC_COSTO_SPED_FULL");
+ bean.setFlgTipo(5L);
+ bean.setNota("ATTIVA O DISATTIVA IL COSTO SPEDIZIONE PER ARTICOLO NAZIONE + CALCOLO PERCENTILE SUL CARRELLO");
+ bean.save();
+ bean.findByCodice("CC_ARROTONDA_PREZZO_A_EURO_SOPRA");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CC_ARROTONDA_PREZZO_A_EURO_SOPRA");
+ bean.setDescrizione("CC_ARROTONDA_PREZZO_A_EURO_SOPRA");
+ bean.setFlgTipo(1L);
+ bean.setNota("PER L'AGGIORNAMENTO IN BASE AL NUOVO COSTO DI ACQUISTO. SE IL PREZZO FINALE CON IVA E' SUPERIORE A QUESTO VALORE --> AGGIORNO ALL'EURO SUPERIORE ALTRIMENTI AGGIORNO AL DECIMALE DEFINITO DA P_CC_ARROTONDA_DECIMALE_PER_PREZZI_BASSI SUPERIORE.");
+ bean.save();
+ bean.findByCodice("CC_ARROTONDA_DECIMALE_PER_PREZZI_BASSI");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CC_ARROTONDA_DECIMALE_PER_PREZZI_BASSI");
+ bean.setDescrizione("CC_ARROTONDA_DECIMALE_PER_PREZZI_BASSI");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() == 0.0D)
+ bean.setNumero(0.5D);
+ bean.setNota("PER L'AGGIORNAMENTO IN BASE AL NUOVO COSTO DI ACQUISTO. ARROTONDAMENTO DECIMALE PER PREZZI INFERIORE A P_CC_ARROTONDA_PREZZO_A_EURO_SOPRA DI SOLITO ALMENO 0,5 MA POTREBBE ESSERE QUALSIASI VALORE DA 0,1 A 0,9. SE 1 ARROTONDA ALL'EURO SUPERIORE");
+ bean.save();
+ bean.findByCodice("CC_RICARICO_MINIMO_OFFERTE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CC_RICARICO_MINIMO_OFFERTE");
+ bean.setDescrizione("CC_RICARICO_MINIMO_OFFERTE");
+ bean.setFlgTipo(1L);
+ if (bean.getNumero() == 0.0D)
+ bean.setNumero(5.0D);
+ bean.setNota("SE INSERISCO UNA PERCENTUALE DI SCONTO COME PREZZO OFFERTA, QUESTO NON DEVE ESSERE MAI INFERIORE A QUESTO VALORE! METTO PER DEFAULT 5%");
+ bean.save();
+ bean.findByCodice("CC_LINK_WEB_CON_MARCA");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CC_LINK_WEB_CON_MARCA");
+ bean.setDescrizione("CC_LINK_WEB_CON_MARCA");
+ bean.setFlgTipo(5L);
+ bean.setNota("inserisce come primo elemento la marca nel link per il web (getCCLinkDettaglio(...)");
+ bean.save();
+ bean.findByCodice("CC_N_ORDINI_WWW_AL_GIORNO");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("CC_N_ORDINI_WWW_AL_GIORNO");
+ bean.setDescrizione("CC_N_ORDINI_WWW_AL_GIORNO");
+ bean.setFlgTipo(1L);
+ bean.setNota("NUMERO DI ORDINI WWW AL GIORNO PER CALCOLO NON SEQUENZIALE DEI NUMERI ORDINE WWW. PER SIMULARE + ORDINI AL GIORNO");
+ bean.save();
+ l_tipoParm = "GOOGLE_REVIEW";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice(GoogleReview.P_GOOGLE_REVIEW_DATE);
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice(GoogleReview.P_GOOGLE_REVIEW_DATE);
+ bean.setDescrizione(GoogleReview.P_GOOGLE_REVIEW_DATE);
+ bean.setFlgTipo(2L);
+ bean.setNota("DATA ULTIMO ACCESSO A GOOGLE REVIEW");
+ bean.save();
+ bean.findByCodice(GoogleReview.P_GOOGLE_REVIEW_RATING);
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice(GoogleReview.P_GOOGLE_REVIEW_RATING);
+ bean.setDescrizione(GoogleReview.P_GOOGLE_REVIEW_RATING);
+ bean.setFlgTipo(1L);
+ bean.setNota("RATING ALLA DATA GOOGLE_REVIEW_DATE");
+ bean.save();
+ bean.findByCodice(GoogleReview.P_GOOGLE_REVIEW_USER_RATING_TOTALS);
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice(GoogleReview.P_GOOGLE_REVIEW_USER_RATING_TOTALS);
+ bean.setDescrizione(GoogleReview.P_GOOGLE_REVIEW_USER_RATING_TOTALS);
+ bean.setFlgTipo(1L);
+ bean.setNota("GOOGLE_REVIEW_USER_RATING_TOTALS ALLA DATA GOOGLE_REVIEW_DATE");
+ bean.save();
+ l_tipoParm = "GOOGLE";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("GOOGLE_FTP_USER");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("GOOGLE_FTP_USER");
+ bean.setDescrizione("GOOGLE_FTP_USER");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("mc-ftp-245429498");
+ bean.setNota("USER FTP O SFTP PER GOOGLE MERCHANT");
+ bean.save();
+ bean.findByCodice("GOOGLE_FTP_PASSWORD");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("GOOGLE_FTP_PASSWORD");
+ bean.setDescrizione("GOOGLE_FTP_PASSWORD");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("nJfuNd3EnxLJtHzQa");
+ bean.setNota("PASSWORD FTP O SFTP PER GOOGLE MERCHANT");
+ bean.save();
+ bean.findByCodice("GOOGLE_USE_SFTP");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("GOOGLE_USE_SFTP");
+ bean.setDescrizione("GOOGLE_USE_SFTP");
+ bean.setFlgTipo(5L);
+ bean.setNota("SE TRUE UTILIZZA PROTOCOLLO SFTP");
+ bean.save();
+ bean.findByCodice("GOOGLE_PREZZO_PUBBLICO_MINIMO_X_EXPORT");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("GOOGLE_PREZZO_PUBBLICO_MINIMO_X_EXPORT");
+ bean.setDescrizione("GOOGLE_PREZZO_PUBBLICO_MINIMO_X_EXPORT");
+ bean.setFlgTipo(1L);
+ bean.setNota("PER L'EXPORT SU MERCHANT, EVITIAMO DI ESPORTARE OGGETTI CHE COSTANO MENO DI QUESTO VALORE. SE ZERO OVVIAMENTE VIENE IGNORATO");
+ bean.save();
+ bean.findByCodice("GOOGLE_QTA_MINIMA_X_EXPORT");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("GOOGLE_QTA_MINIMA_X_EXPORT");
+ bean.setDescrizione("GOOGLE_QTA_MINIMA_X_EXPORT");
+ bean.setFlgTipo(1L);
+ bean.setNota("PER L'EXPORT SU MERCHANT, EVITIAMO DI ESPORTARE OGGETTI CHE NON CI SONO O COMUNQUE SOTTO UNA CERTA QUANTITA...");
+ bean.save();
+ bean.findByCodice("GOOGLE_SIGNIN_CLIENT_ID");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("GOOGLE_SIGNIN_CLIENT_ID");
+ bean.setDescrizione("GOOGLE_SIGNIN_CLIENT_ID");
+ bean.setFlgTipo(0L);
+ bean.setNota("SIGNIN CLIENT ID PER ACCESSO TRAMITE GOOGLE. DEVE ESSERE TRUE P_GOOGLE_SIGNIN_ENABLE");
+ bean.save();
+ bean.findByCodice("GOOGLE_SIGNIN_ENABLE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("GOOGLE_SIGNIN_ENABLE");
+ bean.setDescrizione("GOOGLE_SIGNIN_ENABLE");
+ bean.setFlgTipo(5L);
+ bean.setNota("SE TRUE è ATTIVATO L'ACCESSO TRAMITE GOOGLE SUL SITO WEN (GOOGLE_SIGNIN_CLIENT_ID DEVE ESSERE VALIDO)");
+ bean.save();
+ l_tipoParm = "FACEBOOK";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ bean.findByCodice("FACEBOOK_SIGNIN_CLIENT_ID");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("FACEBOOK_SIGNIN_CLIENT_ID");
+ bean.setDescrizione("FACEBOOK_SIGNIN_CLIENT_ID");
+ bean.setFlgTipo(0L);
+ bean.setNota("SIGNIN CLIENT ID PER ACCESSO TRAMITE FACEBOOK. DEVE ESSERE TRUE FACEBOOK_SIGNIN_ENABLE");
+ bean.save();
+ bean.findByCodice("FACEBOOK_SIGNIN_SECRET_KEY");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("FACEBOOK_SIGNIN_SECRET_KEY");
+ bean.setDescrizione("FACEBOOK_SIGNIN_SECRET_KEY");
+ bean.setFlgTipo(0L);
+ bean.setNota("SIGNIN SECRET ID PER ACCESSO TRAMITE FACEBOOK. DEVE ESSERE TRUE FACEBOOK_SIGNIN_ENABLE");
+ bean.save();
+ bean.findByCodice("FACEBOOK_SIGNIN_ENABLE");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("FACEBOOK_SIGNIN_ENABLE");
+ bean.setDescrizione("FACEBOOK_SIGNIN_ENABLE");
+ bean.setFlgTipo(5L);
+ bean.setNota("SE TRUE è ATTIVATO L'ACCESSO TRAMITE FACEBOOK SUL SITO WEB (FACEBOOK_SIGNIN_CLIENT_ID E FACEBOOK_SIGNIN_SECRET_KEY DEVE ESSERE VALIDO)");
+ bean.save();
+ DBAdapter.logDebug(debug, "anag.Users initParms: stop");
+ _FeXmlAdapter.initApplicationParms(ap);
+ RemoteDevice.initApplicationParms(ap);
+ BrtApi.initApplicationParms(ap);
+ CodaMessaggi.initApplicationParms(ap);
+ Cart.initCartParms(ap);
+ News.initApplicationParms(ap);
+ XpayReq.initApplicationParms(ap);
+ SetefiReq.initApplicationParms(ap);
+ PayPalReq.initApplicationParms(ap);
+ PayPalReq.initApplicationParms(ap);
+ StripeResp.initApplicationParms(ap);
+ SellaReq.initApplicationParms(ap);
+ ConselReq.initApplicationParms(ap);
+ SellaPCreditReq.initApplicationParms(ap);
+ PosteReq.initApplicationParms(ap);
+ ShopnetReq.initApplicationParms(ap);
+ EbayAbliaApi.initApplicationParms(ap);
+ AmzSellerApi.initApplicationParms(ap);
+ BrtApi.initApplicationParms(ap);
+ StatusMsg.deleteMsgByTag(ap, "INIT");
+ }
+ }
+
+ public RegCassa getRegCassa() {
+ if (this.regCassa == null) {
+ Postazione postazione = new Postazione(getApFull());
+ postazione.findByPrimaryKey(getId_postazione());
+ setRegCassa(postazione.getRegCassa());
+ }
+ return (this.regCassa == null) ? new RegCassa(getApFull()) : this.regCassa;
+ }
+
+ public void setPostazione(Postazione postazione) {
+ setPostazione(postazione);
+ }
+
+ protected void initFields() {
+ super.initFields();
+ }
+
+ public void setRegCassa(RegCassa regCassa) {
+ this.regCassa = regCassa;
+ }
+
+ public PostazioneI getPostazione() {
+ this.postazione = (Postazione)getSecondaryObject((DBAdapter)this.postazione, Postazione.class, getId_postazione());
+ return (PostazioneI)this.postazione;
+ }
+
+ public void setId_postazione(long id_postazione) {
+ this.id_postazione = id_postazione;
+ setPostazione(null);
+ }
+
+ public long getId_postazione() {
+ return this.id_postazione;
+ }
+
+ public Vectumerator findByCR(UsersCR CR, int pageNumber, int pageRows) {
+ return findByCR(CR, pageNumber, pageRows);
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class, getId_clifor());
+ return this.clifor;
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public void setClifor(Clifor clifor) {
+ this.clifor = clifor;
+ }
+
+ public String getId_nazione() {
+ return (this.id_nazione == null) ? "" : this.id_nazione;
+ }
+
+ public Nazione getNazione() {
+ this.nazione = (Nazione)getSecondaryObject(this.nazione, Nazione.class, getId_nazione());
+ return this.nazione;
+ }
+
+ public void setId_nazione(String id_nazione) {
+ this.id_nazione = id_nazione;
+ setNazione(null);
+ }
+
+ public void setNazione(Nazione nazione) {
+ this.nazione = nazione;
+ }
+
+ public String getCallingJsp() {
+ return (this.callingJsp == null) ? "" : this.callingJsp;
+ }
+
+ public void setCallingJsp(String callingJsp) {
+ this.callingJsp = callingJsp;
+ }
+
+ public ResParm sendLostPasswordMailMessage(String lostEmail, String lang) {
+ ResParm rp = new ResParm(true);
+ try {
+ String subject = getMailSubject();
+ Users bean = new Users(getApFull());
+ UsersCR CR = new UsersCR();
+ CR.setEMail(lostEmail);
+ bean.findUsersByEmail(lostEmail);
+ if (bean.getDBState() == 1) {
+ MailMessage mf = new MailMessage(getApFull(), getLostPwdMailMessage(lang));
+ mf.setQuestionMark(false);
+ mf.setString("login", bean.getLogin());
+ if (bean.isSocialAccount()) {
+ mf.setString("pwd", bean.getSocialIdType() + " social account");
+ mf.setString("extra",
+ translate("Puoi accedere tramite il tuo account", lang) + " " + translate("Puoi accedere tramite il tuo account", lang) + ". " + bean.getSocialIdType() + " " +
+ translate("Se non puoi più accedere al tuo account", lang) + ", " + bean.getSocialIdType());
+ } else {
+ mf.setString("pwd", bean.getPwd());
+ }
+ mf.setString("nominativo", bean.getNominativo());
+ mf.setString("nome", bean.getNome());
+ mf.setString("cognome", bean.getCognome());
+ rp = mf.sendMailMessageSystem(bean.getEMail(), subject + " - Richiesta Password ", true);
+ if (rp.getStatus())
+ rp.setMsg("La tua password e' stata inviata correttamente all'indirizzo " + bean.getEMail());
+ } else {
+ rp.setStatus(false);
+ rp.setMsg("Email non in archivio");
+ }
+ } catch (Exception e) {
+ handleDebug(e);
+ rp.setStatus(false);
+ rp.setMsg(e.toString() + "\n" + e.toString());
+ }
+ return rp;
+ }
+
+ public ResParm sendUserDataMailMessage(String lang) {
+ ResParm rp = new ResParm(true);
+ try {
+ if (getDBState() == 1) {
+ String userMailMessage = getUserMailMessage(lang);
+ MailMessage mf = new MailMessage(getApFull(), userMailMessage);
+ mf.setQuestionMark(false);
+ if (!getControlCode().isEmpty())
+ mf.setString("controlCode", getControlCode() + "&e=" + getControlCode());
+ mf.setLong("id_users", getId_users());
+ mf.setString("data", getDataFormat().format(new Date()));
+ mf.setString("login", getLogin());
+ mf.setString("pwd", getPwd());
+ mf.setString("nome", getNome());
+ mf.setString("cognome", getCognome());
+ mf.setString("piva", getClifor().getPIva());
+ mf.setString("codfisc", getClifor().getCodFisc());
+ mf.setString("indirizzo", getClifor().getIndirizzo());
+ mf.setString("numero", getClifor().getNumeroCivico());
+ if (getClifor().getCapZona().isEmpty()) {
+ mf.setString("cap", getClifor().getCapComune());
+ } else {
+ mf.setString("cap", getClifor().getCapZona());
+ }
+ mf.setString("citta", getClifor().getDescrizioneComune());
+ mf.setString("provincia", getClifor().getProvinciaComune());
+ mf.setString("nazione", getClifor().getNazione().getDescrizione(lang));
+ mf.setString("telefono", getClifor().getCellulare() + " " + getClifor().getCellulare());
+ mf.setString("fax", getClifor().getFax());
+ mf.setString("email", getClifor().getEMail());
+ mf.setString("codSDI", getClifor().getCodiceIdentificativoFE());
+ mf.setString("pec", getClifor().getPec());
+ if (getClifor().getCurrentDD().getId_destinazioneDiversa() > 0L) {
+ if (getClifor().getCurrentDD().getPressoDD().isEmpty()) {
+ mf.setString("indirizzoSped", getClifor().getCurrentDD().getIndirizzoDD());
+ } else {
+ mf.setString("indirizzoSped", " c/o " +
+ getClifor().getCurrentDD().getPressoDD() + " " + getClifor().getCurrentDD().getIndirizzoDD());
+ }
+ mf.setString("numeroSped", getClifor().getCurrentDD().getNumeroCivicoDD());
+ if (getClifor().getCurrentDD().getCapZonaDD().isEmpty()) {
+ mf.setString("capSped", getClifor().getCurrentDD().getCapComuneDD());
+ } else {
+ mf.setString("capSped", getClifor().getCurrentDD().getCapZonaDD());
+ }
+ mf.setString("cittaSped", getClifor().getCurrentDD().getDescrizioneComuneDD());
+ mf.setString("provinciaSped", getClifor().getCurrentDD().getProvinciaComuneDD());
+ mf.setString("nazioneSped", getClifor().getCurrentDD().getNazioneDD().getDescrizione(lang));
+ } else {
+ mf.setString("indirizzoSped", getClifor().getIndirizzo());
+ mf.setString("numeroSped", getClifor().getNumeroCivico());
+ if (getClifor().getCapZona().isEmpty()) {
+ mf.setString("capSped", getClifor().getCapComune());
+ } else {
+ mf.setString("capSped", getClifor().getCapZona());
+ }
+ mf.setString("cittaSped", getClifor().getDescrizioneComune());
+ mf.setString("provinciaSped", getClifor().getProvinciaComune());
+ mf.setString("nazioneSped", getClifor().getNazione().getDescrizione(lang));
+ }
+ MailProperties mp = new MailProperties();
+ mp.setProperty("TO", getEMail());
+ String mailBcc = getMailTo();
+ if (!getMailToSfx("USERS").isEmpty())
+ mailBcc = mailBcc + "," + mailBcc;
+ mp.setProperty("BCC", mailBcc);
+ mp.setProperty("SUBJECT", mf.getMailSubject() + " Conferma registrazione account utente ");
+ mp.setProperty("MSG", mf.getMessage());
+ rp = mf.sendMailMessage(mp, false);
+ } else {
+ rp.setStatus(false);
+ rp.setMsg("Email non in archivio");
+ }
+ } catch (Exception e) {
+ handleDebug(e);
+ rp.setStatus(false);
+ rp.setMsg(e.getMessage());
+ }
+ return rp;
+ }
+
+ public long getFlgOperatore() {
+ return this.flgOperatore;
+ }
+
+ public void setFlgOperatore(long flgOperatore) {
+ this.flgOperatore = flgOperatore;
+ }
+
+ public Vectumerator findUsersByFlgOperatore() {
+ String s_Sql_Find = "select A.* from " + getTableBeanName() + " AS A";
+ String s_Sql_order = " order by A.cognome, A.nome";
+ String wc = " where dataFineVld is null";
+ wc = buildWc(wc, "A.id_users <>1");
+ wc = buildWc(wc, "A.flgValido='S'");
+ wc = buildWc(wc, "A.flgOperatore=1");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc);
+ return findRows(stmt);
+ } catch (Exception e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public Vectumerator findUsersWithWishlist() {
+ String s_Sql_Find = "select A.* from USERS as A inner join WISHLIST as B on A.id_users=B.id_users where B.flgAbilitaAvviso=1";
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find);
+ return findRows(stmt);
+ } catch (Exception e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public ByteArrayOutputStream creaLabelUtenteA4Pdf() {
+ long pHMarg = 2L;
+ long l_indent = 4L;
+ ByteArrayOutputStream ba = new ByteArrayOutputStream();
+ try {
+ this.document = new Document(PageSize.A4, 0.0F, 0.0F, 0.0F, 0.0F);
+ this.writer = PdfWriter.getInstance(this.document, ba);
+ this.document.open();
+ long labelNumber = 0L;
+ int nCol = 4;
+ int nRow = 10;
+ float[] widths = { 1.0F, 1.0F, 1.0F, 1.0F };
+ this.pdfPcorpo = new PdfPTable(widths);
+ this.pdfPcorpo.setWidthPercentage(100.0F);
+ findByPrimaryKey(getId_users());
+ labelNumber = (long)addLabelUnUtenteA4Pdf("", nRow, 1L, getDescrizione());
+ if (labelNumber == 0L) {
+ Phrase ph = new Phrase("Attenzione! Non ci sono etichette da stampare!");
+ PdfPCell cell = new PdfPCell(ph);
+ cell.setFixedHeight((PageSize.A4.getHeight() - (float)pHMarg) / (float)nRow);
+ cell.setIndent((float)l_indent);
+ cell.setBorder(0);
+ cell.setColspan(nCol);
+ this.pdfPcorpo.addCell(cell);
+ } else {
+ long numberBlankCell = (long)nCol - labelNumber % (long)nCol;
+ PdfPCell cell = new PdfPCell();
+ cell.setFixedHeight((PageSize.A4.getHeight() - (float)pHMarg) / (float)nRow);
+ cell.setIndent((float)l_indent);
+ cell.setBorder(0);
+ if (numberBlankCell != (long)nCol)
+ for (int i = 0; (long)i < numberBlankCell; i++)
+ this.pdfPcorpo.addCell(cell);
+ }
+ this.document.add((Element)this.pdfPcorpo);
+ this.document.close();
+ this.document = null;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return ba;
+ }
+
+ public int addLabelUnUtenteA4Pdf(String titolo, int nRow, long numberOflabel, String l_descrizione) {
+ long pHMarg = 2L;
+ long l_indent = 4L;
+ int totNumbOflabel = 0;
+ try {
+ int altezzaCod = 80;
+ int larghezzaCod = 360;
+ PdfContentByte cb = this.writer.getDirectContent();
+ Barcode128 codeBar = new Barcode128();
+ codeBar.setCodeType(9);
+ totNumbOflabel++;
+ PdfPCell cell = new PdfPCell();
+ cell.setBorder(0);
+ codeBar.setCode(String.valueOf(getId_users()));
+ codeBar.setAltText(l_descrizione);
+ Image imgBarcode = codeBar.createImageWithBarcode(cb, null, null);
+ imgBarcode.scaleToFit((float)larghezzaCod, (float)altezzaCod);
+ cell.addElement(new Chunk(imgBarcode, 10.0F, (float)(-altezzaCod + 10)));
+ cell.setVerticalAlignment(4);
+ cell.setFixedHeight((PageSize.A4.getHeight() - (float)pHMarg) / (float)nRow);
+ cell.setIndent((float)l_indent);
+ this.pdfPcorpo.addCell(cell);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return totNumbOflabel;
+ }
+
+ public long getFlgNews() {
+ return this.flgNews;
+ }
+
+ public void setFlgNews(long flgNews) {
+ this.flgNews = flgNews;
+ }
+
+ public Vectumerator findUsersAbilitatiNewsByNews(long l_id_news, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from USERS AS A ";
+ String s_Sql_order = " order by A.cognome, A.nome";
+ String wc = " where dataFineVld is null";
+ wc = buildWc(wc, "A.id_users <> 1");
+ wc = buildWc(wc, "A.flgValido='S'");
+ wc = buildWc(wc, "A.flgNews=1");
+ wc = buildWc(wc, "A.id_users NOT IN (SELECT id_users FROM NEWS_USERS AS B where B.id_news = " + l_id_news + ")");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc);
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (Exception e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public long getId_documento() {
+ return this.id_documento;
+ }
+
+ public void setId_documento(long id_documento) {
+ this.id_documento = id_documento;
+ }
+
+ public Vectumerator findUsersByLogin() {
+ String s_Sql_Find = "select A.* from " + getTableBeanName() + " AS A";
+ String s_Sql_order = " order by A.cognome, A.nome";
+ String wc = " where dataFineVld is null";
+ wc = buildWc(wc, "A.id_users <>1");
+ wc = buildWc(wc, "A.flgValido='S'");
+ wc = buildWc(wc, "A.flgOperatore=1");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc);
+ return findRows(stmt);
+ } catch (Exception e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public void creaFileEmailCvsByCR(UsersCR CR) {
+ try {
+ Vectumerator list = new Users(getApFull()).findByCR(CR, 0, 0);
+ CR.setFileName(getPathTmp() + "/" + getPathTmp() + "_" + DBAdapter.getTimestamp().getTime() + ".csv");
+ String theCvsFile = getDocBase() + getDocBase();
+ String SEP = ";";
+ new File(theCvsFile).delete();
+ FileWr outCvsFile = new FileWr(theCvsFile, false);
+ outCvsFile.writeLine(CR.getDescrizioneCR());
+ while (list.hasMoreElements()) {
+ Users row = (Users)list.nextElement();
+ if (!row.getEMail().isEmpty())
+ outCvsFile.writeLine(row.getEMail());
+ }
+ outCvsFile.closeFile();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public boolean isProfileNoReg() {
+ if (getId_userProfile() == getIdUserProfileNoReg())
+ return true;
+ return false;
+ }
+
+ public boolean isProfiloWww() {
+ if (getId_userProfile() == getIdUserProfileWww())
+ return true;
+ return false;
+ }
+
+ public boolean isOkForCheckout() {
+ if (getEMail().isEmpty() || getClifor().getEMail().isEmpty() || !getClifor().isIndirizzoOk() || getClifor().getCodFisc().isEmpty() || (
+ getClifor().getCellulare().isEmpty() && getClifor().getTelefono().isEmpty()))
+ return false;
+ return true;
+ }
+
+ public boolean isProfilML() {
+ if (getId_userProfile() == getIdUserProfileMailingList())
+ return true;
+ return false;
+ }
+
+ public ResParm addArticoloToWishlist(Wishlist item, String l_lang) {
+ if (getId_users() == 0L)
+ return new ResParm(false, translate("Errore! Utente non trovato", l_lang));
+ ResParm rp = new ResParm();
+ Wishlist wl = new Wishlist(getApFull());
+ wl.findByUserItem(getId_users(), item);
+ if (wl.getId_wishlist() > 0L) {
+ rp.setMsg(translate("L'articolo risulta già nella tua wishlist!", l_lang));
+ } else {
+ wl.setId_articolo(item.getId_articolo());
+ wl.setId_articoloVariante(item.getId_articoloVariante());
+ wl.setId_articoloTaglia(item.getId_articoloTaglia());
+ wl.setId_users(getId_users());
+ wl.setDataWL(getToday());
+ wl.setOraWL(getNow());
+ wl.setDispoLevelWL(item.getDispoLevel());
+ if (item.getId_articoloTaglia() > 0L) {
+ wl.setPrezzoWL(item.getArticoloTaglia().getPrice(getId_users()));
+ } else if (item.getId_articoloVariante() > 0L) {
+ wl.setPrezzoWL(item.getArticoloVariante().getPrice(getId_users()));
+ } else {
+ wl.setPrezzoWL(item.getArticolo().getPrice(getId_users()));
+ }
+ wl.setFlgAbilitaAvviso(1L);
+ rp = wl.save();
+ if (rp.getStatus()) {
+ rp.setMsg(translate("L'articolo e' stato inserito nella tua wishlist!", l_lang));
+ rp.setStatus(true);
+ } else {
+ rp.setMsg(translate("Errore! Impossibile inserire o inserito nella tua wishlist!", l_lang));
+ rp.setStatus(true);
+ }
+ }
+ return rp;
+ }
+
+ public Vectumerator findUsersByFlgMailingList() {
+ String s_Sql_Find = "select A.* from " + getTableBeanName() + " AS A";
+ String s_Sql_order = " order by A.cognome, A.nome";
+ String wc = " where dataFineVld is null";
+ wc = buildWc(wc, "A.id_users <>1");
+ wc = buildWc(wc, "A.flgValido='S'");
+ wc = buildWc(wc, "A.flgMl=1");
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc);
+ return findRows(stmt);
+ } catch (Exception e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public boolean hasListinoPersonalizzato() {
+ if (getId_clifor() == 0L || getClifor().getId_listino() == 0L)
+ return false;
+ return true;
+ }
+
+ public double getTariffaProfessionista() {
+ return this.tariffaProfessionista;
+ }
+
+ public double getPercProfessionista() {
+ return this.percProfessionista;
+ }
+
+ public void setTariffaProfessionista(double costoOrario) {
+ this.tariffaProfessionista = costoOrario;
+ }
+
+ public void setPercProfessionista(double percServizi) {
+ this.percProfessionista = percServizi;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/UsersCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/UsersCR.java
new file mode 100644
index 00000000..12e8fd2d
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/UsersCR.java
@@ -0,0 +1,29 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+
+public class UsersCR extends it.acxent.common.UsersCR {
+ private long flgOperatore;
+
+ public UsersCR() {}
+
+ public UsersCR(it.acxent.common.Users theUser) {
+ super(theUser);
+ }
+
+ public UsersCR(ApplParmFull newAp) {
+ super(newAp);
+ }
+
+ public UsersCR(ApplParmFull newAp, it.acxent.common.Users theUser) {
+ super(newAp, theUser);
+ }
+
+ public long getFlgOperatore() {
+ return this.flgOperatore;
+ }
+
+ public void setFlgOperatore(long flgOperatore) {
+ this.flgOperatore = flgOperatore;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Vettore.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Vettore.java
new file mode 100644
index 00000000..719562a5
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Vettore.java
@@ -0,0 +1,215 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.WcString;
+import it.acxent.fattele.FEDatiAnagraficiInterface;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class Vettore extends _AnagAdapter implements Serializable, FEDatiAnagraficiInterface {
+ private long id_vettore;
+
+ private long id_comune;
+
+ private String descrizione;
+
+ private String indirizzo;
+
+ private String nominativo;
+
+ private String numeroCivico;
+
+ private String pIva;
+
+ private String codFiscale;
+
+ private String iscrizioneAlbo;
+
+ private Comune comune;
+
+ private String linkTracking;
+
+ private String id_nazione;
+
+ private Nazione nazione;
+
+ public Vettore(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Vettore() {}
+
+ public void setId_vettore(long newId_vettore) {
+ this.id_vettore = newId_vettore;
+ }
+
+ public void setId_comune(long newId_comune) {
+ this.id_comune = newId_comune;
+ setComune(null);
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setIndirizzo(String newIndirizzo) {
+ this.indirizzo = newIndirizzo;
+ }
+
+ public void setNominativo(String newNominativo) {
+ this.nominativo = newNominativo;
+ }
+
+ public void setNumeroCivico(String newNumeroCivico) {
+ this.numeroCivico = newNumeroCivico;
+ }
+
+ public long getId_vettore() {
+ return this.id_vettore;
+ }
+
+ public long getId_comune() {
+ return this.id_comune;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public String getIndirizzo() {
+ return (this.indirizzo == null) ? "" : this.indirizzo.trim();
+ }
+
+ public String getNominativo() {
+ return (this.nominativo == null) ? "" : this.nominativo.trim();
+ }
+
+ public String getNumeroCivico() {
+ return (this.numeroCivico == null) ? "" : this.numeroCivico.trim();
+ }
+
+ public void setComune(Comune newComune) {
+ this.comune = newComune;
+ }
+
+ public Comune getComune() {
+ this.comune = (Comune)getSecondaryObject(this.comune, Comune.class, getId_comune());
+ return this.comune;
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(VettoreCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from VETTORE AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public void setLinkTracking(String newLinkTraking) {
+ this.linkTracking = newLinkTraking;
+ }
+
+ public String getLinkTracking() {
+ return (this.linkTracking == null) ? "" : this.linkTracking;
+ }
+
+ public String getPIva() {
+ return (this.pIva == null) ? "" : this.pIva.trim();
+ }
+
+ public void setPIva(String pIva) {
+ this.pIva = pIva;
+ }
+
+ public String getCodFiscale() {
+ return (this.codFiscale == null) ? "" : this.codFiscale.trim();
+ }
+
+ public void setCodFiscale(String codFiscale) {
+ this.codFiscale = codFiscale;
+ }
+
+ public String getIscrizioneAlbo() {
+ return (this.iscrizioneAlbo == null) ? "" : this.iscrizioneAlbo.trim();
+ }
+
+ public void setIscrizioneAlbo(String iscrizioneAlbo) {
+ this.iscrizioneAlbo = iscrizioneAlbo;
+ }
+
+ public String getFEPartitaIva() {
+ return getPIva();
+ }
+
+ public String getFECodiceFiscale() {
+ return getCodFiscale();
+ }
+
+ public String getFEDenominazione() {
+ return getNominativo();
+ }
+
+ public String getFECognome() {
+ return null;
+ }
+
+ public String getFENome() {
+ return null;
+ }
+
+ public String getFETitolo() {
+ return null;
+ }
+
+ public String getFECodEORI() {
+ return null;
+ }
+
+ public String getFEPaese() {
+ return getId_nazione();
+ }
+
+ public String getId_nazione() {
+ return (this.id_nazione == null) ? "" : this.id_nazione.trim();
+ }
+
+ public Nazione getNazione() {
+ this.nazione = (Nazione)getSecondaryObject(this.nazione, Nazione.class, getId_nazione());
+ return this.nazione;
+ }
+
+ public void setId_nazione(String newId_nazione) {
+ this.id_nazione = newId_nazione;
+ setNazione(null);
+ }
+
+ public void setNazione(Nazione newNazione) {
+ this.nazione = newNazione;
+ }
+
+ public boolean isFEPaeseCEE() {
+ return false;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/VettoreCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/VettoreCR.java
new file mode 100644
index 00000000..1e193b58
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/VettoreCR.java
@@ -0,0 +1,86 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class VettoreCR extends CRAdapter {
+ private long id_vettore;
+
+ private long id_comune;
+
+ private String descrizione;
+
+ private String indirizzo;
+
+ private String nominativo;
+
+ private String numeroCivico;
+
+ private Comune comune;
+
+ public VettoreCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public VettoreCR() {}
+
+ public void setId_vettore(long newId_vettore) {
+ this.id_vettore = newId_vettore;
+ }
+
+ public void setId_comune(long newId_comune) {
+ this.id_comune = newId_comune;
+ setComune(null);
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public void setIndirizzo(String newIndirizzo) {
+ this.indirizzo = newIndirizzo;
+ }
+
+ public void setNominativo(String newNominativo) {
+ this.nominativo = newNominativo;
+ }
+
+ public void setNumeroCivico(String newNumeroCivico) {
+ this.numeroCivico = newNumeroCivico;
+ }
+
+ public long getId_vettore() {
+ return this.id_vettore;
+ }
+
+ public long getId_comune() {
+ return this.id_comune;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ public String getIndirizzo() {
+ return (this.indirizzo == null) ? "" : this.indirizzo.trim();
+ }
+
+ public String getNominativo() {
+ return (this.nominativo == null) ? "" : this.nominativo.trim();
+ }
+
+ public String getNumeroCivico() {
+ return (this.numeroCivico == null) ? "" : this.numeroCivico.trim();
+ }
+
+ public void setComune(Comune newComune) {
+ this.comune = newComune;
+ }
+
+ public Comune getComune() {
+ this.comune = (Comune)getSecondaryObject(this.comune, Comune.class,
+
+ getId_comune());
+ return this.comune;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Zona.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Zona.java
new file mode 100644
index 00000000..3f9b21e8
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/Zona.java
@@ -0,0 +1,73 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class Zona extends DBAdapter implements Serializable {
+ private static final long serialVersionUID = 1459504014751L;
+
+ private long id_zona;
+
+ private String descrizione;
+
+ public Zona(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public Zona() {}
+
+ public void setId_zona(long newId_zona) {
+ this.id_zona = newId_zona;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_zona() {
+ return this.id_zona;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ protected ResParm checkDeleteCascade() {
+ return new ResParm(true);
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(ZonaCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from ZONA AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ZonaCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ZonaCR.java
new file mode 100644
index 00000000..e31afd8d
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/ZonaCR.java
@@ -0,0 +1,32 @@
+package it.acxent.anag;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class ZonaCR extends CRAdapter {
+ private long id_zona;
+
+ private String descrizione;
+
+ public ZonaCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public ZonaCR() {}
+
+ public void setId_zona(long newId_zona) {
+ this.id_zona = newId_zona;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_zona() {
+ return this.id_zona;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/_AnagAdapter.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/_AnagAdapter.java
new file mode 100644
index 00000000..719b2dc8
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/_AnagAdapter.java
@@ -0,0 +1,1107 @@
+package it.acxent.anag;
+
+import com.lowagie.text.Cell;
+import com.lowagie.text.Chunk;
+import com.lowagie.text.Document;
+import com.lowagie.text.Element;
+import com.lowagie.text.Font;
+import com.lowagie.text.Image;
+import com.lowagie.text.Table;
+import com.lowagie.text.pdf.PdfPCell;
+import com.lowagie.text.pdf.PdfPTable;
+import com.lowagie.text.pdf.PdfWriter;
+import it.acxent.cart.Cart;
+import it.acxent.common.Parm;
+import it.acxent.common.SimboliLavaggio;
+import it.acxent.common.TtFont;
+import it.acxent.contab.TipoDocumento;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.util.PdfFontFactory;
+import it.acxent.util.StringTokenizer;
+import java.awt.Color;
+import java.io.File;
+import java.util.Calendar;
+
+public class _AnagAdapter extends DBAdapter {
+ public static String KEY_ENCODE_DIZ = "Xg3Z5sFQ";
+
+ public static final long SF_BOZZA = 0L;
+
+ public static final long SF_EMESSA = 1L;
+
+ public static final long SF_REG_IVA = 2L;
+
+ public static final String P_CC_LIMITA_AMM = "CC_LIMITA_AMM";
+
+ public static final String P_CC_CHECK_AVAIL = "CC_CHECK_AVAIL";
+
+ public static final String P_CC_QTA_LOW = "CC_QTA_LOW";
+
+ public static final String P_CC_SOSPENDI_DOPO_N_GG_NO_IMPORT = "CC_SOSPENDI_DOPO_N_GG_NO_IMPORT";
+
+ public static final String P_CC_ARROTONDA_PREZZO_A_EURO_SOPRA = "CC_ARROTONDA_PREZZO_A_EURO_SOPRA";
+
+ public static final String P_CC_ARROTONDA_DECIMALE_PER_PREZZI_BASSI = "CC_ARROTONDA_DECIMALE_PER_PREZZI_BASSI";
+
+ public static final String P_CC_RICARICO_MINIMO_OFFERTE = "CC_RICARICO_MINIMO_OFFERTE";
+
+ public static final String P_CC_LINK_WEB_CON_MARCA = "CC_LINK_WEB_CON_MARCA";
+
+ public static final String P_CC_N_ORDINI_WWW_AL_GIORNO = "CC_N_ORDINI_WWW_AL_GIORNO";
+
+ public static final String P_GOOGLE_USE_SFTP = "GOOGLE_USE_SFTP";
+
+ public static final String P_GOOGLE_FTP_USER = "GOOGLE_FTP_USER";
+
+ public static final String P_GOOGLE_FTP_PASSWORD = "GOOGLE_FTP_PASSWORD";
+
+ public static final String P_GOOGLE_PREZZO_PUBBLICO_MINIMO_X_EXPORT = "GOOGLE_PREZZO_PUBBLICO_MINIMO_X_EXPORT";
+
+ public static final String P_GOOGLE_QTA_MINIMA_X_EXPORT = "GOOGLE_QTA_MINIMA_X_EXPORT";
+
+ public static final String C_GOOGLE_FTP_SERVER = "uploads.google.com";
+
+ public static final String C_GOOGLE_SFTP_SERVER = "partnerupload.google.com";
+
+ public static final String C_GOOGLE_SFTP_KNOWN_HOSTS = "[partnerupload.google.com]:19321 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUvACPnrXEiscmd7NoP7diO1w3uP9uGJ55/SDL5eviKZhy/WLTLMGRcJDWj3GPRVdAy2xVVOU4IxUIK8nxdZP5O0s5bJVzT2XRP4IXYKUrPn7AkQlnifP7M0InAMnK7S1KHvwBgWBaGfb0OBeI46a+iKBduCMD9xER6ymTVbcgNzt1o52vNGTUiQp28Q5jUBs3yvQ8Ag7d4U0qEioV95ef4AbjDwO8jV09hQGjBIsTZoMo2Tmo+FVKah2YO0+QFKe1pk5zL2nXlgF7hUxN65lIeS3PhRZzVF80Qe5vXjjuKfiJVkBdSxLoq84uXx6XCjvWci2JbTUbsavoaDO3VBy5";
+
+ public static final int C_GOOGLE_SFTP_PORT = 19321;
+
+ public static final String P_GOOGLE_SIGNIN_ENABLE = "GOOGLE_SIGNIN_ENABLE";
+
+ public static final String P_GOOGLE_SIGNIN_CLIENT_ID = "GOOGLE_SIGNIN_CLIENT_ID";
+
+ public static final String P_FACEBOOK_SIGNIN_ENABLE = "FACEBOOK_SIGNIN_ENABLE";
+
+ public static final String P_FACEBOOK_SIGNIN_CLIENT_ID = "FACEBOOK_SIGNIN_CLIENT_ID";
+
+ public static final String P_FACEBOOK_SIGNIN_SECRET_KEY = "FACEBOOK_SIGNIN_SECRET_KEY";
+
+ public static final String P_SEISOFT_CONTO_RM_IVA_ESENTE = "SEISOFT_CONTO_RM_IVA_ESENTE";
+
+ public static final String P_SEISOFT_CONTO_NOL_AZ = "SEISOFT_CONTO_NOL_AZ";
+
+ public static final String P_SEISOFT_CONTO_RM_IVA_VEND = "SEISOFT_CONTO_RM_IVA_VEND";
+
+ public static final String P_SEISOFT_CONTO_NOL_PRIV = "SEISOFT_CONTO_NOL_PRIV";
+
+ public static final String P_SEISOFT_CONTO_SPESE = "SEISOFT_CONTO_SPESE";
+
+ public static final String P_SEISOFT_CONTO_VEND_AZ = "SEISOFT_CONTO_VEND_AZ";
+
+ public static final String P_SEISOFT_CONTO_VEND_PRIV = "SEISOFT_CONTO_VEND_PRIV";
+
+ public static final String P_SEISOFT_CONTO_VEND_PRIV_USATO = "SEISOFT_CONTO_VEND_PRIV_USATO";
+
+ public static final String P_SEISOFT_CONTO_VEND_AZ_USATO = "SEISOFT_CONTO_VEND_AZ_USATO";
+
+ public static final String P_ORDINI_WEB_ORE_ANNULLAMENTO = "ORDINI_WEB_ORE_ANNULLAMENTO";
+
+ public static final String P_QTA_MINIMA_VISIBILE = "QTA_MINIMA_VISIBILE";
+
+ public static final String P_WEB_SEND_ORDER_MAIL_CODE = "WEB_SEND_ORDER_MAIL_CODE";
+
+ public static final String P_VARIANTI = "VARIANTI";
+
+ public static final String P_MSG_AVVISO_RIP_SMS = "MSG_AVVISO_RIP_SMS";
+
+ public static final String P_MAIL_INVIO_DOC = "MAIL_INVIO_DOC";
+
+ public static final String P_ART_SIMBOLI_LAVAGGIO_DEFAULT = "ART_SIMBOLI_LAVAGGIO_DEFAULT";
+
+ public static final String P_PATH_IMG_TIPO = "PATH_IMG_TIPO";
+
+ public static final String P_PATH_IMG_TAB_TAG = "PATH_IMG_TAB_TAG";
+
+ public static final String P_SERIALI_UNIVOCI = "SERIALI_UNIVOCI";
+
+ public static final String P_USE_SEARCH_LAST_2_OCCURRENCE = "USE_SEARCH_LAST_2_OCCURRENCE";
+
+ public static final String P_CASSA_STAMPA_DISPLAY1 = "CASSA_STAMPA_DISPLAY1";
+
+ public static final String P_CASSA_STAMPA_PROMO = "CASSA_STAMPA_PROMO";
+
+ public static final String P_CASSA_STAMPA_DISPLAY = "CASSA_STAMPA_DISPLAY";
+
+ public static final String P_AZIENDA_CODICE_SIA = "AZIENDA_CODICE_SIA";
+
+ public static final String P_AZIENDA_PIVA = "AZIENDA_PIVA";
+
+ public static final String P_PATH_FILE_RIBA = "PATH_FILE_RIBA";
+
+ public static final String P_CODICE_TIPO_TESSUTO_STD = "CODICE_TIPO_TESSUTO_STD";
+
+ public static final String P_ANAG_DESC_COMPLETA_CON_TIPO = "ANAG_DESC_COMPLETA_CON_TIPO";
+
+ public static final String P_ARTICOLO_CLIENTE = "ARTICOLO_CLIENTE";
+
+ public static final String P_B2B = "B2B";
+
+ protected static final float[] colWidthsRighe20 = new float[] {
+ 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F,
+ 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F, 5.0F };
+
+ protected static final float[] colWidthsRighe40 = new float[] {
+ 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F,
+ 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F,
+ 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F,
+ 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F, 2.5F };
+
+ public static final Font PDF_fGrandissimo = PdfFontFactory.PDF_fGrandissimo;
+
+ public static final Font PDF_fGrandissimoB = PdfFontFactory.PDF_fGrandissimoB;
+
+ public static final Font PDF_fGrandissimoBianco = PdfFontFactory.PDF_fGrandissimoBianco;
+
+ public static final Font PDF_fGrandissimoBlu = PdfFontFactory.PDF_fGrandissimoBlu;
+
+ public static final Font PDF_fGrandissimoRouge = PdfFontFactory.PDF_fGrandissimoRouge;
+
+ public static final Font PDF_fGrande = PdfFontFactory.PDF_fGrande;
+
+ public static final Font PDF_fGrandeB = PdfFontFactory.PDF_fGrandeB;
+
+ public static final Font PDF_fGrandeBianco = PdfFontFactory.PDF_fGrandeBianco;
+
+ public static final Font PDF_fGrandeBlu = PdfFontFactory.PDF_fGrandeBlu;
+
+ public static final Font PDF_fGrandeRouge = PdfFontFactory.PDF_fGrandeRouge;
+
+ public static final Font PDF_fIntestazione = PdfFontFactory.PDF_fIntestazione;
+
+ public static final Font PDF_fMedio = PdfFontFactory.PDF_fMedio;
+
+ public static final Font PDF_fMedioB = PdfFontFactory.PDF_fMedioB;
+
+ public static final Font PDF_fMedioBianco = PdfFontFactory.PDF_fMedioBianco;
+
+ public static final Font PDF_fMedioBlu = PdfFontFactory.PDF_fMedioBlu;
+
+ public static final Font PDF_fMedioRosso = PdfFontFactory.PDF_fMedioRosso;
+
+ public static final Font PDF_fMedioRouge = PdfFontFactory.PDF_fMedioRouge;
+
+ public static final Font PDF_fPiccolissimo = PdfFontFactory.PDF_fPiccolissimo;
+
+ public static final Font PDF_fPiccolissimo6 = PdfFontFactory.PDF_fPiccolissimo6;
+
+ public static final Font PDF_fPiccolissimoB = PdfFontFactory.PDF_fPiccolissimoB;
+
+ public static final Font PDF_fPiccolo = PdfFontFactory.PDF_fPiccolo;
+
+ public static final Font PDF_fPiccoloB = PdfFontFactory.PDF_fPiccoloB;
+
+ public static final Font PDF_fPiccoloBianco = PdfFontFactory.PDF_fPiccoloBianco;
+
+ public static final Font PDF_fPiccoloBlu = PdfFontFactory.PDF_fPiccoloBlu;
+
+ public static final Font PDF_fPiccoloRosso = PdfFontFactory.PDF_fPiccoloRosso;
+
+ public static final Font PDF_H_Grandissimo = PdfFontFactory.PDF_H_Grandissimo;
+
+ public static final Font PDF_H_GrandissimoB = PdfFontFactory.PDF_H_GrandissimoB;
+
+ public static final Font PDF_H_GrandissimoBianco = PdfFontFactory.PDF_H_GrandissimoBianco;
+
+ public static final Font PDF_H_GrandissimoBlu = PdfFontFactory.PDF_H_GrandissimoBlu;
+
+ public static final Font PDF_H_GrandissimoRouge = PdfFontFactory.PDF_H_GrandissimoRouge;
+
+ public static final Font PDF_H_Grande = PdfFontFactory.PDF_H_Grande;
+
+ public static final Font PDF_H_GrandeB = PdfFontFactory.PDF_H_GrandeB;
+
+ public static final Font PDF_H_GrandeBianco = PdfFontFactory.PDF_H_GrandeBianco;
+
+ public static final Font PDF_H_GrandeBlu = PdfFontFactory.PDF_H_GrandeBlu;
+
+ public static final Font PDF_H_GrandeRouge = PdfFontFactory.PDF_H_GrandeRouge;
+
+ public static final Font PDF_H_Intestazione = PdfFontFactory.PDF_H_Intestazione;
+
+ public static final Font PDF_H_Medio = PdfFontFactory.PDF_H_Medio;
+
+ public static final Font PDF_H_MedioB = PdfFontFactory.PDF_H_MedioB;
+
+ public static final Font PDF_H_MedioBianco = PdfFontFactory.PDF_H_MedioBianco;
+
+ public static final Font PDF_H_MedioBlu = PdfFontFactory.PDF_H_MedioBlu;
+
+ public static final Font PDF_H_MedioRosso = PdfFontFactory.PDF_H_MedioRosso;
+
+ public static final Font PDF_H_MedioRouge = PdfFontFactory.PDF_H_MedioRouge;
+
+ public static final Font PDF_H_Piccolissimo = PdfFontFactory.PDF_H_Piccolissimo;
+
+ public static final Font PDF_H_Piccolissimo6 = PdfFontFactory.PDF_H_Piccolissimo6;
+
+ public static final Font PDF_A_PiccolissimoB = PdfFontFactory.PDF_A_PiccolissimoB;
+
+ public static final Font PDF_A_Piccolo = PdfFontFactory.PDF_A_Piccolo;
+
+ public static final Font PDF_A_PiccoloB = PdfFontFactory.PDF_A_PiccoloB;
+
+ public static final Font PDF_A_PiccoloBianco = PdfFontFactory.PDF_A_PiccoloBianco;
+
+ public static final Font PDF_A_PiccoloBlu = PdfFontFactory.PDF_A_PiccoloBlu;
+
+ public static final Font PDF_A_PiccoloRosso = PdfFontFactory.PDF_A_PiccoloRosso;
+
+ protected PdfPTable pdfPcorpo;
+
+ protected Document document;
+
+ protected PdfWriter writer;
+
+ protected Table pdfcorpo;
+
+ public static final String P_ORDINI_WWW_USA_PROG_WWW = "ORDINI_WWW_USA_PROG_WWW";
+
+ public static final String P_ID_DOC_CASSA = "ID_DOC_CASSA";
+
+ public static final String P_LABEL_ANAG_A4_MARGINE = "LABEL_ANAG_A4_MARGINE";
+
+ public static final String P_LABEL_ANAG_A4_COL_ROW = "LABEL_ANAG_A4_COL_ROW";
+
+ public static final String P_LABEL_ART_A4_MARGINE = "LABEL_ART_A4_MARGINE";
+
+ public static final String P_LABEL_ART_A4_COL_ROW = "LABEL_ART_A4_COL_ROW";
+
+ public static final String P_LABEL_PK_LIST_A4_ZEBRA = "LABEL_PK_LIST_A4_ZEBRA";
+
+ public static final String P_LABEL_PK_LIST_A4_COL_ROW = "LABEL_PK_LIST_A4_COL_ROW";
+
+ public static final String P_LABEL_PK_LIST_A4_MARGINE = "LABEL_PK_LIST_A4_MARGINE";
+
+ public static final String P_LABEL_ART_FONT_SIZE = "LABEL_ART_FONT_SIZE";
+
+ public static final String P_LABEL_ART_SIZE = "LABEL_ART_SIZE";
+
+ public static final String P_SCONTO_3_PERCENTUALI = "SCONTO_3_PERCENTUALI";
+
+ public static final String P_STAMPA_BORDI_COLONNE_DOCUMENTO = "STAMPA_BORDI_COLONNE_DOCUMENTO";
+
+ public static final String P_DATA_FATTURA_PRIMA_DISPONIBILE = "DATA_FATTURA_PRIMA_DISPONIBILE";
+
+ public static final String P_DOC_POSIZIONE_NOTA = "DOC_POSIZIONE_NOTA";
+
+ public static final String P_BLOCCO_FATTURE_EMSTA = "BLOCCO_FATTURE_EMSTA";
+
+ public static final String P_DOC_BANCA_APPOGGIO_IBAN = "DOC_BANCA_APPOGGIO_IBAN";
+
+ public static final String P_DOC_BANCA_APPOGGIO_DESC = "DOC_BANCA_APPOGGIO_DESC";
+
+ public static final String P_USA_MAGAZZINO_SU_ARTICOLI = "USA_MAGAZZINO";
+
+ public static final String P_USA_QUANTITA_INTERE = "USA_QUANTITA_INTERE";
+
+ public static final String P_STORNO_ORDINE_A_FORNITORE = "STORNO_ORDINE_A_FORNITORE";
+
+ public static final Font PDF_fMedioGrigio = PdfFontFactory.PDF_fMedioGrigio;
+
+ public static final String P_TAGLIE = "TAGLIE";
+
+ public static final String P_PROGETTISTA_ARTICOLO = "PROGETTISTA_ARTICOLO";
+
+ public static final String P_CASSA_STAMPA_DISPLAY_TIMEOUT = "CASSA_STAMPA_DISPLAY_TIMEOUT";
+
+ public static final String P_DOC_BCC = "DOC_BCC";
+
+ public static final String P_OTTIMIZZO = "OTTIMIZZO";
+
+ public static final String P_PATH_IMG_ART = "PATH_IMG_ART";
+
+ public static final String P_MSG_ORDINE_SPEDITO = "MSG_ORDINE_SPEDITO";
+
+ public static final String P_ID_DOC_ORDINE = "ID_DOC_ORDINE";
+
+ public static final String P_ID_DOC_ORDINE_TAGLIO = "ID_DOC_ORDINE_TAGLIO";
+
+ public static final String P_LABEL_ART_ACC_FONT_SIZE = "LABEL_ART_ACC_FONT_SIZE";
+
+ public static final String P_LABEL_ART_A4_ZEBRA = "LABEL_ART_A4_ZEBRA";
+
+ public static final String P_LABEL_PK_LIST_FONT_SIZE = "LABEL_PK_LIST_FONT_SIZE";
+
+ public static final String P_LABEL_ANAG_SIZE = "LABEL_ANAG_SIZE";
+
+ public static final String P_LABEL_PK_LIST_SIZE = "LABEL_PK_LIST_SIZE";
+
+ public static final String P_LABEL_ANAG_FONT_SIZE = "LABEL_ANAG_FONT_SIZE";
+
+ public static final String P_ART_ATTACH_PATH = "ART_ATTACH_PATH";
+
+ public static final String P_TMPL_MSG_ATTACH_PATH = "TMPL_MSG_ATTACH_PATH";
+
+ public static final String P_MAIL_ADMIN_SCAD_CI = "MAIL_ADMIN_SCAD_CI";
+
+ public static final String P_ID_DOC_ORDINE_WWW = "ID_DOC_ORDINE_WWW";
+
+ public static final String P_ID_DOC_FT_NOLEGGIO = "ID_DOC_FT_NOLEGGIO";
+
+ public static final String P_MAILING_LIST_ON = "MAIL_LIST_ON";
+
+ public static final String P_CLIFOR_ATTACH_PATH = "CLIFOR_ATTACH_PATH";
+
+ public static final String P_DOC_ATTACH_PATH = "DOC_ATTACH_PATH";
+
+ public static final String P_PATH_IMG_BANNER = "PATH_IMG_BANNER";
+
+ public static final String P_MAILING_LIST_MAIL_CR = "MAIL_LIST_MAIL_CR";
+
+ public static final String P_MAILING_LIST_FILE_CR = "MAIL_LIST_FILE_CR";
+
+ public static final String P_MSG_AVVISO_PREN_EMAIL = "MSG_AVVISO_PREN_EMAIL";
+
+ public static final String P_MSG_AVVISO_PREN_SMS = "MSG_AVVISO_PREN_SMS";
+
+ public static final String P_RIP_NOTA_SCHEDA_RIPARAZIONE = "RIP_NOTA_SCHEDA_RIPARAZIONE";
+
+ public static final String P_RIP_NOTA_ACCETTAZIONE_PREVENTIVO = "RIP_NOTA_ACCETTAZIONE_PREVENTIVO";
+
+ public static final String P_DOC_ARTICOLI_CON_CODICE = "DOC_ARTICOLI_CON_CODICE";
+
+ public static final String P_DOC_ARTICOLI_CON_TIPO = "DOC_ARTICOLI_CON_TIPO";
+
+ public static final String P_ID_DOC_RIPARAZIONE = "ID_DOC_RIPARAZIONE";
+
+ public static final String P_MSG_AVVISO_RIP_EMAIL = "MSG_AVVISO_RIP_EMAIL";
+
+ public static final String P_HEAD_SLIP = "HEAD_SLIP";
+
+ public static final String P_ID_DOC_PRENOTAZIONE = "ID_DOC_PRENOTAZIONE";
+
+ public static final String P_ID_DOC_RICEVUTA = "ID_DOC_RICEVUTA";
+
+ public static final String P_COSTO_STIRO_DEFAULT = "COSTO_STIRO_DEFAULT";
+
+ public static final String P_COSTO_SPESE_FISSE_DEFAULT = "COSTO_SPESE_FISSE_DEFAULT";
+
+ public static final String P_PERC_RICARICO_DEFAULT = "PERC_RICARICO_DEFAULT";
+
+ public static final String P_SMS_SERVER = "SMS_SERVER";
+
+ public static final String P_CODA_MESSAGGI_PATH_IMG_MSG = "CODA_MESSAGGI_PATH_IMG_MSG";
+
+ public static final String P_CODA_MESSAGGI_EMAIL_DELAY = "CODA_MESSAGGI_EMAIL_DELAY";
+
+ public static final String P_CODA_MESSAGGI_IMG_URL_BASE = "CODA_MESSAGGI_IMG_URL_BASE";
+
+ public static final String P_CODA_MESSAGGI_SMS_DELAY = "CODA_MESSAGGI_SMS_DELAY";
+
+ public static final String P_CODA_MESSAGGI_USE_EMBEDDED_IMG = "CODA_MESSAGGI_USE_EMBEDDED_IMG";
+
+ public static final String CODA_MESSAGGI_PATH_IMG_MSG = "_img/_imgMsg";
+
+ public static final String P_CODA_MESSAGGI_USE_OPEN_TAG = "CODA_MESSAGGI_USE_OPEN_TAG";
+
+ public static final String P_CODA_MESSAGGI_ATTACH_PATH = "CODA_MESSAGGI_ATTACH_PATH";
+
+ public static final String P_CODA_MESSAGGI_MAIL_FROM = "CODA_MESSAGGI_MAIL_FROM";
+
+ public static final String P_DOC_FONT_ROW_SIZE = "DOC_FONT_ROW_SIZE";
+
+ public static final String P_PERC_RIT_ACCONTO = "PERC_RITENUTA_ACCONTO";
+
+ public static final String P_PERC_CONT_INTEGRATIVO = "PERC_CONT_INTEGRATIVO";
+
+ public static final String P_SMS_PORT = "SMS_PORT";
+
+ public static final String P_SMS_PDU = "SMS_PDU";
+
+ public static final String P_IMPORT_FILE = "ART_IMPORT_FILE";
+
+ public static final String P_MSG_EMAIL_FROM = "MSG_EMAIL_FROM";
+
+ public static final String P_PREZZO_CON_IVA = "PREZZO_CON_IVA";
+
+ public static final Font PDF_fPiccolissimo4B = PdfFontFactory.PDF_fPiccolissimo4B;
+
+ public static final Font PDF_fPiccolissimo5 = PdfFontFactory.PDF_fPiccolissimo5;
+
+ public static final Font PDF_fPiccolissimo6B = PdfFontFactory.PDF_fPiccolissimo6B;
+
+ public static final Font PDF_fPiccolissimo4 = PdfFontFactory.PDF_fPiccolissimo4;
+
+ public static final Font PDF_fPiccolissimo5B = PdfFontFactory.PDF_fPiccolissimo5B;
+
+ public static final String P_DESC_SCONTRINO_FULL = "DESC_SCONTRINO_FULL";
+
+ public static final String P_TAGLIE_LINGUE = "TAGLIE_LINGUE";
+
+ public static final String P_DOC_LEADROW = "DOC_LEADROW";
+
+ public static final String P_DOC_FIRMA_INVIO_FATTURA = "DOC_FIRMA_INVIO_FATTURA";
+
+ public static final String P_HEAD_DOC = "HEAD_DOC";
+
+ public static final String P_TIPO_PAG_SCONTRINO_CON_FATTURA = "TIPO_PAG_SC_CON_FT";
+
+ public static final String P_FOOT_DOC = "FOOT_DOC";
+
+ public static final String P_ESERCIZIO = "ESERCIZIO";
+
+ public static final String P_DBNAME2 = "DBNAME2";
+
+ public static final String P_DBDRIVER2 = "DBDRIVER2";
+
+ public static final String P_USER2 = "USER2";
+
+ public static final String P_PASSWORD2 = "PASSWORD2";
+
+ public static final String P_TESSUTI = "TESSUTI";
+
+ public static final String P_IMMOBILI = "IMMOBILI";
+
+ public static final String P_ASTE = "ASTE";
+
+ public static final String P_DESTINAZIONE = "DESTINAZIONE";
+
+ public static final String P_STAMPA_NOME_DOCUMENTO = "STAMPA_NOME_DOCUMENTO";
+
+ public static final String P_STAMPA_INDENTAZIONE = "STAMPA_INDENTAZIONE";
+
+ public static final String P_SMS_URL = "SMS_URL";
+
+ public static final String P_SMS_USER = "SMS_USER";
+
+ public static final String P_SMS_PASS = "SMS_PASS";
+
+ public static final String P_TIPO_FATTURE_VENDITA = "TIPO_FATTURE_VENDITA";
+
+ public static final String P_TIPO_FATTURE_ACQUISTO = "TIPO_FATTURE_ACQUISTO";
+
+ public static final String P_RIGA_DOC_CODICE_ARTICOLO_ESPLICITO = "RIGA_DOC_CODICE_ARTICOLO_ESPLICITO";
+
+ public static final String P_AGENTI_ON = "AGENTI_ON";
+
+ public static final String P_ATR_ON = "ATR_ON";
+
+ public static final String P_FATTURA_ELETTRONICA_ON = "FATTURA_ELETTRONICA_ON";
+
+ public static final String P_SEO_VERSION = "SEO_VERSION";
+
+ public static final String P_MNU_DOC_STD = "MNU_DOC_STD";
+
+ public static final String P_MNU_COAVE = "MNU_COAVE";
+
+ public static final String P_MNU_TESSITURA = "MNU_TESSITURA";
+
+ public static final String P_MNU_NEWSLETTER = "MNU_NEWSLETTER";
+
+ public static final String P_MNU_NEWS = "MNU_NEWS";
+
+ public static final String P_MNU_FILATI = "MNU_FILATI";
+
+ public static final String P_MNU_CONFEZIONE = "MNU_CONFEZIONE";
+
+ public static final String P_MNU_LAVORAZIONI = "MNU_LAVORAZIONI";
+
+ public static final String P_MNU_TESSUTI = "MNU_TESSUTI";
+
+ public static final String P_MNU_BANNER = "MNU_BANNER";
+
+ public static final String P_MNU_CONTRATTI = "MNU_CONTRATTI";
+
+ public static final String P_MNU_WWW = "MNU_WWW";
+
+ public static final String P_MNU_CONFIG_ANAG = "MNU_CONFIG_ANAG";
+
+ public static final String P_MNU_CONFIG_ART = "MNU_CONFIG_ART";
+
+ public static final String P_MNU_CONFIG_CONTAB = "MNU_CONFIG_CONTAB";
+
+ public static final String P_MNU_CONFIG_ADMIN = "MNU_CONFIG_ADMIN";
+
+ public static final String P_MNU_GEST_ARTICOLI = "MNU_GEST_ARTICOLI";
+
+ public static final String P_MNU_GEST_CONTATTI = "MNU_GEST_CONTATTI";
+
+ public static final String P_MNU_GEST_SCADENZE = "MNU_GEST_SCADENZE";
+
+ public static final String P_MNU_GEST_PAGAMENTI = "MNU_GEST_PAGAMENTI";
+
+ public static final String P_MNU_GEST_RIBA = "MNU_GEST_RIBA";
+
+ public static final String P_MNU_CC = "MNU_CC";
+
+ public static final String P_MNU_FACE = "MNU_FACE";
+
+ public static final String P_MNU_FR = "MNU_FR";
+
+ public static final String P_MNU_M_DOC_STD = "MNU_M_DOC_STD";
+
+ public static final String P_MNU_M_COAVE = "MNU_M_COAVE";
+
+ public static final String P_MNU_M_CASSA = "MNU_M_CASSA";
+
+ public static final String P_MNU_M_PRENOTAZIONI = "MNU_M_PRENOTAZIONI";
+
+ public static final String P_MNU_M_EBAY = "MNU_M_EBAY";
+
+ public static final String P_MNU_M_RIPARAZIONI = "MNU_M_RIPARAZIONI";
+
+ public static final String P_MNU_M_ORDINI = "MNU_M_ORDINI";
+
+ public static final String P_MNU_M_FILATI = "MNU_M_FILATI";
+
+ public static final String P_MNU_M_CONFEZIONE = "MNU_M_CONFEZIONE";
+
+ public static final String P_MNU_M_TESSUTI = "MNU_M_TESSUTI";
+
+ public static final String P_MNU_M_TESSITURA = "MNU_M_TESSITURA";
+
+ public static final String P_MNU_M_TESSITURA_PRODUZIONE = "MNU_M_TESSITURA_PRODUZIONE";
+
+ public static final String P_MNU_M_ARTICOLI = "MNU_M_ARTICOLI";
+
+ public static final String P_MNU_M_CC = "MNU_M_CC";
+
+ public static final String P_MNU_M_CC_GODMODE = "MNU_CC_GODMODE";
+
+ public static final String P_MNU_M_FACE = "MNU_M_FACE";
+
+ public static final String P_MNU_M_FR = "MNU_M_FR";
+
+ private static Iva ivaArt8A;
+
+ private static Iva ivaArt8C;
+
+ private static Iva ivaArt41;
+
+ private static Iva ivaArt58;
+
+ private static Iva ivaStdVendita;
+
+ private static Iva ivaEsenteBolli;
+
+ private static Iva ivaReverseCharge;
+
+ private static Iva ivaRegimeMargine;
+
+ public _AnagAdapter() {}
+
+ public _AnagAdapter(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ protected ResParm checkDeleteCascade() {
+ return new ResParm(true);
+ }
+
+ protected void deleteCascade() {}
+
+ public long getCodiceIvaEsenteBolli() {
+ return getParm("CODICE_IVA_ESENTE").getNumeroLong();
+ }
+
+ public long getCodiceIvaCeeAziendaArt41() {
+ return getParm("CODICE_IVA_CEE_AZIENDA_ART41").getNumeroLong();
+ }
+
+ protected long getCurrentEsercizio() {
+ Calendar cal = Calendar.getInstance();
+ return (long)cal.get(1);
+ }
+
+ protected String getAdminMail() {
+ String temp = getParm("BCC").getTesto();
+ return temp;
+ }
+
+ protected boolean useNullFor0() {
+ return false;
+ }
+
+ protected String getCheckOutMailMessage(String lang) {
+ String temp = getParm(Cart.P_CHECKOUTMSG).getTesto();
+ if (lang != null && !lang.isEmpty()) {
+ int dot = temp.lastIndexOf(".");
+ if (dot > 0)
+ temp = temp.substring(0, dot) + "_" + temp.substring(0, dot) + lang.toLowerCase();
+ }
+ return temp;
+ }
+
+ protected String getAllarmeOrdineEbayMessage() {
+ return "/mailMessage/allarmeEbay.html";
+ }
+
+ protected String getResoMailMessage(String lang) {
+ String temp = getParm(Parm.P_RESOMSG).getTesto();
+ if (lang != null && !lang.isEmpty()) {
+ int dot = temp.lastIndexOf(".");
+ if (dot > 0)
+ temp = temp.substring(0, dot) + "_" + temp.substring(0, dot) + lang.toLowerCase();
+ }
+ return temp;
+ }
+
+ protected void prepareNewPdfPcorpoDocument() {
+ try {
+ this.pdfPcorpo = new PdfPTable(40);
+ this.pdfPcorpo.setWidthPercentage(100.0F);
+ this.pdfPcorpo.setWidths(colWidthsRighe40);
+ } catch (Exception e) {
+ handleDebug(e, 2);
+ }
+ }
+
+ public PdfPTable getPdfPcorpo() {
+ return this.pdfPcorpo;
+ }
+
+ public void setPdfPcorpo(PdfPTable corpo) {
+ this.pdfPcorpo = corpo;
+ }
+
+ public Document getDocument() {
+ return this.document;
+ }
+
+ public void setDocument(Document document) {
+ this.document = document;
+ }
+
+ public PdfWriter getWriter() {
+ return this.writer;
+ }
+
+ public void setWriter(PdfWriter writer) {
+ this.writer = writer;
+ }
+
+ protected void prepareNewPdfCorpoDocument() {
+ this.pdfcorpo = getNewPdfCorpoDocument();
+ }
+
+ protected Table getNewPdfCorpoDocument() {
+ Table l_pdfcorpo = null;
+ try {
+ l_pdfcorpo = new Table(40);
+ l_pdfcorpo.setWidth(100.0F);
+ l_pdfcorpo.setBorder(0);
+ l_pdfcorpo.setBorderWidth(0.0F);
+ l_pdfcorpo.setBorderColor(new Color(255, 255, 255));
+ l_pdfcorpo.setPadding(2.0F);
+ l_pdfcorpo.setSpacing(0.0F);
+ l_pdfcorpo.setWidths(colWidthsRighe40);
+ } catch (Exception e) {
+ handleDebug(e, 2);
+ }
+ return l_pdfcorpo;
+ }
+
+ public Table getPdfcorpo() {
+ return this.pdfcorpo;
+ }
+
+ public void setPdfcorpo(Table pdfcorpo) {
+ this.pdfcorpo = pdfcorpo;
+ }
+
+ public TipoPagamento getTipoPagamentoScontrinoConFattura() {
+ TipoPagamento tp = new TipoPagamento(getApFull());
+ tp.findByPrimaryKey(getParm("TIPO_PAG_SC_CON_FT").getNumeroLong());
+ return tp;
+ }
+
+ protected int getDocFontRowSize() {
+ return getParm("DOC_FONT_ROW_SIZE").getNumeroInt();
+ }
+
+ protected int getDocFontRowSize(TipoDocumento tipoDocumento) {
+ if (tipoDocumento.getDocFontSizeRow() > 0L)
+ return (int)tipoDocumento.getDocFontSizeRow();
+ return getParm("DOC_FONT_ROW_SIZE").getNumeroInt();
+ }
+
+ protected int getDocLeadRow() {
+ return getParm("DOC_LEADROW").getNumeroInt();
+ }
+
+ protected long getDocPosizioneNota() {
+ return getParm("DOC_POSIZIONE_NOTA").getNumeroLong();
+ }
+
+ public boolean usaPrezzoConIva() {
+ return getParm("PREZZO_CON_IVA").isTrue();
+ }
+
+ protected int getImgLogoWidth() {
+ return (int)getDocLogoWidth();
+ }
+
+ public String getMailSubject() {
+ if (getApFull() == null)
+ return "";
+ return getApFull().getResource("SUBJECT");
+ }
+
+ protected SimboliLavaggio getSimboliLavaggioDefault() {
+ String temp = getParm("ART_SIMBOLI_LAVAGGIO_DEFAULT").getTesto();
+ if (temp.isEmpty())
+ return null;
+ try {
+ SimboliLavaggio simboliLavaggio = new SimboliLavaggio();
+ StringTokenizer st = new StringTokenizer(temp, ",");
+ if (st.hasMoreTokens()) {
+ temp = st.nextToken().trim();
+ simboliLavaggio.setLavaggio(Long.valueOf(temp).longValue());
+ }
+ if (st.hasMoreTokens()) {
+ temp = st.nextToken().trim();
+ simboliLavaggio.setCandeggio(Long.valueOf(temp).longValue());
+ }
+ if (st.hasMoreTokens()) {
+ temp = st.nextToken().trim();
+ simboliLavaggio.setAsciugatura(Long.valueOf(temp).longValue());
+ }
+ if (st.hasMoreTokens()) {
+ temp = st.nextToken().trim();
+ simboliLavaggio.setStiratura(Long.valueOf(temp).longValue());
+ }
+ if (st.hasMoreTokens()) {
+ temp = st.nextToken().trim();
+ simboliLavaggio.setPulituraSecco(Long.valueOf(temp).longValue());
+ }
+ return simboliLavaggio;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ protected String getMessaggioAvvisoRiparazioneEmail() {
+ return getParm("MSG_AVVISO_RIP_EMAIL").getTesto();
+ }
+
+ public String getMessaggioDocumentiEmailFrom() {
+ return getParm("MSG_EMAIL_FROM").getTesto();
+ }
+
+ protected String getMessaggioAvvisoPrenotazioneSms() {
+ return getParm("MSG_AVVISO_PREN_SMS").getTesto();
+ }
+
+ protected String getMessaggioAvvisoRiparazioneSms() {
+ return getParm("MSG_AVVISO_RIP_SMS").getTesto();
+ }
+
+ protected String getSmsServer() {
+ return getParm("SMS_SERVER").getTesto();
+ }
+
+ protected int getSmsPort() {
+ return getParm("SMS_PORT").getNumeroInt();
+ }
+
+ protected float getRectDocumentoH(String L_TIPO) {
+ return getRectDocumento(L_TIPO, 3);
+ }
+
+ private float getRectDocumento(String L_TIPO, int theVaule) {
+ StringTokenizer temp = new StringTokenizer(getParm(L_TIPO).getTesto(), ",");
+ if (temp.countToken() != 4)
+ return 0.0F;
+ try {
+ return Float.parseFloat(temp.getToken(theVaule));
+ } catch (Exception e) {
+ handleDebug(e, 2);
+ return 0.0F;
+ }
+ }
+
+ protected float getRectDocumentoY(String L_TIPO) {
+ return getRectDocumento(L_TIPO, 1);
+ }
+
+ protected float getRectDocumentoW(String L_TIPO) {
+ return getRectDocumento(L_TIPO, 2);
+ }
+
+ protected float getRectDocumentoX(String L_TIPO) {
+ return getRectDocumento(L_TIPO, 0);
+ }
+
+ protected boolean isSmsPdu() {
+ return (getParm("SMS_PDU").getNumeroInt() == 1);
+ }
+
+ public Font getFont(String baseFont, int size, int type, Color theColor) {
+ return TtFont.getInstance(getApFull()).getFont(baseFont, size, type, theColor);
+ }
+
+ protected int getStringValueCase(String l_colomnName) {
+ return super.getStringValueCase(l_colomnName);
+ }
+
+ protected long getId_docCassa() {
+ return getParm("ID_DOC_CASSA").getNumeroLong();
+ }
+
+ protected long getId_docOrdine() {
+ return getParm("ID_DOC_ORDINE").getNumeroLong();
+ }
+
+ public long getId_docOrdineTaglio() {
+ return getParm("ID_DOC_ORDINE_TAGLIO").getNumeroLong();
+ }
+
+ protected long getId_docPrenotazione() {
+ return getParm("ID_DOC_PRENOTAZIONE").getNumeroLong();
+ }
+
+ protected long getId_docRiparazione() {
+ return getParm("ID_DOC_RIPARAZIONE").getNumeroLong();
+ }
+
+ public long getCodiceIvaArt8_A() {
+ return getParm("CODICE_IVA_ART8_A").getNumeroLong();
+ }
+
+ public long getCodiceIvaArt8_C() {
+ return getParm("CODICE_IVA_EXTRA_CEE_ESP_ABITUALE_ART8_C").getNumeroLong();
+ }
+
+ public long getCodiceIvaItaCeeAziendaArt58() {
+ return getParm("CODICE_IVA_ITA_CEE_AZIENDA_ART58").getNumeroLong();
+ }
+
+ public boolean isIvaEsteroAziendaEsente() {
+ return getParm("IVA_ESTERO_AZIENDA_ESENTE").isTrue();
+ }
+
+ public boolean isIvaCeeOneStopShop() {
+ return getParm("IVA_CEE_ONE_STOP_SHOP").isTrue();
+ }
+
+ public long getCodiceIvaVendStd() {
+ return getParm("CODICE_IVA_STD_VEND").getNumeroLong();
+ }
+
+ public long getCodiceIvaAcquistoStd() {
+ return getParm("CODICE_IVA_STD_ACQ").getNumeroLong();
+ }
+
+ public long getCodiceIvaRegimeMargine() {
+ return getParm("CODICE_IVA_REGIME_MARGINE").getNumeroLong();
+ }
+
+ public long getCodiceTipoTessutoStandard() {
+ return getParm("CODICE_TIPO_TESSUTO_STD").getNumeroLong();
+ }
+
+ public long getCodiceIvaReverseCharge() {
+ return getParm("CODICE_IVA_REVERSE_CHARGE").getNumeroLong();
+ }
+
+ public String getPathAllegato() {
+ return getDocBase() + getDocBase() + getParm("CLIFOR_ATTACH_PATH").getTesto();
+ }
+
+ public long getId_docOrdineWWW() {
+ return getParm("ID_DOC_ORDINE_WWW").getNumeroLong();
+ }
+
+ public long getId_docFtNoleggio() {
+ return getParm("ID_DOC_FT_NOLEGGIO").getNumeroLong();
+ }
+
+ public boolean isPercentualiSconto3() {
+ return getParm("SCONTO_3_PERCENTUALI").isTrue();
+ }
+
+ protected Document creaIntestazioneReportPdfPTable(String titolo, String sottoTitolo) {
+ int cellLeading = 12;
+ int pdfCorpoPadding = 2;
+ try {
+ PdfPCell rigaVuota = new PdfPCell();
+ rigaVuota.setVerticalAlignment(4);
+ rigaVuota.setHorizontalAlignment(0);
+ rigaVuota.setBorder(0);
+ rigaVuota.setColspan(40);
+ this.pdfPcorpo = new PdfPTable(40);
+ this.pdfPcorpo.setWidthPercentage(100.0F);
+ this.pdfPcorpo.setWidths(colWidthsRighe40);
+ if (new File(getDocBase() + getDocBase()).exists()) {
+ Image imgLogo = Image.getInstance(getDocBase() + getDocBase());
+ imgLogo.scaleToFit(100.0F, 100.0F);
+ imgLogo.setAlignment(5);
+ PdfPCell cell = new PdfPCell();
+ cell.addElement(new Chunk(imgLogo, -10.0F, -15.0F));
+ cell.setBorder(0);
+ cell.setColspan(8);
+ this.pdfPcorpo.addCell(cell);
+ } else {
+ PdfPCell cell = new PdfPCell();
+ cell.setBorder(0);
+ cell.setColspan(8);
+ this.pdfPcorpo.addCell(cell);
+ }
+ PdfPCell pdfPCell1 = new PdfPCell();
+ pdfPCell1.addElement(new Chunk("Report: " + titolo, PdfFontFactory.PDF_fGrandeB));
+ pdfPCell1.addElement(new Chunk(sottoTitolo, PdfFontFactory.PDF_fMedio));
+ pdfPCell1.setBorder(0);
+ pdfPCell1.setVerticalAlignment(4);
+ pdfPCell1.setColspan(27);
+ this.pdfPcorpo.addCell(pdfPCell1);
+ pdfPCell1 = new PdfPCell();
+ pdfPCell1.addElement(new Chunk(getDataFormat().format(getToday()), PdfFontFactory.PDF_fGrandeB));
+ pdfPCell1.setBorder(0);
+ pdfPCell1.setVerticalAlignment(6);
+ pdfPCell1.setColspan(5);
+ this.pdfPcorpo.addCell(pdfPCell1);
+ this.pdfPcorpo.addCell(rigaVuota);
+ this.pdfPcorpo.setHeaderRows(2);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ return this.document;
+ }
+
+ protected Document creaIntestazioneReport(String titolo, String sottoTitolo) {
+ int cellLeading = 12;
+ int pdfCorpoPadding = 2;
+ try {
+ Cell rigaVuota = new Cell(new Chunk(" ", PdfFontFactory.PDF_fPiccolissimo));
+ rigaVuota.setVerticalAlignment(4);
+ rigaVuota.setHorizontalAlignment(0);
+ rigaVuota.setLeading((float)cellLeading);
+ rigaVuota.setBorder(0);
+ rigaVuota.setColspan(40);
+ rigaVuota.setRowspan(1);
+ Image imgLogo = Image.getInstance(getDocBase() + getDocBase());
+ imgLogo.scaleToFit(50.0F, 100.0F);
+ imgLogo.setAlignment(5);
+ this.pdfcorpo = new Table(40);
+ this.pdfcorpo.setWidth(100.0F);
+ this.pdfcorpo.setPadding((float)pdfCorpoPadding);
+ this.pdfcorpo.setSpacing(0.0F);
+ this.pdfcorpo.setWidths(colWidthsRighe40);
+ this.pdfcorpo.setBorder(0);
+ Cell cell = new Cell();
+ cell.add(new Chunk(imgLogo, 10.0F, 0.0F));
+ cell.setLeading(12.0F);
+ cell.setBorder(0);
+ cell.setColspan(6);
+ cell.setRowspan(1);
+ this.pdfcorpo.addCell(cell);
+ cell = new Cell(new Chunk("Report: " + titolo, PdfFontFactory.PDF_fGrandeB));
+ cell.add(new Chunk("\n\n" + sottoTitolo, PdfFontFactory.PDF_fMedio));
+ cell.setLeading(12.0F);
+ cell.setBorder(0);
+ cell.setVerticalAlignment(4);
+ cell.setColspan(28);
+ cell.setRowspan(1);
+ this.pdfcorpo.addCell(cell);
+ cell = new Cell(new Chunk(getDataFormat().format(getToday()), PdfFontFactory.PDF_fGrandeB));
+ cell.setLeading(12.0F);
+ cell.setBorder(0);
+ cell.setVerticalAlignment(6);
+ cell.setColspan(6);
+ cell.setRowspan(1);
+ this.pdfcorpo.addCell(cell);
+ this.pdfcorpo.addCell(rigaVuota);
+ this.document.add((Element)this.pdfcorpo);
+ this.pdfcorpo = new Table(40);
+ this.pdfcorpo.setWidth(100.0F);
+ this.pdfcorpo.setPadding((float)pdfCorpoPadding);
+ this.pdfcorpo.setSpacing(0.0F);
+ this.pdfcorpo.setWidths(colWidthsRighe40);
+ this.pdfcorpo.setBorder(0);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ return this.document;
+ }
+
+ public boolean isFatturaElettronicaOn() {
+ return getParm("FATTURA_ELETTRONICA_ON").isTrue();
+ }
+
+ public boolean isCostoSpedizioneFull() {
+ return getParm("CC_COSTO_SPED_FULL").isTrue();
+ }
+
+ protected String getMessaggioAvvisoPrenotazioneEmail() {
+ return getParm("MSG_AVVISO_PREN_EMAIL").getTesto();
+ }
+
+ public double getRatealeImportoMinimo() {
+ return getParm("SELLA_P_CREDIT_IMPORTO_MINIMO").getNumeroDouble();
+ }
+
+ public boolean isRata0Attiva() {
+ return (getParm("CONSEL_RATA0").getNumeroLong() == 1L);
+ }
+
+ public boolean isQuantitaMagazzinoIntere() {
+ return getParm("USA_QUANTITA_INTERE").isTrue();
+ }
+
+ public Iva getIvaArt8A() {
+ if (ivaArt8A == null) {
+ ivaArt8A = new Iva(getApFull());
+ ivaArt8A.findByPrimaryKey(getCodiceIvaArt8_A());
+ }
+ return ivaArt8A;
+ }
+
+ public Iva getIvaRegimeMargine() {
+ if (ivaRegimeMargine == null) {
+ ivaRegimeMargine = new Iva(getApFull());
+ ivaRegimeMargine.findByPrimaryKey(getCodiceIvaRegimeMargine());
+ }
+ return ivaRegimeMargine;
+ }
+
+ public Iva getIvaArt8C() {
+ if (ivaArt8C == null) {
+ ivaArt8C = new Iva(getApFull());
+ ivaArt8C.findByPrimaryKey(getCodiceIvaArt8_C());
+ }
+ return ivaArt8C;
+ }
+
+ public Iva getIvaArt41() {
+ if (ivaArt41 == null) {
+ ivaArt41 = new Iva(getApFull());
+ ivaArt41.findByPrimaryKey(getCodiceIvaCeeAziendaArt41());
+ }
+ return ivaArt41;
+ }
+
+ public Iva getIvaArt58() {
+ if (ivaArt58 == null) {
+ ivaArt58 = new Iva(getApFull());
+ ivaArt58.findByPrimaryKey(getCodiceIvaItaCeeAziendaArt58());
+ }
+ return ivaArt58;
+ }
+
+ public Iva getIvaStdVendita() {
+ if (ivaStdVendita == null) {
+ ivaStdVendita = new Iva(getApFull());
+ ivaStdVendita.findByPrimaryKey(getCodiceIvaVendStd());
+ }
+ return ivaStdVendita;
+ }
+
+ public Iva getIvaEsenteBolli() {
+ if (ivaEsenteBolli == null) {
+ ivaEsenteBolli = new Iva(getApFull());
+ ivaEsenteBolli.findByPrimaryKey(getCodiceIvaEsenteBolli());
+ }
+ return ivaEsenteBolli;
+ }
+
+ public Iva getIvaReverseCharge() {
+ if (ivaReverseCharge == null) {
+ ivaReverseCharge = new Iva(getApFull());
+ ivaReverseCharge.findByPrimaryKey(getCodiceIvaReverseCharge());
+ }
+ return ivaReverseCharge;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/json/JsonComune.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/json/JsonComune.java
new file mode 100644
index 00000000..8856adf7
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/json/JsonComune.java
@@ -0,0 +1,33 @@
+package it.acxent.anag.json;
+
+public class JsonComune {
+ private long id_comune;
+
+ private String descrizione;
+
+ private long lastUpdTmst;
+
+ public long getId_comune() {
+ return this.id_comune;
+ }
+
+ public void setId_comune(long id_tipologiaProdotto) {
+ this.id_comune = id_tipologiaProdotto;
+ }
+
+ public String getDescrizione() {
+ return this.descrizione;
+ }
+
+ public void setDescrizione(String descrizione) {
+ this.descrizione = descrizione;
+ }
+
+ public long getLastUpdTmst() {
+ return this.lastUpdTmst;
+ }
+
+ public void setLastUpdTmst(long lastUpdTmst) {
+ this.lastUpdTmst = lastUpdTmst;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/AspettoSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/AspettoSvlt.java
new file mode 100644
index 00000000..5e127338
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/AspettoSvlt.java
@@ -0,0 +1,34 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Aspetto;
+import it.acxent.anag.AspettoCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/Aspetto.abl"})
+public class AspettoSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = 1998564139944230796L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Aspetto(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new AspettoCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/BancaSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/BancaSvlt.java
new file mode 100644
index 00000000..e3a0f433
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/BancaSvlt.java
@@ -0,0 +1,34 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Banca;
+import it.acxent.anag.BancaCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/Banca.abl"})
+public class BancaSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = -3467685376411981559L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Banca(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new BancaCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/CausaleTrasportoSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/CausaleTrasportoSvlt.java
new file mode 100644
index 00000000..8a0e78c9
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/CausaleTrasportoSvlt.java
@@ -0,0 +1,34 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.CausaleTrasporto;
+import it.acxent.anag.CausaleTrasportoCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/CausaleTrasporto.abl"})
+public class CausaleTrasportoSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = 7302443863816366700L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new CausaleTrasporto(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new CausaleTrasportoCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/ClienteSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/ClienteSvlt.java
new file mode 100644
index 00000000..7e741a7f
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/ClienteSvlt.java
@@ -0,0 +1,39 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Cliente;
+import it.acxent.anag.ClienteCR;
+import it.acxent.anag.TipoPagamento;
+import it.acxent.anag.TipoPagamentoCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.util.ReturnItem;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anag/Cliente.abl"})
+public class ClienteSvlt extends CliforSvlt {
+ private static final long serialVersionUID = 6362096338674911071L;
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Cliente(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new ClienteCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {
+ req.setAttribute("bean", getBean(req));
+ req.setAttribute("listaTipoPagamento", new TipoPagamento(getApFull(req)).findByCR(new TipoPagamentoCR(), 0, 0));
+ req.setAttribute("RI", new ReturnItem(req.getParameter("RI")));
+ }
+
+ protected String getBeanPageName(HttpServletRequest req) {
+ return super.getBeanPageName(req);
+ }
+
+ protected final String getBeanName(HttpServletRequest req) {
+ return "clifor";
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/CliforSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/CliforSvlt.java
new file mode 100644
index 00000000..e1bc26de
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/CliforSvlt.java
@@ -0,0 +1,659 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.AllegatoClifor;
+import it.acxent.anag.Banca;
+import it.acxent.anag.ClienteCR;
+import it.acxent.anag.Clifor;
+import it.acxent.anag.CliforCR;
+import it.acxent.anag.CliforTipoClifor;
+import it.acxent.anag.CliforTipoCliforCR;
+import it.acxent.anag.CliforTipoPagamento;
+import it.acxent.anag.Contatto;
+import it.acxent.anag.Contratto;
+import it.acxent.anag.DestinazioneDiversa;
+import it.acxent.anag.Listino;
+import it.acxent.anag.MagFisico;
+import it.acxent.anag.Ottoxmille;
+import it.acxent.anag.TipoAllegatoClifor;
+import it.acxent.anag.TipoClifor;
+import it.acxent.anag.TipoCliforCR;
+import it.acxent.anag.TipoContratto;
+import it.acxent.anag.TipoPagamento;
+import it.acxent.anag.TipoPagamentoCR;
+import it.acxent.anag.Users;
+import it.acxent.art.ArticoloCliente;
+import it.acxent.contab.DocumentoPagamento;
+import it.acxent.contab.DocumentoPagamentoCR;
+import it.acxent.contab.IncassoPagamento;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.newsletter.CodaMessaggi;
+import it.acxent.newsletter.TemplateMsg;
+import it.acxent.util.AbMessages;
+import it.acxent.util.ReturnItem;
+import it.acxent.util.Vectumerator;
+import java.io.File;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class CliforSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = -6475496069319020839L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ Clifor bean = null;
+ ResParm rp = new ResParm(true, "");
+ long l_id = getRequestLongParameter(req, "id_clifor");
+ bean = new Clifor(apFull);
+ try {
+ bean.findByPrimaryKey(l_id);
+ fillObject(req, bean);
+ rp = bean.save();
+ req.setAttribute("id_clifor", String.valueOf(bean.getId_clifor()));
+ if (rp.getStatus() == true) {
+ if (getAct(req).equals("addDD")) {
+ DestinazioneDiversa row = new DestinazioneDiversa(apFull);
+ fillObject(req, row);
+ rp = bean.addDestinazioneDiversa(row);
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ } else if (getAct(req).equals("delDD")) {
+ DestinazioneDiversa row = new DestinazioneDiversa(apFull);
+ long l_id_destinazioneDiversa = getRequestLongParameter(req, "id_destinazioneDiversa");
+ if (l_id_destinazioneDiversa != 0L) {
+ fillObject(req, row);
+ bean.delDestinazioneDiversa(row);
+ sendMessage(req, "Cancellazione Destinazione Diversa Effettuata");
+ } else {
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_FAIL"));
+ }
+ showBean(req, res);
+ } else if (getAct(req).equals("modDD")) {
+ DestinazioneDiversa row = new DestinazioneDiversa(apFull);
+ long l_id_destinazioneDiversa = getRequestLongParameter(req, "id_destinazioneDiversa");
+ if (l_id_destinazioneDiversa != 0L) {
+ row.findByPrimaryKey(l_id_destinazioneDiversa);
+ req.setAttribute("destinazioneDiversa", row);
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_OK"));
+ } else {
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_FAIL"));
+ }
+ showBean(req, res);
+ } else if (getAct(req).equals("addContratto")) {
+ Contratto row = new Contratto(apFull);
+ fillObject(req, row);
+ rp = bean.addContratto(row);
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ } else if (getAct(req).equals("delContratto")) {
+ Contratto row = new Contratto(apFull);
+ long l_id_row = getRequestLongParameter(req, "id_contratto");
+ if (l_id_row != 0L) {
+ fillObject(req, row);
+ bean.delContratto(row);
+ sendMessage(req, "Cancellazione Contratto Effettuata");
+ } else {
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_FAIL"));
+ }
+ showBean(req, res);
+ } else if (getAct(req).equals("modContratto")) {
+ Contratto row = new Contratto(apFull);
+ long l_id_row = getRequestLongParameter(req, "id_contratto");
+ if (l_id_row != 0L) {
+ row.findByPrimaryKey(l_id_row);
+ req.setAttribute("beanC", row);
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_OK"));
+ } else {
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_FAIL"));
+ }
+ showBean(req, res);
+ } else if (getAct(req).equals("addAllegato")) {
+ AllegatoClifor row = new AllegatoClifor(apFull);
+ fillObject(req, row);
+ rp = bean.addAllegato(row);
+ rp.append(creaFileAllegato(bean, req, res));
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ } else if (getAct(req).equals("delAllegato")) {
+ AllegatoClifor row = new AllegatoClifor(apFull);
+ fillObject(req, row);
+ rp = bean.delAllegato(row);
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "SAVE_OK") + ": Allegato Cancellato");
+ showBean(req, res);
+ } else if (getAct(req).equals("delUser")) {
+ Users row = new Users(apFull);
+ long l_id_users = getRequestLongParameter(req, "id_users");
+ if (l_id_users != 0L) {
+ row.findByPrimaryKey(l_id_users);
+ if (row.getId_clifor() == bean.getId_clifor()) {
+ row.setId_clifor(0L);
+ row.save();
+ sendMessage(req,
+ AbMessages.getMessage(getLocale(req), "SAVE_OK") + ": Utente non più legato al record.");
+ } else {
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "SAVE_FAIL") + ": Utente non legato al record cliente/Fornitore!");
+ }
+ } else {
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "SAVE_FAIL") + ": codice Utente nullo!");
+ }
+ showBean(req, res);
+ }
+ } else {
+ req.setAttribute("bean", bean);
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+ } catch (Exception e) {
+ forceMessage(req, AbMessages.getMessage(getLocale(req), "SAVE_FAIL"));
+ showBean(req, res);
+ }
+ }
+
+ protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ Clifor bean = (Clifor)beanA;
+ req.setAttribute("listaBancaAzienda", new Banca(apFull).findAll());
+ req.setAttribute("listaUserClifor", bean.findUsers(0, 0));
+ req.setAttribute("listaDD", bean.getDestinazioniDiverse());
+ req.setAttribute("listaListini", new Listino(apFull).findNoListinoBase());
+ req.setAttribute("listaTipoContratto", new TipoContratto(apFull).findAll());
+ req.setAttribute("listaContratti", bean.getContratti());
+ req.setAttribute("listaDocumenti", bean.getDocumenti());
+ req.setAttribute("listaTipoPagamento", new TipoPagamento(apFull).findByCR(new TipoPagamentoCR(), 0, 0));
+ req.setAttribute("RI", new ReturnItem(req.getParameter("RI")));
+ req.setAttribute("listaAllegati", bean.getAllegati(0L));
+ req.setAttribute("listaTipiAllegatoClifor", new TipoAllegatoClifor(apFull).findAll());
+ req.setAttribute("listaTipiAllegatoClifor", new TipoAllegatoClifor(apFull).findAll());
+ TipoCliforCR CRT = new TipoCliforCR();
+ CRT.setFlgTipoS(bean.getFlgTipo());
+ req.setAttribute("listaTipoClifor", new TipoClifor(apFull).findByCR(CRT, 0, 0));
+ CliforTipoCliforCR CRCTC = new CliforTipoCliforCR(apFull);
+ CRCTC.setId_clifor(bean.getId_clifor());
+ CRCTC.setFlgTipoClifor(bean.getFlgTipo());
+ req.setAttribute("listaTipologie", new CliforTipoClifor(apFull).findByCR(CRCTC, 0, 0));
+ DocumentoPagamentoCR CRdp = new DocumentoPagamentoCR();
+ if (getRequestLongParameter(req, "flgTipoSaldoMd") > 0L)
+ CRdp.setFlgTipoSaldo(getRequestLongParameter(req, "flgTipoSaldo"));
+ CRdp.setId_clifor(bean.getId_clifor());
+ req.setAttribute("CRDP", CRdp);
+ req.setAttribute("listaPagamenti", new DocumentoPagamento(apFull).findSaldiByCR(CRdp, 0, 0));
+ req.setAttribute("listaClientiAssociati", new Clifor(apFull).findByAgente(bean.getId_clifor()));
+ req.setAttribute("listaContatti", new Contatto(apFull).findByClifor(bean.getId_clifor()));
+ if (bean.getFlgTipo() == "C")
+ req.setAttribute("listaCliforTipoPagamento", new CliforTipoPagamento(apFull).findByClifor(bean.getId_clifor()));
+ if (bean.getFlgTipo() == "F")
+ req.setAttribute("listaMagFisico", new MagFisico(apFull).findByClifor(bean.getId_clifor()));
+ if (getParm("ARTICOLO_CLIENTE").isTrue())
+ req.setAttribute("listaArticoliCliente", new ArticoloCliente(apFull).findByClifor(bean.getId_clifor()));
+ }
+
+ protected void fillComboAfterSearch(CRAdapter CRA, HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ CliforCR CR = (CliforCR)CRA;
+ req.setAttribute("listaTemplateMsg", new TemplateMsg(apFull).findAll());
+ req.setAttribute("listaTipiClifor", new TipoClifor(apFull).findByTipo(CR.getFlgTipo()));
+ }
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Clifor(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new CliforCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ req.setAttribute("listaTipoPagamento", new TipoPagamento(apFull).findByCR(new TipoPagamentoCR(), 0, 0));
+ req.setAttribute("RI", new ReturnItem(req.getParameter("RI")));
+ req.setAttribute("listaTipoContratto", new TipoContratto(apFull).findAll());
+ req.setAttribute("listaTipiClifor", new TipoClifor(apFull).findAll());
+ req.setAttribute("listaOttoxmille", new Ottoxmille(apFull).findAll());
+ }
+
+ protected String getBeanPageName(HttpServletRequest req) {
+ return super.getBeanPageName(req);
+ }
+
+ protected void otherCommands(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ if (getCmd(req).equals("join")) {
+ long l_id_anagrafica = getRequestLongParameter(req, "id_anagrafica");
+ Clifor bean = new Clifor(apFull);
+ bean.findByPrimaryKey(l_id_anagrafica);
+ fillObject(req, bean);
+ bean.save();
+ ResParm rp = Clifor.unisciClifor(bean);
+ if (rp.getStatus()) {
+ sendMessage(req, "Unione Record eseguita correttamente.");
+ req.getSession().removeAttribute(getATTR_CRBEAN(req));
+ } else {
+ sendMessage(req, rp.getMsg());
+ }
+ showBean(req, res);
+ } else if (getCmd(req).equals("creaCodaSms")) {
+ ClienteCR CR = new ClienteCR();
+ fillObject(req, CR);
+ Clifor bean = new Clifor(apFull);
+ Vectumerator vec = bean.findByCR(CR, 0, 0);
+ String l_msg = getRequestParameter(req, "testoMessaggio").trim();
+ int i = 0;
+ int j = 0;
+ ResParm rp = new ResParm(true);
+ if (l_msg.isEmpty()) {
+ rp.setStatus(false);
+ rp.setMsg("ERRORE! Testo del messaggio vuoto!");
+ } else {
+ while (vec.hasMoreElements()) {
+ Clifor row = (Clifor)vec.nextElement();
+ CodaMessaggi cm = new CodaMessaggi(apFull);
+ if (!row.getCellulare().isEmpty()) {
+ cm.setCellulare(row.getCellulare());
+ cm.setFlgTipo(2L);
+ cm.setDataCreazione(DBAdapter.getToday());
+ cm.setTestoMessaggio(l_msg);
+ cm.save();
+ i++;
+ continue;
+ }
+ j++;
+ }
+ }
+ if (rp.getStatus()) {
+ sendMessage(req, "Creazione coda messaggi eseguita correttamente. Creati " + i + " messaggi sms. " + j + " Clienti senza cellulare impostato.");
+ req.getSession().removeAttribute(getATTR_CRBEAN(req));
+ } else {
+ sendMessage(req, rp.getMsg());
+ }
+ search(req, res);
+ } else if (getCmd(req).equals("creaCodaMsg")) {
+ creaCodaMessaggi(req, res);
+ } else if (!getCmd(req).equals("rendiFlag")) {
+ super.otherCommands(req, res);
+ }
+ }
+
+ public void _creaMList(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ CliforCR CR = new CliforCR(apFull);
+ fillObject(req, CR);
+ Clifor bean = new Clifor(apFull);
+ ResParm rp = bean.creaMailingListCR(CR);
+ if (rp.getStatus()) {
+ String fileML = getMailingListFileCR();
+ StringBuilder sb = new StringBuilder();
+ sb.append(rp.getMsg());
+ sb.append(" ");
+ sb.append("File Mailing list: " + fileML + " ");
+ sendHtmlMsgResponse(req, res, sb.toString());
+ } else {
+ sendHtmlMsgResponse(req, res, "Errore creazione mailing list!!");
+ }
+ }
+
+ protected void creaCodaMessaggi(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ Clifor bean = new Clifor(apFull);
+ CliforCR CR = new CliforCR(apFull);
+ fillObject(req, CR);
+ long l_id_templateMsg = getRequestLongParameter(req, "id_templateMsg");
+ bean.creaCodaMessaggi(CR, l_id_templateMsg);
+ sendMessage(req, "Coda messaggi creata...");
+ search(req, res);
+ }
+
+ protected ResParm creaFileAllegato(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
+ synchronized (this) {
+ ResParm rp = new ResParm(true, "");
+ Clifor bean = (Clifor)beanA;
+ String targetDir = bean.getPathAllegato();
+ File pathDir = new File(targetDir);
+ if (!pathDir.exists())
+ pathDir.mkdirs();
+ String targetFile = targetDir + "/" + targetDir + "_";
+ Vectumerator completeFileNames = (Vectumerator)req.getAttribute("completeAttachName");
+ Vectumerator fileNames = (Vectumerator)req.getAttribute("attachName");
+ if (completeFileNames.hasMoreElements()) {
+ String sourceFile = (String)completeFileNames.nextElement();
+ String fileName = (String)fileNames.elementAt(0);
+ targetFile = targetFile + targetFile;
+ if (isFileExist(sourceFile)) {
+ new File(targetFile).delete();
+ new File(sourceFile).renameTo(new File(targetFile));
+ }
+ }
+ return rp;
+ }
+ }
+
+ protected boolean isLoadImageServlet() {
+ return true;
+ }
+
+ protected void print(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ if (getAct(req).equals("lblInd")) {
+ long l_id = 0L;
+ Clifor bean = null;
+ l_id = getRequestLongParameter(req, "id_clifor");
+ bean = new Clifor(getApFull(req));
+ bean.findByPrimaryKey(l_id);
+ sendPdf(res, bean.creaPdfEtichettaZebra(""), "Etichetta " + bean.getCognomeNome() + ".pdf");
+ } else {
+ search(req, res);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void _checkPiva(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ Clifor bean = new Clifor(getApFull(req));
+ bean.findByPrimaryKey(getRequestLongParameter(req, "id_clifor"));
+ bean.setPIva(getRequestParameter(req, "pIva"));
+ StringBuilder sb = new StringBuilder();
+ if (!bean.isPivaComunitariaOk())
+ sb.append("Partita Iva Comunitaria NON VERIFICATA! ");
+ if (bean.isPIvaDuplicated())
+ sb.append("Partita Iva duplicata!");
+ if (sb.length() == 0) {
+ req.setAttribute("res", "OK");
+ } else {
+ sb.insert(0, "ATTENZIONE! ");
+ req.setAttribute("msg", sb.toString());
+ }
+ sendCmdJspFetchPageResponse(req, res);
+ } catch (Exception e) {
+ handleDebug(e);
+ }
+ }
+
+ public void _modDocumento(HttpServletRequest req, HttpServletResponse res) {
+ IncassoPagamento ip = new IncassoPagamento(getApFull(req));
+ fillObject(req, ip);
+ req.setAttribute("listaIncassi", ip.findByDocumento(ip.getId_documento(), 0, 0));
+ req.setAttribute("beanIP", ip);
+ showBean(req, res);
+ }
+
+ public void _modIncasso(HttpServletRequest req, HttpServletResponse res) {
+ long id_incassoPagamento = getRequestLongParameter(req, "id_incassoPagamento");
+ IncassoPagamento ip = new IncassoPagamento(getApFull(req));
+ ip.findByPrimaryKey(id_incassoPagamento);
+ req.setAttribute("listaIncassi", ip.findByDocumento(ip.getId_documento(), 0, 0));
+ req.setAttribute("beanIP", ip);
+ showBean(req, res);
+ }
+
+ public void _addIncasso(HttpServletRequest req, HttpServletResponse res) {
+ long id_incassoPagamento = getRequestLongParameter(req, "id_incassoPagamento");
+ IncassoPagamento ip = new IncassoPagamento(getApFull(req));
+ ip.findByPrimaryKey(id_incassoPagamento);
+ fillObject(req, ip);
+ ResParm rp = ip.save();
+ req.setAttribute("listaIncassi", ip.findByDocumento(ip.getId_documento(), 0, 0));
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+
+ public void _delIncasso(HttpServletRequest req, HttpServletResponse res) {
+ long id_incassoPagamento = getRequestLongParameter(req, "id_incassoPagamento");
+ IncassoPagamento ip = new IncassoPagamento(getApFull(req));
+ ip.findByPrimaryKey(id_incassoPagamento);
+ ResParm rp = ip.delete();
+ req.setAttribute("listaIncassi", ip.findByDocumento(ip.getId_documento(), 0, 0));
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+
+ public void _printLista(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ CliforCR CR = new CliforCR(getApFull());
+ Clifor bean = new Clifor(getApFull());
+ fillObject(req, CR);
+ sendPdf(res, bean.creaPdfListaClifor(CR), "Lista_Clifor.pdf");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void _delAllegato(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ Clifor bean = new Clifor(apFull);
+ long l_id_clifor = getRequestLongParameter(req, "id_clifor");
+ bean.findByPrimaryKey(l_id_clifor);
+ AllegatoClifor row = new AllegatoClifor(apFull);
+ fillObject(req, row);
+ bean.delAllegato(row);
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "SAVE_OK") + ": Allegato Cancellato");
+ showBean(req, res);
+ }
+
+ public void _delContatto(HttpServletRequest req, HttpServletResponse res) {
+ long id_contatto = getRequestLongParameter(req, "id_contatto");
+ Contatto contatto = new Contatto(getApFull(req));
+ contatto.findByPrimaryKey(id_contatto);
+ ResParm rp = contatto.delete();
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+
+ public void _modifyContatto(HttpServletRequest req, HttpServletResponse res) {
+ long id_contatto = getRequestLongParameter(req, "id_contatto");
+ Contatto contatto = new Contatto(getApFull(req));
+ contatto.findByPrimaryKey(id_contatto);
+ req.setAttribute("beanContatto", contatto);
+ ResParm rp = contatto.save();
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+
+ public void _addContatto(HttpServletRequest req, HttpServletResponse res) {
+ long id_contatto = getRequestLongParameter(req, "id_contatto");
+ Contatto contatto = new Contatto(getApFull(req));
+ contatto.findByPrimaryKey(id_contatto);
+ fillObject(req, contatto);
+ ResParm rp = contatto.save();
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+
+ public void _pivaCee(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ Clifor bean = new Clifor(apFull);
+ long l_id_clifor = getRequestLongParameter(req, "id_clifor");
+ bean.findByPrimaryKey(l_id_clifor);
+ if (bean.getId_clifor() > 0L) {
+ String piva = "1" + DBAdapter.zeroLeft(bean.getId_clifor(), 10);
+ req.setAttribute("codFisc", piva);
+ } else {
+ sendMessage(req, "Errore! Utente non ancora salvato");
+ }
+ req.setAttribute("act", "refresh");
+ showBean(req, res);
+ }
+
+ public void _printPdf(HttpServletRequest req, HttpServletResponse res) {
+ try {
+ CliforCR CR = new CliforCR(getApFull());
+ Clifor bean = new Clifor(getApFull());
+ fillObject(req, CR);
+ sendPdf(res, bean.creaPdfListaClifor(CR), "Lista_Clifor.pdf");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void _addAllegato(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ Clifor bean = new Clifor(apFull);
+ long l_id_clifor = getRequestLongParameter(req, "id_clifor");
+ bean.findByPrimaryKey(l_id_clifor);
+ String fileName = getRequestParameter(req, "fileNameOnServer_1");
+ if (!fileName.isEmpty()) {
+ String targetDir = bean.getPathAllegato();
+ File pathDir = new File(targetDir);
+ if (!pathDir.exists())
+ pathDir.mkdirs();
+ String targetFile = targetDir + "/" + targetDir + "_" + bean.getId_clifor();
+ String sourceFile = getPathTmpFull() + getPathTmpFull();
+ if (isFileExist(sourceFile)) {
+ new File(targetFile).delete();
+ new File(sourceFile).renameTo(new File(targetFile));
+ }
+ AllegatoClifor row = new AllegatoClifor(apFull);
+ fillObject(req, row);
+ row.setNomeFile(fileName);
+ ResParm rp = bean.addAllegato(row);
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ } else {
+ HashMap uploadedImages = (HashMap)req.getAttribute("_UFN");
+ String currentFullFileName = "", currentFileName = "";
+ if (!uploadedImages.isEmpty()) {
+ Iterator> iterator = uploadedImages.entrySet().iterator();
+ if (iterator.hasNext()) {
+ Map.Entry entry = iterator.next();
+ currentFullFileName = entry.getValue();
+ currentFileName = entry.getKey();
+ }
+ }
+ fileName = currentFileName;
+ String targetDir = bean.getPathAllegato();
+ File pathDir = new File(targetDir);
+ if (!pathDir.exists())
+ pathDir.mkdirs();
+ String targetFile = targetDir + "/" + targetDir + "_" + bean.getId_clifor();
+ String sourceFile = currentFullFileName;
+ if (isFileExist(sourceFile)) {
+ new File(targetFile).delete();
+ new File(sourceFile).renameTo(new File(targetFile));
+ }
+ AllegatoClifor row = new AllegatoClifor(apFull);
+ fillObject(req, row);
+ row.setNomeFile(fileName);
+ ResParm rp = bean.addAllegato(row);
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+ }
+
+ public void _pivaExtraCee(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ Clifor bean = new Clifor(apFull);
+ long l_id_clifor = getRequestLongParameter(req, "id_clifor");
+ bean.findByPrimaryKey(l_id_clifor);
+ if (bean.getId_clifor() > 0L) {
+ String piva = "EX1" + DBAdapter.zeroLeft(bean.getId_clifor(), 8);
+ req.setAttribute("codFisc", piva);
+ } else {
+ sendMessage(req, "Errore! Utente non ancora salvato");
+ }
+ req.setAttribute("act", "refresh");
+ showBean(req, res);
+ }
+
+ protected ResParm afterSave(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ Clifor bean = (Clifor)beanA;
+ if (getRequestLongParameter(req, "id_tipoCliforE") > 0L) {
+ CliforTipoClifor ctc = new CliforTipoClifor(apFull);
+ ctc.setId_clifor(bean.getId_clifor());
+ ctc.setId_tipoClifor(getRequestLongParameter(req, "id_tipoCliforE"));
+ bean.addTipologia(ctc);
+ }
+ return super.afterSave(beanA, req, res);
+ }
+
+ public void _addArticoloCliente(HttpServletRequest req, HttpServletResponse res) {
+ long l_id = getRequestLongParameter(req, "id_articoloCliente");
+ ArticoloCliente bean = new ArticoloCliente(getApFull(req));
+ bean.findByPrimaryKey(l_id);
+ fillObject(req, bean);
+ ResParm rp = bean.save();
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+
+ public void _delArticoloCliente(HttpServletRequest req, HttpServletResponse res) {
+ long l_id = getRequestLongParameter(req, "id_articoloCliente");
+ ArticoloCliente bean = new ArticoloCliente(getApFull(req));
+ bean.findByPrimaryKey(l_id);
+ ResParm rp = bean.delete();
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+
+ public void _addTipoPagamento(HttpServletRequest req, HttpServletResponse res) {
+ long id_cliforTipoPagamento = getRequestLongParameter(req, "id_cliforTipoPagamento");
+ CliforTipoPagamento ctp = new CliforTipoPagamento(getApFull(req));
+ ctp.findByPrimaryKey(id_cliforTipoPagamento);
+ fillObject(req, ctp);
+ ctp.setId_tipoPagamento(getRequestLongParameter(req, "id_tipoPagamentoCli"));
+ ResParm rp = ctp.save();
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+
+ public void _delTipoPagamento(HttpServletRequest req, HttpServletResponse res) {
+ long id_cliforTipoPagamento = getRequestLongParameter(req, "id_cliforTipoPagamento");
+ CliforTipoPagamento ctp = new CliforTipoPagamento(getApFull(req));
+ ctp.findByPrimaryKey(id_cliforTipoPagamento);
+ ResParm rp = ctp.delete();
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+
+ public void _addTipologia(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ long id_ = getRequestLongParameter(req, "id_tipoCliforAdd");
+ CliforTipoClifor row = new CliforTipoClifor(apFull);
+ fillObject(req, row);
+ row.setId_tipoClifor(id_);
+ ResParm rp = row.getClifor().addTipologia(row);
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+
+ public void _delTipologia(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ long id_ = getRequestLongParameter(req, "id_tipoCliforAdd");
+ CliforTipoClifor row = new CliforTipoClifor(apFull);
+ fillObject(req, row);
+ row.setId_tipoClifor(id_);
+ ResParm rp = row.getClifor().delTipologia(row);
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+
+ public void _cambiaFlg(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ Clifor bean = new Clifor(apFull);
+ long l_id = getRequestLongParameter(req, "id_cliforF");
+ String l_flg = getRequestParameter(req, "flg");
+ bean.findByPrimaryKey(l_id);
+ ResParm rp = bean.cambiaFlg(l_flg);
+ if (rp.getStatus()) {
+ sendMessage(req, "Aggiornamento Effettuato");
+ } else {
+ sendMessage(req, "Errore! " + rp.getMsg());
+ }
+ req.setAttribute("id_articolo", "0");
+ search(req, res);
+ }
+
+ public void _creaReportCsv(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ CliforCR CR = new CliforCR(apFull);
+ fillObject(req, CR);
+ Clifor bean = new Clifor(apFull);
+ bean.creaFileCvs(CR);
+ sendHtmlMsgResponse(req, res, "File export in formato cvs (Excel) ");
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/ComuneSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/ComuneSvlt.java
new file mode 100644
index 00000000..2fc82be3
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/ComuneSvlt.java
@@ -0,0 +1,37 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Comune;
+import it.acxent.anag.ComuneCR;
+import it.acxent.anag.Regione;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/Comune.abl"})
+public class ComuneSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = 2669230498808295583L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {
+ req.setAttribute("listaRegione", new Regione(getApFull(req)).findAll());
+ }
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Comune(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new ComuneCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/ContatoreSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/ContatoreSvlt.java
new file mode 100644
index 00000000..75ab26fc
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/ContatoreSvlt.java
@@ -0,0 +1,34 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Contatore;
+import it.acxent.anag.ContatoreCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/Contatore.abl"})
+public class ContatoreSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = -3235127453420156540L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Contatore(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new ContatoreCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/ContrattoSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/ContrattoSvlt.java
new file mode 100644
index 00000000..af4524b8
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/ContrattoSvlt.java
@@ -0,0 +1,96 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Contratto;
+import it.acxent.anag.ContrattoCR;
+import it.acxent.anag.TipoContratto;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.newsletter.TemplateMsg;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anag/Contratto.abl"})
+public class ContrattoSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = -1708108941973176059L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {
+ req.setAttribute("listaTipoContratto", new TipoContratto(getApFull(req))
+ .findAll());
+ }
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ req.setAttribute("listaTipoContratto", new TipoContratto(apFull)
+ .findAll());
+ req.setAttribute("listaTemplateMsg", new TemplateMsg(apFull)
+ .findAll());
+ }
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Contratto(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new ContrattoCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ req.setAttribute("listaTipoContratto", new TipoContratto(apFull)
+ .findAll());
+ Contratto bean = new Contratto(apFull);
+ bean.setId_clifor(getRequestLongParameter(req, "id_clifor"));
+ req.setAttribute("bean", bean);
+ }
+
+ protected void otherCommands(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ if (getCmd(req).equals("crea1CodaSmsD") ||
+ getCmd(req).equals("crea1CodaSmsCR")) {
+ long l_id = getRequestLongParameter(req, "id_contratto");
+ Contratto bean = new Contratto(apFull);
+ bean.findByPrimaryKey(l_id);
+ ResParm rp = new ResParm(true);
+ if (getCmd(req).equals("crea1CodaSmsD")) {
+ ContrattoCR CR = new ContrattoCR(apFull);
+ fillObject(req, CR);
+ bean.save();
+ }
+ if (bean.getDBState() == 1) {
+ rp = bean.creaCodaMessaggio();
+ } else {
+ rp.setStatus(false);
+ rp.setMsg("Errore!. Impossibile salvare contratto");
+ }
+ if (rp.getStatus()) {
+ sendMessage(req, "Creazione coda messaggio avvenuto con successo");
+ } else {
+ sendMessage(req, rp.getMsg());
+ }
+ if (getCmd(req).equals("crea1CodaSmsD")) {
+ showBean(req, res);
+ } else {
+ search(req, res);
+ }
+ } else if (getCmd(req).equals("creaCodaSms")) {
+ Contratto bean = new Contratto(apFull);
+ ContrattoCR CR = new ContrattoCR(apFull);
+ fillObject(req, CR);
+ ResParm rp = new ResParm(true);
+ rp = bean.creaCodaMessaggiSms(CR);
+ if (rp.getStatus()) {
+ sendMessage(req, "Creazione coda messaggi ok. " +
+ rp.getStatus());
+ } else {
+ sendMessage(req, rp.getMsg());
+ }
+ search(req, res);
+ }
+ super.otherCommands(req, res);
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/EsercizioSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/EsercizioSvlt.java
new file mode 100644
index 00000000..1cfae4b5
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/EsercizioSvlt.java
@@ -0,0 +1,34 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Esercizio;
+import it.acxent.anag.EsercizioCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/Esercizio.abl"})
+public class EsercizioSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = 6202443100334163908L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Esercizio(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new EsercizioCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/FestivitaSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/FestivitaSvlt.java
new file mode 100644
index 00000000..82a77dc7
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/FestivitaSvlt.java
@@ -0,0 +1,31 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Festivita;
+import it.acxent.anag.FestivitaCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.servlet.AblServletSvlt;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/Festivita.abl"})
+public class FestivitaSvlt extends AblServletSvlt {
+ private static final long serialVersionUID = -6080652564320276641L;
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Festivita(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new FestivitaCR(getApFull(req));
+ }
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/FornitoreSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/FornitoreSvlt.java
new file mode 100644
index 00000000..418aefcc
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/FornitoreSvlt.java
@@ -0,0 +1,46 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Fornitore;
+import it.acxent.anag.FornitoreCR;
+import it.acxent.anag.TipoClifor;
+import it.acxent.anag.TipoCliforCR;
+import it.acxent.anag.TipoPagamento;
+import it.acxent.anag.TipoPagamentoCR;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.util.ReturnItem;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anag/Fornitore.abl"})
+public class FornitoreSvlt extends CliforSvlt {
+ private static final long serialVersionUID = -8815931044823891081L;
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Fornitore(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new FornitoreCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ req.setAttribute("bean", getBean(req));
+ req.setAttribute("listaTipoPagamento", new TipoPagamento(apFull).findByCR(new TipoPagamentoCR(), 0, 0));
+ req.setAttribute("RI", new ReturnItem(req.getParameter("RI")));
+ TipoCliforCR CRT = new TipoCliforCR();
+ CRT.setFlgTipoS("F");
+ req.setAttribute("listaTipiClifor", new TipoClifor(apFull).findByCR(CRT, 0, 0));
+ }
+
+ protected String getBeanPageName(HttpServletRequest req) {
+ return super.getBeanPageName(req);
+ }
+
+ protected final String getBeanName(HttpServletRequest req) {
+ return "clifor";
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/GetCliforAttachSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/GetCliforAttachSvlt.java
new file mode 100644
index 00000000..51d38682
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/GetCliforAttachSvlt.java
@@ -0,0 +1,36 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.AllegatoClifor;
+import it.acxent.db.ApplParmFull;
+import it.acxent.servlet.GetFileSvlt;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/_attach/_clifor/*"})
+public class GetCliforAttachSvlt extends GetFileSvlt {
+ private static final long serialVersionUID = -3594087947380598080L;
+
+ protected String getFileName(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ boolean checkGrant = true;
+ long l_id_user = getLoginUserId(req);
+ if (l_id_user == 0L) {
+ checkGrant = false;
+ } else {
+ checkGrant = true;
+ }
+ if (checkGrant) {
+ AllegatoClifor bean = new AllegatoClifor(getApFull(req));
+ bean.findByPrimaryKey(getRequestLongParameter(req, "id"));
+ boolean isWeb = (getRequestLongParameter(req, "w") == 1L);
+ String fileName = bean.getNomeFileCompletoSuDisco();
+ return fileName;
+ }
+ return null;
+ }
+
+ protected boolean isSecureServlet(HttpServletRequest req) {
+ return false;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/GlossarioSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/GlossarioSvlt.java
new file mode 100644
index 00000000..60b987d4
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/GlossarioSvlt.java
@@ -0,0 +1,40 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Glossario;
+import it.acxent.anag.GlossarioCR;
+import it.acxent.anag.TipoGlossario;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.servlet.AblServletSvlt;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/Glossario.abl"})
+public class GlossarioSvlt extends AblServletSvlt {
+ private static final long serialVersionUID = -6401647334745567418L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ req.setAttribute("listaTipoGlossario", new TipoGlossario(apFull).findAll());
+ }
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Glossario(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new GlossarioCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/InitUpdateDbSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/InitUpdateDbSvlt.java
new file mode 100644
index 00000000..7547b8a4
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/InitUpdateDbSvlt.java
@@ -0,0 +1,21 @@
+package it.acxent.anag.servlet;
+
+public class InitUpdateDbSvlt extends it.acxent.servlet.InitUpdateDbSvlt {
+ private static final long serialVersionUID = 2009630112308732636L;
+
+ protected String getProjectVersionTag() {
+ return "acxent-common";
+ }
+
+ protected long getDatabaseVersionNumber() {
+ return 342L;
+ }
+
+ protected String getSubVersionNumber() {
+ return "20251204-att";
+ }
+
+ protected boolean shouldInitCore() {
+ return false;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/IvaSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/IvaSvlt.java
new file mode 100644
index 00000000..210a2aac
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/IvaSvlt.java
@@ -0,0 +1,38 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Iva;
+import it.acxent.anag.IvaCR;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/Iva.abl"})
+public class IvaSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = 8212895088866865976L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ req.setAttribute("listaIva", new Iva(apFull).findAllNoRM());
+ }
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Iva(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new IvaCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/ListinoSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/ListinoSvlt.java
new file mode 100644
index 00000000..75de0a0b
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/ListinoSvlt.java
@@ -0,0 +1,180 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Listino;
+import it.acxent.anag.ListinoArticolo;
+import it.acxent.anag.ListinoCR;
+import it.acxent.anag.ListinoTipo;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.util.AbMessages;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/Listino.abl"})
+public class ListinoSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = 8779982045898426417L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ Listino bean = null;
+ ResParm rp = new ResParm(true, "");
+ long l_id = getRequestLongParameter(req, "id_listino");
+ bean = new Listino(apFull);
+ try {
+ bean.findByPrimaryKey(l_id);
+ fillObject(req, bean);
+ rp = bean.save();
+ req.setAttribute("bean", bean);
+ req.setAttribute("id_listino", String.valueOf(bean.getId_listino()));
+ if (rp.getStatus() == true) {
+ if (getAct(req).equals("addLT")) {
+ ListinoTipo row = new ListinoTipo(apFull);
+ fillObject(req, row);
+ rp = bean.addListinoTipo(row);
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ } else if (getAct(req).equals("delLT")) {
+ ListinoTipo row = new ListinoTipo(apFull);
+ long l_id_listinoTipo = getRequestLongParameter(req, "id_listinoTipo");
+ if (l_id_listinoTipo != 0L) {
+ fillObject(req, row);
+ bean.delListinoTipo(row);
+ sendMessage(req, "Cancellazione Listino Tipo Effettuata");
+ } else {
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_FAIL"));
+ }
+ showBean(req, res);
+ } else if (getAct(req).equals("modLT")) {
+ ListinoTipo row = new ListinoTipo(apFull);
+ long l_id_listinoTipo = getRequestLongParameter(req, "id_listinoTipo");
+ if (l_id_listinoTipo != 0L) {
+ row.findByPrimaryKey(l_id_listinoTipo);
+ req.setAttribute("listinoTipo", row);
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_OK"));
+ } else {
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_FAIL"));
+ }
+ showBean(req, res);
+ } else if (getAct(req).equals("addListinoArticolo")) {
+ ListinoArticolo row = new ListinoArticolo(apFull);
+ ListinoArticolo beanRow = new ListinoArticolo(apFull);
+ fillObject(req, row);
+ beanRow.findByArticoloListino(row.getId_articolo(), row.getId_listino());
+ if (beanRow.getDBState() == 1) {
+ beanRow.setPrezzoLA(row.getPrezzoLA());
+ beanRow.setPercLA(row.getPercLA());
+ beanRow.setPercLA1(row.getPercLA1());
+ beanRow.setPercLA2(row.getPercLA2());
+ beanRow.setPercLA3(row.getPercLA3());
+ beanRow.setDataScadenzaOffertaLA(row.getDataScadenzaOffertaLA());
+ beanRow.setPrezzoOffertaLA(row.getPrezzoOffertaLA());
+ rp = beanRow.save();
+ } else {
+ row.setDBState(0);
+ rp = row.save();
+ }
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ } else if (getAct(req).equals("delListinoArticolo")) {
+ ListinoArticolo row = new ListinoArticolo(apFull);
+ if (getRequestLongParameter(req, "id_listinoArticolo") != 0L) {
+ row.findByPrimaryKey(getRequestLongParameter(req, "id_listinoArticolo"));
+ row.delete();
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "DELETE_OK"));
+ } else {
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_FAIL"));
+ }
+ showBean(req, res);
+ } else if (getAct(req).equals("modListinoArticolo")) {
+ ListinoArticolo row = new ListinoArticolo(apFull);
+ long l_id_listinoArticolo = getRequestLongParameter(req, "id_listinoArticolo");
+ if (l_id_listinoArticolo != 0L) {
+ row.findByPrimaryKey(l_id_listinoArticolo);
+ req.setAttribute("listinoArticolo", row);
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_OK"));
+ } else {
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_FAIL"));
+ }
+ showBean(req, res);
+ } else if (getAct(req).equals("addListinoArticoloVariante")) {
+ long id_articolo = getRequestLongParameter(req, "id_articoloV");
+ long id_articoloVariante = getRequestLongParameter(req, "id_articoloVarianteV");
+ double prezzoLA = getRequestDoubleParameter(req, "prezzoLAV");
+ double percLA = getRequestDoubleParameter(req, "percLAV");
+ double percLA1 = getRequestDoubleParameter(req, "percLAV1");
+ double percLA2 = getRequestDoubleParameter(req, "percLAV2");
+ double percLA3 = getRequestDoubleParameter(req, "percLAV3");
+ ListinoArticolo beanRow = new ListinoArticolo(apFull);
+ beanRow.findByArticoloVarianteListino(id_articoloVariante, l_id);
+ beanRow.setId_listino(l_id);
+ beanRow.setId_articolo(id_articolo);
+ beanRow.setId_articoloVariante(id_articoloVariante);
+ beanRow.setPrezzoLA(prezzoLA);
+ beanRow.setPercLA(percLA);
+ beanRow.setPercLA1(percLA1);
+ beanRow.setPercLA2(percLA2);
+ beanRow.setPercLA3(percLA3);
+ beanRow.setDataScadenzaOffertaLA(getRequestDateParameter(req, "dataScadenzaOffertaLAV"));
+ beanRow.setPrezzoOffertaLA(getRequestDoubleParameter(req, "prezzoOffertaLAV"));
+ rp = bean.addListinoArticoloVariante(beanRow);
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ } else if (getAct(req).equals("delListinoArticoloVariante")) {
+ ListinoArticolo row = new ListinoArticolo(apFull);
+ if (getRequestLongParameter(req, "id_listinoArticolo") != 0L) {
+ row.findByPrimaryKey(getRequestLongParameter(req, "id_listinoArticolo"));
+ row.delete();
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "DELETE_OK"));
+ } else {
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_FAIL"));
+ }
+ showBean(req, res);
+ } else if (getAct(req).equals("modListinoArticoloVariante")) {
+ ListinoArticolo row = new ListinoArticolo(apFull);
+ long l_id_listinoArticolo = getRequestLongParameter(req, "id_listinoArticolo");
+ if (l_id_listinoArticolo != 0L) {
+ row.findByPrimaryKey(l_id_listinoArticolo);
+ req.setAttribute("listinoArticoloV", row);
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_OK"));
+ } else {
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "READ_FAIL"));
+ }
+ showBean(req, res);
+ }
+ } else {
+ req.setAttribute("bean", bean);
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+ } catch (Exception e) {
+ forceMessage(req, AbMessages.getMessage(getLocale(req), "SAVE_FAIL"));
+ showBean(req, res);
+ }
+ }
+
+ protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
+ Listino bean = (Listino)beanA;
+ req.setAttribute("listaLT", bean.getListinoTipo());
+ req.setAttribute("listaLA", bean.getListinoArticolo(getPageNumber(req), getPageRow(req)));
+ req.setAttribute("listaLAV", bean.getListinoArticoloVariante(getPageNumber(req), getPageRow(req)));
+ }
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Listino(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new ListinoCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected int getPageRow(HttpServletRequest req) {
+ return 99999999;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/MagFisicoSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/MagFisicoSvlt.java
new file mode 100644
index 00000000..83f03a49
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/MagFisicoSvlt.java
@@ -0,0 +1,50 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.MagFisico;
+import it.acxent.anag.MagFisicoCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/MagFisico.abl"})
+public class MagFisicoSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = -573715388802369981L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new MagFisico(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new MagFisicoCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+
+ protected ResParm beforeSave(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
+ ResParm rp = new ResParm(true);
+ MagFisico mf = new MagFisico(getApFull(req));
+ fillObject(req, mf);
+ if (mf.getFlgTipo() == 3L) {
+ if (mf.isMagOrdinatoValorizzato()) {
+ rp.setMsg("ERRORE! Può essere selezionato solo un magazzino ordinato!");
+ rp.setStatus(false);
+ return rp;
+ }
+ return super.beforeSave(beanA, req, res);
+ }
+ return super.beforeSave(beanA, req, res);
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/Menu4Svlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/Menu4Svlt.java
new file mode 100644
index 00000000..c91725d9
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/Menu4Svlt.java
@@ -0,0 +1,64 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Postazione;
+import it.acxent.common.Users;
+import it.acxent.servlet.Logon4Svlt;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/menu/Menu4.abl"})
+public class Menu4Svlt extends Logon4Svlt {
+ private static final long serialVersionUID = -2542692347954883196L;
+
+ protected boolean checkLoginProfile(HttpServletRequest req) {
+ try {
+ if (getLoginUser(req) == null) {
+ forceJspPage(getLoginPage(null, null), req);
+ return true;
+ }
+ if (getLoginUser(req).getFlgValido().equals("N")) {
+ forceJspPage(getLoginPage(null, null), req);
+ req.getSession().removeAttribute("loginUser_id");
+ req.getSession().removeAttribute("utenteLogon");
+ return false;
+ }
+ if (getLoginUser(req).getId_userProfile() > 0L) {
+ forceJspPage(getLoginPage(null, null), req);
+ return true;
+ }
+ forceJspPage(getLoginPage(null, null), req);
+ req.getSession().removeAttribute("loginUser_id");
+ req.getSession().removeAttribute("utenteLogon");
+ return true;
+ } catch (Exception e) {
+ handleDebug(e);
+ return false;
+ }
+ }
+
+ protected Users getUser(HttpServletRequest req) {
+ return new it.acxent.anag.Users(getApFull(req));
+ }
+
+ protected long checkLoginName(HttpServletRequest req, HttpServletResponse res) {
+ long result = super.checkLoginName(req, res);
+ if (result == 5L) {
+ String ip = req.getRemoteHost();
+ Postazione pos = new Postazione(getApFull(req));
+ pos.findByIp(ip);
+ it.acxent.anag.Users bean = (it.acxent.anag.Users)getLoginUser(req);
+ System.out.println("LOGIN EFFETTUATO: user:" + bean.getLogin() + " ip:" + ip);
+ if (pos.getDBState() == 1) {
+ bean.setId_postazione(pos.getId_postazione());
+ req.getSession().setAttribute("utenteLogon", bean);
+ }
+ return result;
+ }
+ return result;
+ }
+
+ protected String getLoginPage(HttpServletRequest req, HttpServletResponse res) {
+ return getJspPage(req).isEmpty() ? "/admin/menu/_inc-menu.jsp" : getJspPage(req);
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/MenuSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/MenuSvlt.java
new file mode 100644
index 00000000..9419e0be
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/MenuSvlt.java
@@ -0,0 +1,62 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Postazione;
+import it.acxent.common.Users;
+import it.acxent.servlet.LogonSvlt;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/menu/Menu.abl"})
+public class MenuSvlt extends LogonSvlt {
+ protected boolean checkLoginProfile(HttpServletRequest req) {
+ try {
+ if (getLoginUser(req) == null) {
+ forceJspPage(getLoginPage(null, null), req);
+ return true;
+ }
+ if (getLoginUser(req).getFlgValido().equals("N")) {
+ forceJspPage(super.getLoginPage(null, null), req);
+ req.getSession().removeAttribute("loginUser_id");
+ req.getSession().removeAttribute("utenteLogon");
+ return false;
+ }
+ if (getLoginUser(req).getId_userProfile() > 0L) {
+ forceJspPage(super.getLoginPage(null, null), req);
+ return true;
+ }
+ forceJspPage(super.getLoginPage(null, null), req);
+ req.getSession().removeAttribute("loginUser_id");
+ req.getSession().removeAttribute("utenteLogon");
+ return true;
+ } catch (Exception e) {
+ handleDebug(e);
+ return false;
+ }
+ }
+
+ protected String getLoginPage(HttpServletRequest req, HttpServletResponse res) {
+ return super.getLoginPage(req, res);
+ }
+
+ protected Users getUser(HttpServletRequest req) {
+ return new it.acxent.anag.Users(getApFull(req));
+ }
+
+ protected long checkLoginName(HttpServletRequest req, HttpServletResponse res) {
+ long result = super.checkLoginName(req, res);
+ if (result == 5L) {
+ String ip = req.getRemoteHost();
+ Postazione pos = new Postazione(getApFull(req));
+ pos.findByIp(ip);
+ it.acxent.anag.Users bean = (it.acxent.anag.Users)getLoginUser(req);
+ System.out.println("LOGIN EFFETTUATO: user:" + bean.getLogin() + " ip:" + ip);
+ if (pos.getDBState() == 1) {
+ bean.setId_postazione(pos.getId_postazione());
+ req.getSession().setAttribute("utenteLogon", bean);
+ }
+ return result;
+ }
+ return result;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/NazioneSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/NazioneSvlt.java
new file mode 100644
index 00000000..8b1caa15
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/NazioneSvlt.java
@@ -0,0 +1,39 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Iva;
+import it.acxent.anag.Nazione;
+import it.acxent.anag.NazioneCR;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/Nazione.abl"})
+public class NazioneSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = 370847610628258765L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ req.setAttribute("listaIva", new Iva(apFull).findAllOss());
+ }
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Nazione(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new NazioneCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return false;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/OttoxmilleSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/OttoxmilleSvlt.java
new file mode 100644
index 00000000..b5e40b69
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/OttoxmilleSvlt.java
@@ -0,0 +1,31 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Ottoxmille;
+import it.acxent.anag.OttoxmilleCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.servlet.AblServletSvlt;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/Ottoxmille.abl"})
+public class OttoxmilleSvlt extends AblServletSvlt {
+ private static final long serialVersionUID = -6080652564320276641L;
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Ottoxmille(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new OttoxmilleCR(getApFull(req));
+ }
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/PortoSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/PortoSvlt.java
new file mode 100644
index 00000000..38a4bfe6
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/PortoSvlt.java
@@ -0,0 +1,34 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Porto;
+import it.acxent.anag.PortoCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/Porto.abl"})
+public class PortoSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = 6934923184756402334L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Porto(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new PortoCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/PostazioneSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/PostazioneSvlt.java
new file mode 100644
index 00000000..b934946d
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/PostazioneSvlt.java
@@ -0,0 +1,42 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Postazione;
+import it.acxent.anag.PostazioneCR;
+import it.acxent.anag.RegCassa;
+import it.acxent.common.TipoPostazione;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/Postazione.abl"})
+public class PostazioneSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = 6981087081168945592L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {
+ req.setAttribute("listaRegCassa", new RegCassa(getApFull(req)).findAll());
+ req.setAttribute("listaTipoPostazione", new TipoPostazione(getApFull(req)).findAll());
+ }
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {
+ req.setAttribute("listaRegCassa", new RegCassa(getApFull(req)).findAll());
+ req.setAttribute("listaTipoPostazione", new TipoPostazione(getApFull(req)).findAll());
+ }
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Postazione(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new PostazioneCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return false;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/RegCassaSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/RegCassaSvlt.java
new file mode 100644
index 00000000..886284d5
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/RegCassaSvlt.java
@@ -0,0 +1,34 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.RegCassa;
+import it.acxent.anag.RegCassaCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/RegCassa.abl"})
+public class RegCassaSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = -7439868045390925263L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new RegCassa(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new RegCassaCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/RegioneSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/RegioneSvlt.java
new file mode 100644
index 00000000..cef68296
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/RegioneSvlt.java
@@ -0,0 +1,34 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Regione;
+import it.acxent.anag.RegioneCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/Regione.abl"})
+public class RegioneSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = 1666821072326696239L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Regione(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new RegioneCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/RubricaSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/RubricaSvlt.java
new file mode 100644
index 00000000..f82c69f9
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/RubricaSvlt.java
@@ -0,0 +1,37 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Rubrica;
+import it.acxent.anag.RubricaCR;
+import it.acxent.anag.TipoPagamento;
+import it.acxent.anag.TipoPagamentoCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.util.ReturnItem;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anag/Rubrica.abl"})
+public class RubricaSvlt extends CliforSvlt {
+ private static final long serialVersionUID = 8804339707966839406L;
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Rubrica(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new RubricaCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {
+ req.setAttribute("bean", getBean(req));
+ req.setAttribute("listaTipoPagamento", new TipoPagamento(getApFull(req))
+ .findByCR(new TipoPagamentoCR(), 0, 0));
+ req.setAttribute("RI", new ReturnItem(
+ req.getParameter("RI")));
+ }
+
+ protected String getBeanPageName(HttpServletRequest req) {
+ return "rubrica";
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoAllegatoCliforSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoAllegatoCliforSvlt.java
new file mode 100644
index 00000000..2d7ca87d
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoAllegatoCliforSvlt.java
@@ -0,0 +1,60 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.TipoAllegatoClifor;
+import it.acxent.anag.TipoAllegatoCliforCR;
+import it.acxent.contab.TipoAllegatoDocumento;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.servlet.AblServletSvlt;
+import it.acxent.util.AbMessages;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/TipoAllegatoClifor.abl"})
+public class TipoAllegatoCliforSvlt extends AblServletSvlt {
+ private static final long serialVersionUID = 5422961426191935478L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {
+ TipoAllegatoDocumento bean = null;
+ ResParm rp = new ResParm(true, "");
+ long l_id = getRequestLongParameter(req, "id_tipoDocumento");
+ bean = new TipoAllegatoDocumento(getApFull(req));
+ try {
+ bean.findByPrimaryKey(l_id);
+ fillObject(req, bean);
+ rp = bean.save();
+ l_id = bean.getId_tipoAllegatoDocumento();
+ req.setAttribute("id_tipoAllegatoDocumento", String.valueOf(l_id));
+ req.setAttribute("bean", bean);
+ if (rp.getStatus() != true) {
+ req.setAttribute("bean", bean);
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+ } catch (Exception e) {
+ forceMessage(req,
+ AbMessages.getMessage(getLocale(req), "SAVE_FAIL"));
+ showBean(req, res);
+ }
+ }
+
+ protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new TipoAllegatoClifor(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new TipoAllegatoCliforCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoCliforSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoCliforSvlt.java
new file mode 100644
index 00000000..d6332e31
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoCliforSvlt.java
@@ -0,0 +1,35 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.TipoClifor;
+import it.acxent.anag.TipoCliforCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.servlet.AblServletSvlt;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/TipoClifor.abl"})
+public class TipoCliforSvlt extends AblServletSvlt {
+ private static final long serialVersionUID = -6401647334745567418L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new TipoClifor(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new TipoCliforCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoContrattoSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoContrattoSvlt.java
new file mode 100644
index 00000000..8e381727
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoContrattoSvlt.java
@@ -0,0 +1,34 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.TipoContratto;
+import it.acxent.anag.TipoContrattoCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/TipoContratto.abl"})
+public class TipoContrattoSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = 589377432507424207L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new TipoContratto(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new TipoContrattoCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoGlossarioSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoGlossarioSvlt.java
new file mode 100644
index 00000000..b55dc265
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoGlossarioSvlt.java
@@ -0,0 +1,35 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.TipoGlossario;
+import it.acxent.anag.TipoGlossarioCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.servlet.AblServletSvlt;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/TipoGlossario.abl"})
+public class TipoGlossarioSvlt extends AblServletSvlt {
+ private static final long serialVersionUID = -6401647334745567418L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new TipoGlossario(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new TipoGlossarioCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoPagamentoSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoPagamentoSvlt.java
new file mode 100644
index 00000000..27b388c4
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoPagamentoSvlt.java
@@ -0,0 +1,81 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.MeseEscluso;
+import it.acxent.anag.TipoPagamento;
+import it.acxent.anag.TipoPagamentoCR;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.servlet.AddImgSvlt;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/TipoPagamento.abl"})
+public class TipoPagamentoSvlt extends _AnagAdapterSvlt implements AddImgSvlt {
+ private static final long serialVersionUID = -759824067431772574L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
+ TipoPagamento bean = (TipoPagamento)beanA;
+ req.setAttribute("listaMesiEsclusi", bean.getMesiEsclusi());
+ }
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new TipoPagamento(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new TipoPagamentoCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return false;
+ }
+
+ protected void search(HttpServletRequest req, HttpServletResponse res) {
+ super.search(req, res);
+ }
+
+ public void _addMeseEscluso(HttpServletRequest req, HttpServletResponse res) {
+ MeseEscluso escluso = new MeseEscluso(getApFull(req));
+ fillObject(req, escluso);
+ ResParm rp = escluso.save();
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+
+ public void _delMeseEscluso(HttpServletRequest req, HttpServletResponse res) {
+ long id_meseEscluso = getRequestLongParameter(req, "id_meseEscluso");
+ MeseEscluso escluso = new MeseEscluso(getApFull(req));
+ escluso.findByPrimaryKey(id_meseEscluso);
+ ResParm rp = escluso.delete();
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+
+ public void _cambiaFlg(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ TipoPagamento bean = new TipoPagamento(apFull);
+ long l_id_tipo = getRequestLongParameter(req, "id_tipoPagamento");
+ String l_flg = getRequestParameter(req, "flg");
+ bean.findByPrimaryKey(l_id_tipo);
+ ResParm rp = bean.cambiaFlg(l_flg);
+ if (rp.getStatus()) {
+ sendMessage(req, "Aggiornamento Effettuato");
+ } else {
+ sendMessage(req, "Errore! " + rp.getMsg());
+ }
+ search(req, res);
+ }
+
+ protected boolean isLoadImageServlet() {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoPersonaCaricoSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoPersonaCaricoSvlt.java
new file mode 100644
index 00000000..d611ab5c
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/TipoPersonaCaricoSvlt.java
@@ -0,0 +1,30 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.tr.TipoPersonaCarico;
+import it.acxent.anag.tr.TipoPersonaCaricoCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class TipoPersonaCaricoSvlt extends _AnagAdapterSvlt {
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new TipoPersonaCarico(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new TipoPersonaCaricoCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/UpdateSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/UpdateSvlt.java
new file mode 100644
index 00000000..7d87334a
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/UpdateSvlt.java
@@ -0,0 +1,81 @@
+package it.acxent.anag.servlet;
+
+import com.jcraft.jsch.Channel;
+import com.jcraft.jsch.ChannelSftp;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.Session;
+import it.acxent.anag.Users;
+import it.acxent.anag.UsersCR;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import java.util.Vector;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anag/Update.abl"})
+public class UpdateSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = -2542695827954883196L;
+
+ public void _updateApp(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ ResParm rp = new ResParm();
+ JSch jsch = new JSch();
+ String user = "fe-upd";
+ String pass = "pippolone1000";
+ String server = "dev.f3.net";
+ String depPath = "/usr/local/jenkins/workspace/cli-fotoeventi/dependencies";
+ String targetPath = "/usr/local/jenkins/workspace/cli-fotoeventi/target";
+ int port = 9417;
+ Session session = null;
+ ChannelSftp sftpChannel = null;
+ try {
+ session = jsch.getSession(user, server, port);
+ session.setConfig("StrictHostKeyChecking", "no");
+ session.setPassword(pass);
+ session.connect();
+ Channel channel = session.openChannel("sftp");
+ channel.connect();
+ sftpChannel = (ChannelSftp)channel;
+ sftpChannel.cd("/usr/local/jenkins/workspace/cli-fotoeventi/dependencies");
+ Vector listDep = sftpChannel.ls(depPath);
+ sftpChannel.exit();
+ rp.setStatus(true);
+ } catch (Exception ex) {
+ System.out.println("getFileViaSFtp: " + ex.getMessage());
+ rp.setException(ex);
+ rp.setMsg(ex.getMessage());
+ rp.setStatus(false);
+ } finally {
+ try {
+ if (session.isConnected())
+ sftpChannel.exit();
+ } catch (Exception ex) {
+ System.out.println("getFileViaSFtp: " + ex.getMessage());
+ rp.setException(ex);
+ rp.setMsg(ex.getMessage());
+ rp.setStatus(false);
+ }
+ }
+ }
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Users(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ UsersCR CR = new UsersCR();
+ CR.setPolicy(getLoginUser(req).getUserProfile().getPolicy());
+ return (CRAdapter)CR;
+ }
+
+ protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CRA, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected String getBeanPageName(HttpServletRequest req) {
+ return "update";
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/UsersSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/UsersSvlt.java
new file mode 100644
index 00000000..b328462c
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/UsersSvlt.java
@@ -0,0 +1,143 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.UserClifor;
+import it.acxent.anag.Users;
+import it.acxent.anag.UsersCR;
+import it.acxent.common.AccessGroup;
+import it.acxent.common.UserAccess;
+import it.acxent.common.UserAccessGroup;
+import it.acxent.common.UserProfile;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.newsletter.TemplateMsg;
+import it.acxent.util.AbMessages;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class UsersSvlt extends it.acxent.servlet.UsersSvlt {
+ private static final long serialVersionUID = 4988354513819461878L;
+
+ protected void fillComboAfterDetail(DBAdapter beanA, HttpServletRequest req, HttpServletResponse res) {
+ Users bean = (Users)beanA;
+ req.setAttribute("listaUserClifor", new UserClifor(getApFull(req)).findByUser(bean.getId_users()));
+ super.fillComboAfterDetail((DBAdapter)bean, req, res);
+ }
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {
+ super.fillComboAfterSearch(CR, req, res);
+ req.setAttribute("listaTemplateMsg", new TemplateMsg(getApFull(req)).findAll(1L));
+ }
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Users(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ UsersCR CR = new UsersCR();
+ CR.setPolicy(getLoginUser(req).getUserProfile().getPolicy());
+ return (CRAdapter)CR;
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {
+ if (getLoginUser(req).getId_userProfile() == 1L) {
+ req.setAttribute("listaProfiliUtente", new UserProfile(getApFull(req)).findAll());
+ } else {
+ req.setAttribute("listaProfiliUtente", new UserProfile(getApFull(req)).findUserProfiles());
+ }
+ req.setAttribute("listaAccessGroup", new AccessGroup(getApFull(req)).findAll());
+ req.setAttribute("listaUserClifor", new UserClifor(getApFull(req)).findByCR(null, 0, 0));
+ }
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ long l_id = 0L;
+ ResParm rp = new ResParm(true, "");
+ l_id = getRequestLongParameter(req, "id_users");
+ Users bean = new Users(apFull);
+ try {
+ bean.findByPrimaryKey(l_id);
+ fillObject(req, bean);
+ rp = bean.save();
+ if (rp.getStatus()) {
+ req.setAttribute("id_users", String.valueOf(bean.getId_users()));
+ if (getAct(req).equals("addAccess")) {
+ UserAccess up = new UserAccess(apFull);
+ fillObject(req, up);
+ rp = bean.addAccess(up);
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ } else if (getAct(req).equals("delAccess")) {
+ UserAccess up = new UserAccess(apFull);
+ fillObject(req, up);
+ rp = bean.delAccess(up);
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "SAVE_OK") + ": Permesso Cancellato");
+ showBean(req, res);
+ } else if (getAct(req).equals("addAccessGroup")) {
+ UserAccessGroup row = new UserAccessGroup(apFull);
+ fillObject(req, row);
+ rp = bean.addAccessGroup(row);
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ } else if (getAct(req).equals("delAccessGroup")) {
+ UserAccessGroup row = new UserAccessGroup(apFull);
+ fillObject(req, row);
+ rp = bean.delAccessGroup(row);
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "SAVE_OK") + ": Permessi Cancellati");
+ showBean(req, res);
+ } else if (getAct(req).equals("delLog")) {
+ rp = bean.delAllLogs();
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "DELETE_OK") + ": Log Cancellati");
+ showBean(req, res);
+ }
+ } else {
+ sendMessage(req, AbMessages.getMessage(getLocale(req), "SAVE_FAIL " + rp.getMsg()));
+ showBean(req, res);
+ }
+ } catch (Exception e) {
+ forceMessage(req, AbMessages.getMessage(getLocale(req), "SAVE_FAIL"));
+ showBean(req, res);
+ }
+ }
+
+ protected void print(HttpServletRequest req, HttpServletResponse res) {
+ ApplParmFull apFull = getApFull(req);
+ if (getAct(req).equals("lblUser")) {
+ long l_id = 0L;
+ Users bean = null;
+ l_id = getRequestLongParameter(req, "id_documento");
+ bean = new Users(apFull);
+ bean.findByPrimaryKey(l_id);
+ } else if (getAct(req).equals("lblBc")) {
+ long l_id = 0L;
+ Users bean = null;
+ l_id = getRequestLongParameter(req, "id_users");
+ bean = new Users(apFull);
+ bean.findByPrimaryKey(l_id);
+ sendPdf(res, bean.creaLabelUtenteA4Pdf(), "Label " + bean.getCognomeNome() + ".pdf");
+ } else {
+ super.print(req, res);
+ }
+ }
+
+ public void _addUserCliente(HttpServletRequest req, HttpServletResponse res) {
+ long l_id_clifor = getRequestLongParameter(req, "id_cliforU");
+ long l_id_users = getRequestLongParameter(req, "id_users");
+ UserClifor uc = new UserClifor(getApFull(req));
+ uc.setId_clifor(l_id_clifor);
+ uc.setId_users(l_id_users);
+ ResParm rp = uc.save();
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+
+ public void _delUserCliente(HttpServletRequest req, HttpServletResponse res) {
+ long l_id_userClifor = getRequestLongParameter(req, "id_userClifor");
+ UserClifor uc = new UserClifor(getApFull(req));
+ uc.findByPrimaryKey(l_id_userClifor);
+ ResParm rp = uc.delete();
+ sendMessage(req, rp.getMsg());
+ showBean(req, res);
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/VettoreSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/VettoreSvlt.java
new file mode 100644
index 00000000..e7d215a7
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/VettoreSvlt.java
@@ -0,0 +1,34 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.anag.Vettore;
+import it.acxent.anag.VettoreCR;
+import it.acxent.db.CRAdapter;
+import it.acxent.db.DBAdapter;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@WebServlet(urlPatterns = {"/admin/anagConfig/Vettore.abl"})
+public class VettoreSvlt extends _AnagAdapterSvlt {
+ private static final long serialVersionUID = -1859476956877711417L;
+
+ protected void addRows(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterDetail(DBAdapter bean, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected void fillComboAfterSearch(CRAdapter CR, HttpServletRequest req, HttpServletResponse res) {}
+
+ protected DBAdapter getBean(HttpServletRequest req) {
+ return new Vettore(getApFull(req));
+ }
+
+ protected CRAdapter getBeanCR(HttpServletRequest req) {
+ return new VettoreCR(getApFull(req));
+ }
+
+ protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {}
+
+ protected boolean isSimpleServlet(HttpServletRequest req) {
+ return true;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/_AnagAdapterSvlt.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/_AnagAdapterSvlt.java
new file mode 100644
index 00000000..863b300d
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/servlet/_AnagAdapterSvlt.java
@@ -0,0 +1,55 @@
+package it.acxent.anag.servlet;
+
+import it.acxent.servlet.AblServletSvlt;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public abstract class _AnagAdapterSvlt extends AblServletSvlt {
+ protected boolean checkLoginProfile(HttpServletRequest req) {
+ try {
+ if (getLoginUser(req) == null) {
+ forceJspPage(getLoginPage(null, null), req);
+ return true;
+ }
+ if (getLoginUser(req).getFlgValido().equals("N")) {
+ forceJspPage(super.getLoginPage(null, null), req);
+ req.getSession().removeAttribute("loginUser_id");
+ req.getSession().removeAttribute("utenteLogon");
+ return false;
+ }
+ if (getLoginUser(req).getId_userProfile() > 0L)
+ return true;
+ forceJspPage(super.getLoginPage(null, null), req);
+ req.getSession().removeAttribute("loginUser_id");
+ req.getSession().removeAttribute("utenteLogon");
+ return true;
+ } catch (Exception e) {
+ handleDebug(e);
+ return false;
+ }
+ }
+
+ protected String getAct3(HttpServletRequest req) {
+ return getRequestParameter(req, "act3");
+ }
+
+ protected String getCmd3(HttpServletRequest req) {
+ return getRequestParameter(req, "cmd3");
+ }
+
+ protected String getLoginPage(HttpServletRequest req, HttpServletResponse res) {
+ return super.getLoginPage(req, res);
+ }
+
+ protected boolean useAlwaysSendRedirect() {
+ return true;
+ }
+
+ protected String getPathImgArticoli() {
+ return getDocBase() + "/" + getDocBase();
+ }
+
+ protected String getMailingListFileCR() {
+ return getParm("MAIL_LIST_FILE_CR").getTesto();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/tr/PersonaCarico.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/tr/PersonaCarico.java
new file mode 100644
index 00000000..c8aead13
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/tr/PersonaCarico.java
@@ -0,0 +1,181 @@
+package it.acxent.anag.tr;
+
+import it.acxent.anag.Clifor;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class PersonaCarico extends DBAdapter implements Serializable {
+ private static final long serialVersionUID = 1680269653578L;
+
+ private long id_personaCarico;
+
+ private long id_clifor;
+
+ private long id_tipoPersonaCarico;
+
+ private String cognomePC;
+
+ private String nomePC;
+
+ private String codFiscPC;
+
+ private double percCarico;
+
+ private String notaPC;
+
+ private Clifor clifor;
+
+ private TipoPersonaCarico tipoPersonaCarico;
+
+ public PersonaCarico(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public PersonaCarico() {}
+
+ public void setId_personaCarico(long newId_personaCarico) {
+ this.id_personaCarico = newId_personaCarico;
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public void setId_tipoPersonaCarico(long newId_tipoPersonaCarico) {
+ this.id_tipoPersonaCarico = newId_tipoPersonaCarico;
+ setTipoPersonaCarico(null);
+ }
+
+ public void setCognomePC(String newCognomePC) {
+ this.cognomePC = newCognomePC;
+ }
+
+ public void setNomePC(String newNomePC) {
+ this.nomePC = newNomePC;
+ }
+
+ public void setCodFiscPC(String newCodFisc) {
+ this.codFiscPC = newCodFisc;
+ }
+
+ public void setPercCarico(double newPercCarico) {
+ this.percCarico = newPercCarico;
+ }
+
+ public long getId_personaCarico() {
+ return this.id_personaCarico;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public long getId_tipoPersonaCarico() {
+ return this.id_tipoPersonaCarico;
+ }
+
+ public String getCognomePC() {
+ return (this.cognomePC == null) ? "" : this.cognomePC.trim();
+ }
+
+ public String getNomePC() {
+ return (this.nomePC == null) ? "" : this.nomePC.trim();
+ }
+
+ public String getCodFiscPC() {
+ return (this.codFiscPC == null) ? "" : this.codFiscPC.trim();
+ }
+
+ public double getPercCarico() {
+ return this.percCarico;
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class, getId_clifor());
+ return this.clifor;
+ }
+
+ public void setTipoPersonaCarico(TipoPersonaCarico newTipoPersonaCarico) {
+ this.tipoPersonaCarico = newTipoPersonaCarico;
+ }
+
+ public TipoPersonaCarico getTipoPersonaCarico() {
+ this.tipoPersonaCarico = (TipoPersonaCarico)getSecondaryObject(this.tipoPersonaCarico, TipoPersonaCarico.class, getId_tipoPersonaCarico());
+ return this.tipoPersonaCarico;
+ }
+
+ protected ResParm checkDeleteCascade() {
+ return new ResParm(true);
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(PersonaCaricoCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from PERSONA_CARICO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public Vectumerator findByCliente(long l_id_clifor, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from PERSONA_CARICO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ wc.addWc("A.id_clifor=" + l_id_clifor);
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+
+ public String getCognomeNomePC() {
+ return getCognomePC() + " " + getCognomePC();
+ }
+
+ public String getDescrizione() {
+ return getCognomeNomePC() + " " + getCognomeNomePC();
+ }
+
+ public String getNotaPC() {
+ return (this.notaPC == null) ? "" : this.notaPC.trim();
+ }
+
+ public void setNotaPC(String notaPC) {
+ this.notaPC = notaPC;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/tr/PersonaCaricoCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/tr/PersonaCaricoCR.java
new file mode 100644
index 00000000..9380c931
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/tr/PersonaCaricoCR.java
@@ -0,0 +1,113 @@
+package it.acxent.anag.tr;
+
+import it.acxent.anag.Clifor;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class PersonaCaricoCR extends CRAdapter {
+ private static final long serialVersionUID = -5540037425456661778L;
+
+ private long id_personaCarico;
+
+ private long id_clifor;
+
+ private long id_tipoPersonaCarico;
+
+ private String cognomePC;
+
+ private String nomePC;
+
+ private String codFiscPC;
+
+ private double percCarico;
+
+ private Clifor clifor;
+
+ private TipoPersonaCarico tipoPersonaCarico;
+
+ public PersonaCaricoCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public PersonaCaricoCR() {}
+
+ public void setId_personaCarico(long newId_personaCarico) {
+ this.id_personaCarico = newId_personaCarico;
+ }
+
+ public void setId_clifor(long newId_clifor) {
+ this.id_clifor = newId_clifor;
+ setClifor(null);
+ }
+
+ public void setId_tipoPersonaCarico(long newId_tipoPersonaCarico) {
+ this.id_tipoPersonaCarico = newId_tipoPersonaCarico;
+ setTipoPersonaCarico(null);
+ }
+
+ public void setCognomePC(String newCognomePC) {
+ this.cognomePC = newCognomePC;
+ }
+
+ public void setNomePC(String newNomePC) {
+ this.nomePC = newNomePC;
+ }
+
+ public void setCodFiscPC(String newCodFisc) {
+ this.codFiscPC = newCodFisc;
+ }
+
+ public void setPercCarico(double newPercCarico) {
+ this.percCarico = newPercCarico;
+ }
+
+ public long getId_personaCarico() {
+ return this.id_personaCarico;
+ }
+
+ public long getId_clifor() {
+ return this.id_clifor;
+ }
+
+ public long getId_tipoPersonaCarico() {
+ return this.id_tipoPersonaCarico;
+ }
+
+ public String getCognomePC() {
+ return (this.cognomePC == null) ? "" : this.cognomePC.trim();
+ }
+
+ public String getNomePC() {
+ return (this.nomePC == null) ? "" : this.nomePC.trim();
+ }
+
+ public String getCodFiscPC() {
+ return (this.codFiscPC == null) ? "" : this.codFiscPC.trim();
+ }
+
+ public double getPercCarico() {
+ return this.percCarico;
+ }
+
+ public void setClifor(Clifor newClifor) {
+ this.clifor = newClifor;
+ }
+
+ public Clifor getClifor() {
+ this.clifor = (Clifor)getSecondaryObject(this.clifor, Clifor.class,
+
+ getId_clifor());
+ return this.clifor;
+ }
+
+ public void setTipoPersonaCarico(TipoPersonaCarico newTipoPersonaCarico) {
+ this.tipoPersonaCarico = newTipoPersonaCarico;
+ }
+
+ public TipoPersonaCarico getTipoPersonaCarico() {
+ this.tipoPersonaCarico = (TipoPersonaCarico)getSecondaryObject(this.tipoPersonaCarico, TipoPersonaCarico.class,
+
+ getId_tipoPersonaCarico());
+ return this.tipoPersonaCarico;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/tr/TipoPersonaCarico.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/tr/TipoPersonaCarico.java
new file mode 100644
index 00000000..9a2e0298
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/tr/TipoPersonaCarico.java
@@ -0,0 +1,73 @@
+package it.acxent.anag.tr;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.db.WcString;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.io.Serializable;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+public class TipoPersonaCarico extends DBAdapter implements Serializable {
+ private static final long serialVersionUID = 1680269653603L;
+
+ private long id_tipoPersonaCarico;
+
+ private String descrizione;
+
+ public TipoPersonaCarico(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public TipoPersonaCarico() {}
+
+ public void setId_tipoPersonaCarico(long newId_tipoPersonaCarico) {
+ this.id_tipoPersonaCarico = newId_tipoPersonaCarico;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_tipoPersonaCarico() {
+ return this.id_tipoPersonaCarico;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+
+ protected ResParm checkDeleteCascade() {
+ return new ResParm(true);
+ }
+
+ protected void deleteCascade() {}
+
+ public Vectumerator findByCR(TipoPersonaCaricoCR CR, int pageNumber, int pageRows) {
+ String s_Sql_Find = "select A.* from TIPO_PERSONA_CARICO AS A";
+ String s_Sql_Order = "";
+ WcString wc = new WcString();
+ if (!CR.getSearchTxt().trim().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(CR.getSearchTxt().trim(), " ");
+ StringBuffer txt = new StringBuffer("(");
+ while (st.hasMoreTokens()) {
+ String token = st.nextToken();
+ txt.append("(A.Cognome like '%" + token + "%' or A.Nome like '%" + token + "%')");
+ if (st.hasMoreTokens())
+ txt.append(" and ");
+ }
+ txt.append(")");
+ wc.addWc(txt.toString());
+ }
+ try {
+ PreparedStatement stmt = getConn().prepareStatement(s_Sql_Find + s_Sql_Find + wc.toString());
+ return findRows(stmt, pageNumber, pageRows);
+ } catch (SQLException e) {
+ removeCPConnection();
+ handleDebug(e);
+ return AB_EMPTY_VECTUMERATOR;
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/tr/TipoPersonaCaricoCR.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/tr/TipoPersonaCaricoCR.java
new file mode 100644
index 00000000..74d7015a
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/tr/TipoPersonaCaricoCR.java
@@ -0,0 +1,32 @@
+package it.acxent.anag.tr;
+
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.CRAdapter;
+
+public class TipoPersonaCaricoCR extends CRAdapter {
+ private long id_tipoPersonaCarico;
+
+ private String descrizione;
+
+ public TipoPersonaCaricoCR(ApplParmFull newApplParmFull) {
+ super(newApplParmFull);
+ }
+
+ public TipoPersonaCaricoCR() {}
+
+ public void setId_tipoPersonaCarico(long newId_tipoPersonaCarico) {
+ this.id_tipoPersonaCarico = newId_tipoPersonaCarico;
+ }
+
+ public void setDescrizione(String newDescrizione) {
+ this.descrizione = newDescrizione;
+ }
+
+ public long getId_tipoPersonaCarico() {
+ return this.id_tipoPersonaCarico;
+ }
+
+ public String getDescrizione() {
+ return (this.descrizione == null) ? "" : this.descrizione.trim();
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/tr/package-info.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/tr/package-info.java
new file mode 100644
index 00000000..8fc66d31
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/anag/tr/package-info.java
@@ -0,0 +1 @@
+package it.acxent.anag.tr;
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/amz/AWSV4Auth.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/amz/AWSV4Auth.java
new file mode 100644
index 00000000..8125c7ac
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/amz/AWSV4Auth.java
@@ -0,0 +1,305 @@
+package it.acxent.api.amz;
+
+import java.math.BigInteger;
+import java.net.URLEncoder;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TimeZone;
+import java.util.TreeMap;
+import javax.crypto.Mac;
+import javax.crypto.spec.SecretKeySpec;
+
+public class AWSV4Auth {
+ private String accessKeyID;
+
+ private String secretAccessKey;
+
+ private String regionName;
+
+ private String serviceName;
+
+ private String httpMethodName;
+
+ private String canonicalURI;
+
+ private TreeMap queryParametes;
+
+ private TreeMap awsHeaders;
+
+ private String payload;
+
+ private AWSV4Auth() {}
+
+ public static void main(String[] args) {
+ String url = "xxxxx-yyyyy-r6nvlhpscgdwms5.ap-northeast-1.es.amazonaws.com/inventory/simple/123";
+ TreeMap awsHeaders = new TreeMap<>();
+ awsHeaders.put("host", "xxxxx-yyyyy-r6nvlhpscgdwms5.ap-northeast-1.es.amazonaws.com");
+ AWSV4Auth aWSV4Auth = new Builder("exampleKey", "exampleSecret").regionName("xx-yy-zzz").serviceName("es")
+
+
+ .httpMethodName("GET")
+ .canonicalURI("/inventory/simple/123")
+ .queryParametes(null)
+ .awsHeaders(awsHeaders)
+ .payload(null)
+ .debug()
+ .build();
+ Map header = aWSV4Auth.getHeaders();
+ for (Map.Entry entrySet : header.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ System.out.println(key + ":" + key);
+ }
+ }
+
+ public static class Builder {
+ private String accessKeyID;
+
+ private String secretAccessKey;
+
+ private String regionName;
+
+ private String serviceName;
+
+ private String httpMethodName;
+
+ private String canonicalURI;
+
+ private TreeMap queryParametes;
+
+ private TreeMap awsHeaders;
+
+ private String payload;
+
+ private boolean debug = false;
+
+ public Builder(String accessKeyID, String secretAccessKey) {
+ this.accessKeyID = accessKeyID;
+ this.secretAccessKey = secretAccessKey;
+ }
+
+ public Builder regionName(String regionName) {
+ this.regionName = regionName;
+ return this;
+ }
+
+ public Builder serviceName(String serviceName) {
+ this.serviceName = serviceName;
+ return this;
+ }
+
+ public Builder httpMethodName(String httpMethodName) {
+ this.httpMethodName = httpMethodName;
+ return this;
+ }
+
+ public Builder canonicalURI(String canonicalURI) {
+ this.canonicalURI = canonicalURI;
+ return this;
+ }
+
+ public Builder queryParametes(TreeMap queryParametes) {
+ this.queryParametes = queryParametes;
+ return this;
+ }
+
+ public Builder awsHeaders(TreeMap awsHeaders) {
+ this.awsHeaders = awsHeaders;
+ return this;
+ }
+
+ public Builder payload(String payload) {
+ this.payload = payload;
+ return this;
+ }
+
+ public Builder debug() {
+ this.debug = true;
+ return this;
+ }
+
+ public AWSV4Auth build() {
+ return new AWSV4Auth(this);
+ }
+ }
+
+ private boolean debug = false;
+
+ private final String HMACAlgorithm = "AWS4-HMAC-SHA256";
+
+ private final String aws4Request = "aws4_request";
+
+ private String strSignedHeader;
+
+ private String xAmzDate;
+
+ private String currentDate;
+
+ private AWSV4Auth(Builder builder) {
+ this.accessKeyID = builder.accessKeyID;
+ this.secretAccessKey = builder.secretAccessKey;
+ this.regionName = builder.regionName;
+ this.serviceName = builder.serviceName;
+ this.httpMethodName = builder.httpMethodName;
+ this.canonicalURI = builder.canonicalURI;
+ this.queryParametes = builder.queryParametes;
+ this.awsHeaders = builder.awsHeaders;
+ this.payload = builder.payload;
+ this.debug = builder.debug;
+ this.xAmzDate = getTimeStamp();
+ this.currentDate = getDate();
+ }
+
+ private String prepareCanonicalRequest() {
+ StringBuilder canonicalURL = new StringBuilder("");
+ canonicalURL.append(this.httpMethodName).append("\n");
+ this.canonicalURI = (this.canonicalURI == null || this.canonicalURI.trim().isEmpty()) ? "/" : this.canonicalURI;
+ canonicalURL.append(this.canonicalURI).append("\n");
+ StringBuilder queryString = new StringBuilder("");
+ if (this.queryParametes != null && !this.queryParametes.isEmpty()) {
+ for (Map.Entry entrySet : this.queryParametes.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ queryString.append(key).append("=").append(encodeParameter(value)).append("&");
+ }
+ queryString.deleteCharAt(queryString.lastIndexOf("&"));
+ queryString.append("\n");
+ } else {
+ queryString.append("\n");
+ }
+ canonicalURL.append((CharSequence)queryString);
+ StringBuilder signedHeaders = new StringBuilder("");
+ if (this.awsHeaders != null && !this.awsHeaders.isEmpty()) {
+ for (Map.Entry entrySet : this.awsHeaders.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ signedHeaders.append(key).append(";");
+ canonicalURL.append(key).append(":").append(value).append("\n");
+ }
+ canonicalURL.append("\n");
+ } else {
+ canonicalURL.append("\n");
+ }
+ this.strSignedHeader = signedHeaders.substring(0, signedHeaders.length() - 1);
+ canonicalURL.append(this.strSignedHeader).append("\n");
+ this.payload = (this.payload == null) ? "" : this.payload;
+ canonicalURL.append(generateHex(this.payload));
+ if (this.debug)
+ System.out.println("##Canonical Request:\n" + canonicalURL.toString());
+ return canonicalURL.toString();
+ }
+
+ private String prepareStringToSign(String canonicalURL) {
+ String stringToSign = "";
+ stringToSign = "AWS4-HMAC-SHA256\n";
+ stringToSign = stringToSign + stringToSign + "\n";
+ stringToSign = stringToSign + stringToSign + "/" + this.currentDate + "/" + this.regionName + "/aws4_request\n";
+ stringToSign = stringToSign + stringToSign;
+ if (this.debug)
+ System.out.println("##String to sign:\n" + stringToSign);
+ return stringToSign;
+ }
+
+ private String calculateSignature(String stringToSign) {
+ try {
+ byte[] signatureKey = getSignatureKey(this.secretAccessKey, this.currentDate, this.regionName, this.serviceName);
+ byte[] signature = HmacSHA256(signatureKey, stringToSign);
+ String strHexSignature = bytesToHex(signature);
+ return strHexSignature;
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ return null;
+ }
+ }
+
+ public Map getHeaders() {
+ this.awsHeaders.put("x-amz-date", this.xAmzDate);
+ String canonicalURL = prepareCanonicalRequest();
+ String stringToSign = prepareStringToSign(canonicalURL);
+ String signature = calculateSignature(stringToSign);
+ if (signature != null) {
+ Map header = new HashMap<>(0);
+ header.put("Authorization", buildAuthorizationString(signature));
+ if (this.debug) {
+ System.out.println("##Signature:\n" + signature);
+ System.out.println("##Header:");
+ for (Map.Entry entrySet : header.entrySet())
+ System.out.println((String)entrySet.getKey() + " = " + (String)entrySet.getKey());
+ System.out.println("================================");
+ }
+ return header;
+ }
+ if (this.debug)
+ System.out.println("##Signature:\n" + signature);
+ return null;
+ }
+
+ private String buildAuthorizationString(String strSignature) {
+ return "AWS4-HMAC-SHA256 Credential=" + this.accessKeyID + "/" + getDate() + "/" + this.regionName + "/" + this.serviceName + "/aws4_request,SignedHeaders=" + this.strSignedHeader + ",Signature=" + strSignature;
+ }
+
+ public static String generateHex(String data) {
+ try {
+ MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
+ messageDigest.update(data.getBytes("UTF-8"));
+ byte[] digest = messageDigest.digest();
+ return String.format("%064x", new BigInteger(1, digest));
+ } catch (NoSuchAlgorithmException|java.io.UnsupportedEncodingException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ private byte[] HmacSHA256(byte[] key, String data) throws Exception {
+ String algorithm = "HmacSHA256";
+ Mac mac = Mac.getInstance(algorithm);
+ mac.init(new SecretKeySpec(key, algorithm));
+ return mac.doFinal(data.getBytes("UTF8"));
+ }
+
+ private byte[] getSignatureKey(String key, String date, String regionName, String serviceName) throws Exception {
+ byte[] kSecret = ("AWS4" + key).getBytes("UTF8");
+ byte[] kDate = HmacSHA256(kSecret, date);
+ byte[] kRegion = HmacSHA256(kDate, regionName);
+ byte[] kService = HmacSHA256(kRegion, serviceName);
+ byte[] kSigning = HmacSHA256(kService, "aws4_request");
+ return kSigning;
+ }
+
+ protected static final char[] hexArray = "0123456789ABCDEF".toCharArray();
+
+ private String bytesToHex(byte[] bytes) {
+ char[] hexChars = new char[bytes.length * 2];
+ for (int j = 0; j < bytes.length; j++) {
+ int v = bytes[j] & 0xFF;
+ hexChars[j * 2] = hexArray[v >>> 4];
+ hexChars[j * 2 + 1] = hexArray[v & 0xF];
+ }
+ return new String(hexChars).toLowerCase();
+ }
+
+ private String getTimeStamp() {
+ DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd'T'HHmmss'Z'");
+ dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
+ return dateFormat.format(new Date());
+ }
+
+ private String getDate() {
+ DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
+ dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
+ return dateFormat.format(new Date());
+ }
+
+ private String encodeParameter(String param) {
+ try {
+ return URLEncoder.encode(param, "UTF-8");
+ } catch (Exception e) {
+ return URLEncoder.encode(param);
+ }
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/amz/AmzResult.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/amz/AmzResult.java
new file mode 100644
index 00000000..68f13794
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/amz/AmzResult.java
@@ -0,0 +1,41 @@
+package it.acxent.api.amz;
+
+public class AmzResult {
+ private String msg;
+
+ public AmzResult(String msg, boolean status, Object result) {
+ this.msg = msg;
+ this.ok = status;
+ this.result = result;
+ }
+
+ private boolean ok = true;
+
+ private Object result;
+
+ public AmzResult() {}
+
+ public String getMsg() {
+ return this.msg;
+ }
+
+ public void setMsg(String msg) {
+ this.msg = msg;
+ }
+
+ public boolean isOk() {
+ return this.ok;
+ }
+
+ public void setOk(boolean status) {
+ this.ok = status;
+ }
+
+ public Object getResult() {
+ return this.result;
+ }
+
+ public void setResult(Object result) {
+ this.result = result;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/amz/AmzSellerApi.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/amz/AmzSellerApi.java
new file mode 100644
index 00000000..679ee454
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/amz/AmzSellerApi.java
@@ -0,0 +1,1724 @@
+package it.acxent.api.amz;
+
+import it.acxent.art.AmzFeaturedPrice;
+import it.acxent.art.Articolo;
+import it.acxent.art.ArticoloCR;
+import it.acxent.cc.Attivita;
+import it.acxent.common.StatusMsg;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.util.DoubleOperator;
+import it.acxent.util.StringTokenizer;
+import it.acxent.util.Vectumerator;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.TreeMap;
+import org.apache.http.Consts;
+import org.apache.http.HttpEntity;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpDelete;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpPut;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.util.EntityUtils;
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+public class AmzSellerApi {
+ private Attivita attivita;
+
+ public AmzSellerApi(String lwaClientId, String lwaClientSecret, String lwaAuthToken) {
+ this.attivita = this.attivita;
+ this.lwaClientId = lwaClientId;
+ this.lwaClientSecret = lwaClientSecret;
+ this.lwaAuthToken = lwaAuthToken;
+ }
+
+ private boolean debug = false;
+
+ private ApplParmFull apFull = null;
+
+ private String lwaClientId;
+
+ private String lwaClientSecret;
+
+ private String lwaAuthToken;
+
+ private String lwaAccessToken;
+
+ private String lwaRefreshToken;
+
+ private Timestamp lwaAccessTokenExpireTS = null;
+
+ private String iamRoleARN;
+
+ private String iamAccessKey;
+
+ private String iamSecretKey;
+
+ private String stsAccessKeyId;
+
+ private String stsSecretAccessKey;
+
+ private String stsSessionToken;
+
+ private Timestamp stsSessionTokenTS = null;
+
+ private HashMap hmMarketplaces;
+
+ public static final String P_AMZ_LWA_CLIENT_ID = "AMZ_LWA_CLIENT_ID";
+
+ public static final String P_AMZ_LWA_CLIENT_SECRET = "AMZ_LWA_CLIENT_SECRET";
+
+ public static final String P_AMZ_LWA_AUTH_TOKEN = "AMZ_LWA_AUTH_TOKEN";
+
+ public static final String P_AMZ_IAM_ROLE_ARN = "AMZ_IAM_ROLE_ARN";
+
+ public static final String P_AMZ_IAM_ACCESS_KEY = "AMZ_IAM_ACCESS_KEY";
+
+ public static final String P_AMZ_IAM_SECRET_KEY = "AMZ_IAM_SECRET_KEY";
+
+ public static final String P_AMZ_LWA_REFRESH_TOKEN = "AMZ_LWA_REFRESH_TOKEN";
+
+ public static final String P_AMZ_LWA_REFRESH_TOKEN_TS = "AMZ_LWA_REFRESH_TOKEN_TS";
+
+ public static final String P_AMZ_STS_ACCESS_KEY_ID = "AMZ_STS_ACCESS_KEY_ID";
+
+ public static final String P_AMZ_STS_SECRET_ACCESS_KEY = "AMZ_STS_SECRET_ACCESS_KEY";
+
+ public static final String P_AMZ_STS_ACCESS_TOKEN = "AMZ_STS_ACCESS_TOKEN";
+
+ public static final String P_AMZ_STS_ACCESS_TOKEN_TS = "AMZ_STS_ACCESS_TOKEN_TS";
+
+ private static final String URI_CMD_LWA_ACCESS_TOKEN = "https://api.amazon.com/auth/o2/token";
+
+ private static final String URI_CMD_STS_TEMPORARY_TOKEN = "https://sts.amazonaws.com";
+
+ private static final String URI_CMD_MARKETPLACES_HOST = "https://sellingpartnerapi-eu.amazon.com";
+
+ private static final String URI_CMD_MARKETPLACES_ID_ENDPOINT = "/sellers/v1/marketplaceParticipations";
+
+ private static final String URI_CMD_LISTINGS_HOST = "https://sellingpartnerapi-eu.amazon.com";
+
+ private static final String URI_CMD_LISTINGS_ENDPOINT = "/listings/2021-08-01/items/:sellerId/:sku";
+
+ private static final String URI_CMD_PRODUCT_TYPE_DEFINITION_HOST = "https://sellingpartnerapi-eu.amazon.com";
+
+ private static final String URI_CMD_PRODUCT_TYPE_DEFINITION_ENDPOINT = "/definitions/2020-09-01/productTypes/:productType";
+
+ private static final String URI_CMD_GET_CATALOG_ITEMS_HOST = "https://sellingpartnerapi-eu.amazon.com";
+
+ private static final String URI_CMD_GET_CATALOG_ITEMS_ENDPOINT = "/catalog/2022-04-01/items";
+
+ private static final String URI_CMD_GET_PRICING_V0_ITEMS_HOST = "https://sellingpartnerapi-eu.amazon.com";
+
+ private static final String URI_CMD_GET_PRICING_V0_BATCH_ITEMS_HOST = "/batches/products/pricing/v0/itemOffers";
+
+ private static final String URI_CMD_GET_PRICING_V0_LOWEST_ASIN_ENDPOINT = "/products/pricing/v0/items/:Asin/offers";
+
+ private static final String URI_CMD_GET_PRICING_ITEMS_HOST = "https://sellingpartnerapi-eu.amazon.com";
+
+ private static final String URI_CMD_GET_PRICING_ITEMS_ENDPOINT = "/batches/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice";
+
+ public AmzSellerApi(Attivita attivita) {
+ this.apFull = attivita.getApFull();
+ this.lwaClientId = attivita.getAmzLwaClientId();
+ this.lwaClientSecret = attivita.getAmzLwaClientSecret();
+ this.lwaAuthToken = attivita.getAmzLwaAuthToken();
+ this.lwaAccessToken = attivita.getAmzLwaAccessToken();
+ this.lwaAccessTokenExpireTS = attivita.getAmzLwaAccessTokenExpireTS();
+ this.iamAccessKey = attivita.getAmzIamAccessKey();
+ this.iamRoleARN = attivita.getAmzIamRoleARN();
+ this.iamSecretKey = attivita.getAmzIamSecretKey();
+ this.stsAccessKeyId = attivita.getAmzStsAccessKeyId();
+ this.stsSecretAccessKey = attivita.getAmzStsSecretAccessKey();
+ this.stsSessionToken = attivita.getAmzStsSessionToken();
+ this.stsSessionTokenTS = attivita.getAmzStsSessionTokenTS();
+ StringTokenizer st = new StringTokenizer(attivita.getAmzMarketplaces(), ",");
+ while (st.hasMoreTokens()) {
+ String currentLang = st.nextToken();
+ String currentId = st.nextToken();
+ getHmMarketplaces().put(currentLang, currentId);
+ }
+ }
+
+ public AmzSellerApi() {}
+
+ public static void initApplicationParms(ApplParmFull ap) {
+ if (ap != null) {
+ DBAdapter.logDebug(true, "AMAZON initParms: start");
+ DBAdapter.logDebug(true, "AMAZON initParms: stop");
+ }
+ }
+
+ public static void main(String[] args) {
+ String hostname = "localhost:3308";
+ String db = "cc";
+ ApplParmFull ap = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, db, "root", "root", 1, 10, 300));
+ AmzSellerApi bean = new AmzSellerApi(Attivita.getDefaultInstance(ap));
+ Articolo articolo = new Articolo(ap);
+ articolo.findByCodiceEanSerie("8714574523347", null);
+ ArticoloCR CR = new ArticoloCR();
+ CR.setId_articolo(articolo.getId_articolo());
+ JSONObject item = bean.getJsonOfferByArticolo(articolo, "it");
+ System.out.println("json amz item:\n" + item.toString(4));
+ AmzResult res = bean.amzPutListingsItem(articolo, "it");
+ System.out.println(res.getMsg() + "\n" + res.getMsg());
+ }
+
+ public ApplParmFull getApFull() {
+ return this.apFull;
+ }
+
+ public void setApFull(ApplParmFull apFull) {
+ this.apFull = apFull;
+ }
+
+ public Attivita getAttivita() {
+ if (this.attivita == null)
+ this.attivita = Attivita.getDefaultInstance(getApFull());
+ return this.attivita;
+ }
+
+ public AmzResult amzGetStsAwsCredential() {
+ AmzResult resAR = amzCheckLwaTokens();
+ if (resAR.isOk())
+ try {
+ if (this.debug)
+ System.out.println("AmzSellerApi --> amzGetStsAwsCredential");
+ CloseableHttpClient client = HttpClients.createDefault();
+ String host = "https://sts.amazonaws.com".replace("https://", "");
+ String endPoint = "/";
+ TreeMap queryParms = new TreeMap<>();
+ queryParms.put("Version", "2011-06-15");
+ queryParms.put("Action", "AssumeRole");
+ queryParms.put("RoleSessionName", "_sName" + DBAdapter.getNow().getTime());
+ queryParms.put("RoleArn", getIamRoleARN());
+ HttpGet request = new HttpGet("https://sts.amazonaws.com" + endPoint + getInlineQueryParms(queryParms));
+ TreeMap awsHeaders = new TreeMap<>();
+ awsHeaders.put("host", host);
+ awsHeaders.put("x-amz-access-token", getLwaAccessToken());
+ awsHeaders.put("host", host);
+ AWSV4Auth aWSV4Auth = new AWSV4Auth.Builder(getIamAccessKey(), getIamSecretKey()).regionName("us-east-1").serviceName("sts")
+ .httpMethodName("GET")
+ .canonicalURI(endPoint)
+ .queryParametes(queryParms)
+ .awsHeaders(awsHeaders)
+ .payload(null)
+
+ .build();
+ Map header = aWSV4Auth.getHeaders();
+ for (Map.Entry entrySet : header.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ request.setHeader("Accept", "application/json");
+ for (Map.Entry entrySet : awsHeaders.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ CloseableHttpResponse closeableHttpResponse = client.execute((HttpUriRequest)request);
+ String content = EntityUtils.toString(closeableHttpResponse.getEntity());
+ int statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+ if (this.debug) {
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent = " + content);
+ }
+ if (statusCode >= 400) {
+ resAR.setOk(false);
+ JSONObject jo = new JSONObject(content);
+ resAR.setMsg(jo.toString(2));
+ resAR.setResult(jo);
+ } else {
+ JSONObject jo = new JSONObject(content);
+ JSONObject joCredential = jo.getJSONObject("AssumeRoleResponse").getJSONObject("AssumeRoleResult")
+ .getJSONObject("Credentials");
+ setStsAccessKeyId(joCredential.getString("AccessKeyId"));
+ setStsSecretAccessKey(joCredential.getString("SecretAccessKey"));
+ setStsSessionToken(joCredential.getString("SessionToken"));
+ Calendar cal = Calendar.getInstance();
+ cal.add(12, 59);
+ Timestamp ts = new Timestamp(cal.getTime().getTime());
+ if (this.debug)
+ System.out.println("Token expires on " + ts.toString());
+ setStsSessionTokenTS(ts);
+ getAttivita().setAmzStsAccessKeyId(getStsAccessKeyId());
+ getAttivita().setAmzStsSecretAccessKey(getStsSecretAccessKey());
+ getAttivita().setAmzStsSessionToken(getStsSessionToken());
+ getAttivita().setAmzStsSessionTokenTS(getStsSessionTokenTS());
+ getAttivita().save();
+ if (this.debug)
+ System.out.println(jo.toString(4));
+ resAR.setMsg("SessionToken found");
+ resAR.setOk(true);
+ resAR.setResult(getStsSessionToken());
+ }
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ resAR.setOk(false);
+ resAR.setMsg(e.getMessage());
+ }
+ return resAR;
+ }
+
+ private String getInlineQueryParms(TreeMap queryParms) {
+ if (queryParms.size() == 0)
+ return "";
+ String delim = "?";
+ StringBuilder sbParms = new StringBuilder();
+ for (Map.Entry entry : queryParms.entrySet()) {
+ sbParms.append(delim);
+ sbParms.append(entry.getKey());
+ sbParms.append("=");
+ sbParms.append(entry.getValue());
+ delim = "&";
+ }
+ return sbParms.toString();
+ }
+
+ public String getLwaClientId() {
+ return (this.lwaClientId == null) ? "" : this.lwaClientId.trim();
+ }
+
+ public void setLwaClientId(String googleApiKey) {
+ this.lwaClientId = googleApiKey;
+ }
+
+ public String getLwaClientSecret() {
+ return this.lwaClientSecret;
+ }
+
+ public void setLwaClientSecret(String lwaClientSecret) {
+ this.lwaClientSecret = lwaClientSecret;
+ }
+
+ public String getLwaAuthToken() {
+ return this.lwaAuthToken;
+ }
+
+ public void setLwaAuthToken(String lwaAuthToken) {
+ this.lwaAuthToken = lwaAuthToken;
+ }
+
+ public String getLwaAccessToken() {
+ return (this.lwaAccessToken == null) ? "" : this.lwaAccessToken.trim();
+ }
+
+ public void setLwaAccessToken(String lwaAccessToken) {
+ this.lwaAccessToken = lwaAccessToken;
+ }
+
+ public String getLwaRefreshToken() {
+ return this.lwaRefreshToken;
+ }
+
+ public void setLwaRefreshToken(String lwaRefreshToken) {
+ this.lwaRefreshToken = lwaRefreshToken;
+ }
+
+ public Timestamp getLwaAccessTokenExpireTS() {
+ return this.lwaAccessTokenExpireTS;
+ }
+
+ public void setLwaAccessTokenExpireTS(Timestamp lwaAccessTokenExpireTS) {
+ this.lwaAccessTokenExpireTS = lwaAccessTokenExpireTS;
+ }
+
+ public String getStsAccessKeyId() {
+ return this.stsAccessKeyId;
+ }
+
+ public void setStsAccessKeyId(String stsAccessKeyId) {
+ this.stsAccessKeyId = stsAccessKeyId;
+ }
+
+ public String getStsSecretAccessKey() {
+ return this.stsSecretAccessKey;
+ }
+
+ public void setStsSecretAccessKey(String stsSecretAccessKey) {
+ this.stsSecretAccessKey = stsSecretAccessKey;
+ }
+
+ public String getStsSessionToken() {
+ return (this.stsSessionToken == null) ? "" : this.stsSessionToken.trim();
+ }
+
+ public void setStsSessionToken(String stsSessionToken) {
+ this.stsSessionToken = stsSessionToken;
+ }
+
+ public Timestamp getStsSessionTokenTS() {
+ return this.stsSessionTokenTS;
+ }
+
+ public void setStsSessionTokenTS(Timestamp stsSessionTokenTS) {
+ this.stsSessionTokenTS = stsSessionTokenTS;
+ }
+
+ public String getIamRoleARN() {
+ return this.iamRoleARN;
+ }
+
+ public void setIamRoleARN(String iamRoleARN) {
+ this.iamRoleARN = iamRoleARN;
+ }
+
+ public String getIamAccessKey() {
+ return this.iamAccessKey;
+ }
+
+ public void setIamAccessKey(String iamAccessKey) {
+ this.iamAccessKey = iamAccessKey;
+ }
+
+ public String getIamSecretKey() {
+ return this.iamSecretKey;
+ }
+
+ public void setIamSecretKey(String iamSecretKey) {
+ this.iamSecretKey = iamSecretKey;
+ }
+
+ public AmzResult amzPostLwaAccessToken() {
+ AmzResult resAR = new AmzResult();
+ try {
+ if (this.debug)
+ System.out.println("AmzSellerApi --> amzGetLwaAccessToken");
+ CloseableHttpClient client = HttpClients.createDefault();
+ HttpPost request = new HttpPost("https://api.amazon.com/auth/o2/token");
+ request.setHeader("Accept", "application/json");
+ request.setHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
+ request.setHeader("Content-Language", "it-IT");
+ List form = new ArrayList<>();
+ form.add(new BasicNameValuePair("client_id", getLwaClientId()));
+ form.add(new BasicNameValuePair("client_secret", getLwaClientSecret()));
+ form.add(new BasicNameValuePair("grant_type", "refresh_token"));
+ form.add(new BasicNameValuePair("refresh_token", getLwaAuthToken()));
+ UrlEncodedFormEntity entity = new UrlEncodedFormEntity(form, Consts.UTF_8);
+ request.setEntity((HttpEntity)entity);
+ CloseableHttpResponse closeableHttpResponse = client.execute((HttpUriRequest)request);
+ String content = EntityUtils.toString(closeableHttpResponse.getEntity());
+ int statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+ if (this.debug) {
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent = " + content);
+ }
+ if (statusCode >= 400) {
+ resAR.setOk(false);
+ JSONObject jo = new JSONObject(content);
+ resAR.setMsg(jo.toString(2));
+ resAR.setResult(jo);
+ } else {
+ JSONObject jo = new JSONObject(content);
+ setLwaAccessToken(jo.getString("access_token"));
+ setLwaRefreshToken(jo.getString("refresh_token"));
+ long expiresSecs = jo.getLong("expires_in");
+ long expiresMils = (expiresSecs - 60L) * 1000L;
+ Calendar cal = Calendar.getInstance();
+ Timestamp ts = new Timestamp(cal.getTime().getTime() + expiresMils);
+ if (this.debug)
+ System.out.println("Token expires on " + ts.toString());
+ setLwaAccessTokenExpireTS(ts);
+ getAttivita().setAmzLwaAccessToken(getLwaAccessToken());
+ getAttivita().setAmzLwaRefreshToken(getLwaRefreshToken());
+ getAttivita().setAmzLwaAccessTokenExpireTS(getLwaAccessTokenExpireTS());
+ getAttivita().save();
+ if (this.debug)
+ System.out.println(jo.toString(4));
+ resAR.setMsg("access_token found");
+ resAR.setOk(true);
+ resAR.setResult(getLwaAccessToken());
+ }
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ resAR.setOk(false);
+ resAR.setMsg(e.getMessage());
+ }
+ return resAR;
+ }
+
+ public boolean isLwaAccessTokenExpired() {
+ if (getLwaAccessToken().isEmpty())
+ return true;
+ if (getLwaAccessTokenExpireTS() == null)
+ return true;
+ if (DBAdapter.getTimeDiff(DBAdapter.getTimestamp(), getLwaAccessTokenExpireTS()) <= 0L)
+ return true;
+ return false;
+ }
+
+ public boolean isStsSessionTokenExpired() {
+ if (isLwaAccessTokenExpired())
+ return true;
+ if (getStsSessionToken().isEmpty())
+ return true;
+ if (getStsSessionTokenTS() == null)
+ return true;
+ if (DBAdapter.getTimeDiff(DBAdapter.getTimestamp(), getStsSessionTokenTS()) <= 0L)
+ return true;
+ return false;
+ }
+
+ public HashMap getHmMarketplaces() {
+ if (this.hmMarketplaces == null)
+ this.hmMarketplaces = new HashMap<>();
+ return this.hmMarketplaces;
+ }
+
+ private String getMarketplacesIds(String marketplaceLangs) {
+ StringBuilder sb = new StringBuilder();
+ StringTokenizer st = new StringTokenizer(marketplaceLangs, ",");
+ String theComma = "";
+ while (st.hasMoreTokens()) {
+ String currentLang = st.nextToken();
+ if (getHmMarketplaces().containsKey(currentLang)) {
+ sb.append(theComma);
+ sb.append(getHmMarketplaces().get(currentLang));
+ theComma = ",";
+ }
+ }
+ return sb.toString();
+ }
+
+ public void setHmMarketplaces(HashMap hmMarketplaces) {
+ this.hmMarketplaces = hmMarketplaces;
+ }
+
+ public String getMatketplaceId(String countryCode) {
+ if (getHmMarketplaces().containsKey(countryCode))
+ return getHmMarketplaces().get(countryCode);
+ return "";
+ }
+
+ public AmzResult amzGetCatalogItems(Articolo articolo, String marketplaceLangs) {
+ AmzResult resAR = amzCheckTokensApi(marketplaceLangs);
+ if (resAR.isOk())
+ try {
+ if (this.debug)
+ System.out.println("AmzSellerApi --> amzGetCatalogItems");
+ CloseableHttpClient client = HttpClients.createDefault();
+ String host = "https://sellingpartnerapi-eu.amazon.com".replace("https://", "");
+ String endPoint = "/catalog/2022-04-01/items";
+ TreeMap queryParms = new TreeMap<>();
+ queryParms.put("marketplaceIds", getMarketplacesIds(marketplaceLangs));
+ queryParms.put("identifiers", articolo.getCodiceEan());
+ queryParms.put("identifiersType", "EAN");
+ queryParms.put("includedData", "productTypes,summaries");
+ queryParms.put("locale", "it_IT");
+ queryParms.put("sellerId", getAttivita().getAmzSellerid());
+ HttpGet request = new HttpGet("https://sellingpartnerapi-eu.amazon.com" + endPoint + getInlineQueryParms(queryParms));
+ TreeMap awsHeaders = new TreeMap<>();
+ awsHeaders.put("host", host);
+ awsHeaders.put("x-amz-access-token", getLwaAccessToken());
+ awsHeaders.put("x-amz-security-token", getStsSessionToken());
+ awsHeaders.put("Content-Type".toLowerCase(), "application/json");
+ AWSV4Auth aWSV4Auth = new AWSV4Auth.Builder(getStsAccessKeyId(), getStsSecretAccessKey()).regionName("eu-west-1")
+ .serviceName("execute-api").httpMethodName("GET").canonicalURI(endPoint).awsHeaders(awsHeaders)
+ .queryParametes(queryParms).payload(null)
+
+ .build();
+ if (this.debug) {
+ System.out.println("stsaccesskey: " + getStsAccessKeyId());
+ System.out.println("stsSecretAccessKey: " + getStsSecretAccessKey());
+ }
+ Map header = aWSV4Auth.getHeaders();
+ for (Map.Entry entrySet : header.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ for (Map.Entry entrySet : awsHeaders.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ CloseableHttpResponse closeableHttpResponse = client.execute((HttpUriRequest)request);
+ String content = EntityUtils.toString(closeableHttpResponse.getEntity());
+ int statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+ if (this.debug) {
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent = " + content);
+ }
+ if (statusCode >= 400) {
+ resAR.setOk(false);
+ resAR.setMsg(content);
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent= " + content);
+ } else {
+ JSONObject jo = new JSONObject(content);
+ JSONArray jaItems = jo.getJSONArray("items");
+ if (jo.getLong("numberOfResults") > 0L) {
+ boolean asinTrovato = false;
+ for (int i = 0; i < jaItems.length(); i++) {
+ JSONObject itemI = jaItems.getJSONObject(i);
+ JSONObject summariesI = itemI.getJSONArray("summaries").getJSONObject(0);
+ String asinI = itemI.getString("asin");
+ String productTypeI = itemI.getJSONArray("productTypes").getJSONObject(0).getString("productType");
+ if (summariesI.has("modelNumber")) {
+ String modelNumberI = summariesI.getString("modelNumber");
+ if (articolo.getCodiceProduttore().toLowerCase().equals(modelNumberI.toLowerCase()) ||
+ articolo.getDescrizioneSearch().toLowerCase().contains(modelNumberI.toLowerCase())) {
+ String l_descAmz = asinI + " " + asinI + " " + modelNumberI + " " + summariesI.getString("brand");
+ if (articolo.getAsinAmz().isEmpty() || articolo.getProductTypeAmz().isEmpty() ||
+ !articolo.getDescAmz().equals(l_descAmz)) {
+ if (articolo.getAsinAmz().isEmpty())
+ articolo.setAsinAmz(asinI);
+ if (articolo.getProductTypeAmz().isEmpty())
+ articolo.setProductTypeAmz(productTypeI);
+ articolo.setDescAmz(l_descAmz);
+ articolo.setFlgAmzWarn(0L);
+ articolo.superSave();
+ }
+ asinTrovato = true;
+ break;
+ }
+ }
+ }
+ if (asinTrovato) {
+ resAR.setMsg("Item found: " + articolo.getDescAmz());
+ resAR.setOk(true);
+ resAR.setResult(jo);
+ } else {
+ resAR.setMsg("Item found but item MPN not found. Get first and warn!");
+ resAR.setOk(false);
+ resAR.setResult(jo);
+ JSONObject item0 = jaItems.getJSONObject(0);
+ String productType0 = item0.getJSONArray("productTypes").getJSONObject(0).getString("productType");
+ String asin = item0.getString("asin");
+ JSONObject summaries0 = item0.getJSONArray("summaries").getJSONObject(0);
+ String modelNumber0 = "";
+ if (summaries0.has("modelNumber"))
+ modelNumber0 = summaries0.getString("modelNumber");
+ String l_descAmz = "(!) " + asin + " " + modelNumber0 + " " + summaries0.getString("brand") + " " +
+ summaries0.getString("itemName");
+ articolo.setFlgAmzWarn(1L);
+ if (articolo.getAsinAmz().isEmpty())
+ articolo.setAsinAmz(asin);
+ if (articolo.getProductTypeAmz().isEmpty())
+ articolo.setProductTypeAmz(productType0);
+ articolo.setFlgAmazon(2L);
+ articolo.setDescAmz(l_descAmz);
+ articolo.superSave();
+ }
+ } else {
+ if (!articolo.getAsinAmz().isEmpty()) {
+ articolo.setAsinAmz("");
+ articolo.setProductTypeAmz("");
+ articolo.setDescAmz(articolo.getCodiceEanNoZero() + " NON TROVATO");
+ articolo.superSave();
+ }
+ resAR.setMsg("NO item in catalog for ean " + articolo.getCodiceEanNoZero());
+ resAR.setOk(false);
+ resAR.setResult(jo);
+ }
+ if (this.debug)
+ System.out.println(jo.toString(4));
+ }
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ resAR.setOk(false);
+ resAR.setMsg(e.getMessage());
+ }
+ return resAR;
+ }
+
+ private AmzResult amzCheckTokensApi(String marketplaceLangs) {
+ AmzResult resAR = new AmzResult();
+ if (isStsSessionTokenExpired()) {
+ System.out.println("AmzSellerApi --> amzCheckTokensApi ");
+ resAR = amzGetStsAwsCredential();
+ }
+ if (resAR.isOk()) {
+ boolean merchantIdsOk = true;
+ StringTokenizer st = new StringTokenizer(marketplaceLangs, ",");
+ while (st.hasMoreTokens()) {
+ String currentLang = st.nextToken();
+ if (!getHmMarketplaces().containsKey(currentLang)) {
+ merchantIdsOk = false;
+ break;
+ }
+ }
+ if (!merchantIdsOk) {
+ resAR = amzGetMarketplaces();
+ st = new StringTokenizer(marketplaceLangs, ",");
+ merchantIdsOk = true;
+ while (st.hasMoreTokens()) {
+ String currentLang = st.nextToken();
+ if (!getHmMarketplaces().containsKey(currentLang)) {
+ merchantIdsOk = false;
+ break;
+ }
+ }
+ if (!merchantIdsOk) {
+ resAR.setOk(false);
+ resAR.setMsg("ERRORE! Non sono stati trovati tutti i merchantIds: " + marketplaceLangs + " trovati: " +
+ getAttivita().getAmzMarketplaces());
+ }
+ }
+ }
+ return resAR;
+ }
+
+ private AmzResult amzCheckLwaTokens() {
+ AmzResult resAR = new AmzResult();
+ if (isLwaAccessTokenExpired()) {
+ System.out.println("AmzSellerApi --> amzCheckLwaTokens");
+ resAR = amzPostLwaAccessToken();
+ }
+ return resAR;
+ }
+
+ public AmzResult amzGetMarketplaces() {
+ AmzResult resAR = new AmzResult();
+ if (isStsSessionTokenExpired()) {
+ System.out.println("AmzSellerApi --> amzGetMarketplaces --> isStsSessionTokenExpired");
+ resAR = amzGetStsAwsCredential();
+ }
+ if (resAR.isOk())
+ try {
+ if (this.debug)
+ System.out.println("AmzSellerApi --> amzGetMarketplaces");
+ CloseableHttpClient client = HttpClients.createDefault();
+ String host = "https://sellingpartnerapi-eu.amazon.com".replace("https://", "");
+ String endPoint = "/sellers/v1/marketplaceParticipations";
+ TreeMap queryParms = new TreeMap<>();
+ HttpGet request = new HttpGet("https://sellingpartnerapi-eu.amazon.com" + endPoint);
+ TreeMap awsHeaders = new TreeMap<>();
+ awsHeaders.put("host", host);
+ awsHeaders.put("x-amz-access-token", getLwaAccessToken());
+ awsHeaders.put("x-amz-security-token", getStsSessionToken());
+ AWSV4Auth aWSV4Auth = new AWSV4Auth.Builder(getStsAccessKeyId(), getStsSecretAccessKey()).regionName("eu-west-1")
+ .serviceName("execute-api").httpMethodName("GET").canonicalURI(endPoint).awsHeaders(awsHeaders).payload(null)
+
+ .build();
+ if (this.debug) {
+ System.out.println("stsaccesskey: " + getStsAccessKeyId());
+ System.out.println("stsSecretAccessKey: " + getStsSecretAccessKey());
+ }
+ Map header = aWSV4Auth.getHeaders();
+ for (Map.Entry entrySet : header.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ for (Map.Entry entrySet : awsHeaders.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ CloseableHttpResponse closeableHttpResponse = client.execute((HttpUriRequest)request);
+ String content = EntityUtils.toString(closeableHttpResponse.getEntity());
+ int statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+ if (this.debug) {
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent = " + content);
+ }
+ if (statusCode >= 400) {
+ resAR.setOk(false);
+ JSONObject jo = new JSONObject(content);
+ resAR.setMsg(jo.toString(2));
+ resAR.setResult(jo);
+ } else {
+ if (getHmMarketplaces().size() > 0)
+ this.hmMarketplaces = new HashMap<>();
+ StringBuilder sbMPlace = new StringBuilder();
+ JSONObject jo = new JSONObject(content);
+ JSONArray joPayload = jo.getJSONArray("payload");
+ for (int i = 0; i < joPayload.length(); i++) {
+ JSONObject joMPlace = joPayload.getJSONObject(i).getJSONObject("marketplace");
+ getHmMarketplaces().put(joMPlace.getString("countryCode").toLowerCase(), joMPlace.getString("id"));
+ sbMPlace.append(joMPlace.getString("countryCode").toLowerCase());
+ sbMPlace.append(",");
+ sbMPlace.append(joMPlace.getString("id"));
+ if (i + 1 < joPayload.length())
+ sbMPlace.append(",");
+ }
+ getAttivita().setAmzMarketplaces(sbMPlace.toString());
+ getAttivita().save();
+ if (this.debug)
+ System.out.println(jo.toString(4));
+ resAR.setMsg("Marketplaces found");
+ resAR.setOk(true);
+ resAR.setResult(getAttivita().getAmzMarketplaces());
+ }
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ resAR.setOk(false);
+ resAR.setMsg(e.getMessage());
+ }
+ return resAR;
+ }
+
+ public AmzResult amzGetDefinitionProductType(Articolo articolo, String marketplaceLangs) {
+ AmzResult resAR = amzCheckTokensApi(marketplaceLangs);
+ if (resAR.isOk()) {
+ if (articolo.getProductTypeAmz().isEmpty())
+ resAR = amzGetListingsItem(articolo, marketplaceLangs);
+ if (articolo.getProductTypeAmz().isEmpty()) {
+ resAR.setOk(false);
+ resAR.setMsg("ERRORE! Non riesco a trovare il product type per " + articolo.getCodiceEan() + " " + articolo.getNome());
+ }
+ }
+ if (resAR.isOk())
+ try {
+ if (this.debug)
+ System.out.println("AmzSellerApi --> amzGetDefinitionProductType");
+ CloseableHttpClient client = HttpClients.createDefault();
+ String host = "https://sellingpartnerapi-eu.amazon.com".replace("https://", "");
+ String endPoint = "/definitions/2020-09-01/productTypes/:productType".replace(":productType", articolo.getProductTypeAmz());
+ TreeMap queryParms = new TreeMap<>();
+ queryParms.put("marketplaceIds", getMarketplacesIds(marketplaceLangs));
+ queryParms.put("productTypeVersion", "LATEST");
+ queryParms.put("requirements", "LISTING_OFFER_ONLY");
+ queryParms.put("requirementsEnforced", "ENFORCED");
+ queryParms.put("locale", "it_IT");
+ HttpGet request = new HttpGet("https://sellingpartnerapi-eu.amazon.com" + endPoint + getInlineQueryParms(queryParms));
+ TreeMap awsHeaders = new TreeMap<>();
+ awsHeaders.put("host", host);
+ awsHeaders.put("x-amz-access-token", getLwaAccessToken());
+ awsHeaders.put("x-amz-security-token", getStsSessionToken());
+ awsHeaders.put("Content-Type".toLowerCase(), "application/json");
+ AWSV4Auth aWSV4Auth = new AWSV4Auth.Builder(getStsAccessKeyId(), getStsSecretAccessKey()).regionName("eu-west-1")
+ .serviceName("execute-api").httpMethodName("GET").canonicalURI(endPoint).awsHeaders(awsHeaders)
+ .queryParametes(queryParms).payload(null)
+
+ .build();
+ if (this.debug) {
+ System.out.println("stsaccesskey: " + getStsAccessKeyId());
+ System.out.println("stsSecretAccessKey: " + getStsSecretAccessKey());
+ }
+ Map header = aWSV4Auth.getHeaders();
+ for (Map.Entry entrySet : header.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ for (Map.Entry entrySet : awsHeaders.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ CloseableHttpResponse closeableHttpResponse = client.execute((HttpUriRequest)request);
+ String content = EntityUtils.toString(closeableHttpResponse.getEntity());
+ int statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+ if (this.debug) {
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent = " + content);
+ }
+ if (statusCode >= 400) {
+ resAR.setOk(false);
+ resAR.setMsg(content);
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent= " + content);
+ } else {
+ JSONObject jo = new JSONObject(content);
+ if (this.debug)
+ System.out.println(jo.toString(4));
+ resAR.setMsg("Product Type JSON Schema found");
+ resAR.setOk(true);
+ resAR.setResult(jo);
+ }
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ resAR.setOk(false);
+ resAR.setMsg(e.getMessage());
+ }
+ return resAR;
+ }
+
+ private JSONObject getJsonFeaturedOfferExpectedPriceRequestByArticoloCR(ArticoloCR CR, String marketplaceLangs) {
+ String URI_FOEP = "/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice";
+ String GET_METHOD = "GET";
+ JSONObject jo = new JSONObject();
+ JSONArray jaRequest = new JSONArray();
+ Articolo bean = new Articolo(getApFull());
+ Vectumerator vec = bean.findByCR(CR, 0, 0);
+ while (vec.hasMoreElements()) {
+ Articolo row = (Articolo)vec.nextElement();
+ StringTokenizer st = new StringTokenizer(marketplaceLangs, ",");
+ while (st.hasMoreTokens()) {
+ String currentLang = st.nextToken();
+ JSONObject joRequest = new JSONObject();
+ joRequest.put("marketplaceId", getHmMarketplaces().get(currentLang));
+ joRequest.put("sku", row.getCodiceEanNoZero());
+ joRequest.put("method", "GET");
+ joRequest.put("uri", "/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice");
+ jaRequest.put(joRequest);
+ }
+ }
+ jo.put("requests", jaRequest);
+ return jo;
+ }
+
+ public AmzResult amzGetListingsItem(Articolo articolo, String marketplaceLangs) {
+ AmzResult resAR = amzCheckTokensApi(marketplaceLangs);
+ if (resAR.isOk())
+ try {
+ if (this.debug)
+ System.out.println("AmzSellerApi --> amzGetListingsItem");
+ CloseableHttpClient client = HttpClients.createDefault();
+ String host = "https://sellingpartnerapi-eu.amazon.com".replace("https://", "");
+ String endPoint = "/listings/2021-08-01/items/:sellerId/:sku".replace(":sellerId", getAttivita().getAmzSellerid()).replace(":sku",
+ articolo.getCodiceEanNoZero());
+ TreeMap queryParms = new TreeMap<>();
+ queryParms.put("marketplaceIds", getMarketplacesIds(marketplaceLangs));
+ queryParms.put("issueLocale", "it_IT");
+ queryParms.put("includedData", "summaries,offers,attributes,issues,fulfillmentAvailability");
+ HttpGet request = new HttpGet("https://sellingpartnerapi-eu.amazon.com" + endPoint + getInlineQueryParms(queryParms));
+ TreeMap awsHeaders = new TreeMap<>();
+ awsHeaders.put("host", host);
+ awsHeaders.put("x-amz-access-token", getLwaAccessToken());
+ awsHeaders.put("x-amz-security-token", getStsSessionToken());
+ awsHeaders.put("Content-Type".toLowerCase(), "application/json");
+ AWSV4Auth aWSV4Auth = new AWSV4Auth.Builder(getStsAccessKeyId(), getStsSecretAccessKey()).regionName("eu-west-1")
+ .serviceName("execute-api").httpMethodName("GET").canonicalURI(endPoint).awsHeaders(awsHeaders)
+ .queryParametes(queryParms).payload(null)
+
+ .build();
+ if (this.debug) {
+ System.out.println("stsaccesskey: " + getStsAccessKeyId());
+ System.out.println("stsSecretAccessKey: " + getStsSecretAccessKey());
+ }
+ Map header = aWSV4Auth.getHeaders();
+ for (Map.Entry entrySet : header.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ for (Map.Entry entrySet : awsHeaders.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ CloseableHttpResponse closeableHttpResponse = client.execute((HttpUriRequest)request);
+ String content = EntityUtils.toString(closeableHttpResponse.getEntity());
+ int statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+ if (this.debug) {
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent = " + content);
+ }
+ if (statusCode >= 400) {
+ resAR.setOk(false);
+ resAR.setMsg(content);
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent= " + content);
+ } else {
+ JSONObject jo = new JSONObject(content);
+ JSONObject joSummaries0 = jo.getJSONArray("summaries").getJSONObject(0);
+ if (!articolo.getProductTypeAmz().equals(joSummaries0.getString("productType")) ||
+ !articolo.getAsinAmz().equals(joSummaries0.getString("asin"))) {
+ articolo.setProductTypeAmz(joSummaries0.getString("productType"));
+ articolo.setAsinAmz(joSummaries0.getString("asin"));
+ articolo.superSave();
+ }
+ if (this.debug)
+ System.out.println(jo.toString(4));
+ resAR.setMsg("Listing found");
+ resAR.setOk(true);
+ resAR.setResult(jo);
+ }
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ resAR.setOk(false);
+ resAR.setMsg(e.getMessage());
+ }
+ return resAR;
+ }
+
+ public AmzResult amzPutListingsItem(Articolo articolo, String marketplaceLangs) {
+ AmzResult resAR = amzCheckTokensApi(marketplaceLangs);
+ if (resAR.isOk()) {
+ if (articolo.getAsinAmz().isEmpty() || articolo.getProductTypeAmz().isEmpty())
+ resAR = amzGetCatalogItems(articolo, marketplaceLangs);
+ if (articolo.getAsinAmz().isEmpty() || articolo.getProductTypeAmz().isEmpty()) {
+ resAR.setOk(false);
+ resAR.setMsg("ERRORE! Non riesco a trovare il codice asin o product type nel catalogo " + articolo.getCodiceEan() + " " +
+ articolo.getNome());
+ }
+ }
+ if (resAR.isOk())
+ try {
+ if (this.debug)
+ System.out.println("AmzSellerApi --> amzPutListingsItem");
+ CloseableHttpClient client = HttpClients.createDefault();
+ String host = "https://sellingpartnerapi-eu.amazon.com".replace("https://", "");
+ String endPoint = "/listings/2021-08-01/items/:sellerId/:sku".replace(":sellerId", getAttivita().getAmzSellerid()).replace(":sku",
+ articolo.getCodiceEanNoZero());
+ TreeMap queryParms = new TreeMap<>();
+ queryParms.put("marketplaceIds", getMarketplacesIds(marketplaceLangs));
+ queryParms.put("issueLocale", "it_IT");
+ HttpPut request = new HttpPut("https://sellingpartnerapi-eu.amazon.com" + endPoint + getInlineQueryParms(queryParms));
+ JSONObject item = getJsonOfferByArticolo(articolo, marketplaceLangs);
+ String body = item.toString();
+ StringEntity stringEntity = new StringEntity(body, "UTF-8");
+ request.setEntity((HttpEntity)stringEntity);
+ TreeMap awsHeaders = new TreeMap<>();
+ awsHeaders.put("host", host);
+ awsHeaders.put("x-amz-access-token", getLwaAccessToken());
+ awsHeaders.put("x-amz-security-token", getStsSessionToken());
+ awsHeaders.put("x-amz-content-sha256", AWSV4Auth.generateHex(body));
+ awsHeaders.put("Content-Type".toLowerCase(), "application/json");
+ awsHeaders.put("Accept".toLowerCase(), "application/json");
+ AWSV4Auth aWSV4Auth = new AWSV4Auth.Builder(getStsAccessKeyId(), getStsSecretAccessKey()).regionName("eu-west-1")
+ .serviceName("execute-api").httpMethodName("PUT").canonicalURI(endPoint).awsHeaders(awsHeaders)
+ .queryParametes(queryParms).payload(body)
+
+ .build();
+ if (this.debug) {
+ System.out.println("stsaccesskey: " + getStsAccessKeyId());
+ System.out.println("stsSecretAccessKey: " + getStsSecretAccessKey());
+ }
+ Map header = aWSV4Auth.getHeaders();
+ for (Map.Entry entrySet : header.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ for (Map.Entry entrySet : awsHeaders.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ CloseableHttpResponse closeableHttpResponse = client.execute((HttpUriRequest)request);
+ String content = EntityUtils.toString(closeableHttpResponse.getEntity());
+ int statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+ if (this.debug) {
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent = " + content);
+ }
+ if (statusCode >= 400) {
+ resAR.setOk(false);
+ resAR.setMsg(content);
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent= " + content);
+ System.out.println(".");
+ } else {
+ JSONObject jo = new JSONObject(content);
+ if (jo.get("status").equals("ACCEPTED")) {
+ articolo.setQtaSuAmz(articolo.getQtaAmzDaInviare());
+ articolo.setPrezzoSuAmzIva(articolo.getPrezzoArticoloAmazonIvaExport("it", 1L));
+ articolo.setFlgAmzWarn(0L);
+ articolo.superSave();
+ resAR.setMsg("Articolo ean " + articolo.getCodiceEan() + " asin " + articolo.getAsinAmz() + " inserito/aggiornato");
+ resAR.setOk(true);
+ resAR.setResult(jo);
+ } else {
+ resAR.setMsg("Articolo ean " + articolo.getCodiceEan() + " asin " + articolo.getAsinAmz() + " NON AGGIORNATO: " +
+ jo.getJSONArray("issues").toString(2));
+ resAR.setOk(false);
+ resAR.setResult(jo);
+ articolo.setFlgAmzWarn(1L);
+ articolo.superSave();
+ System.out.println(jo.toString(4));
+ }
+ if (this.debug)
+ System.out.println(jo.toString(4));
+ }
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ resAR.setOk(false);
+ resAR.setMsg(e.getMessage());
+ }
+ return resAR;
+ }
+
+ public AmzResult amzDelListingsItem(Articolo articolo, String marketplaceLangs) {
+ AmzResult resAR = amzCheckTokensApi(marketplaceLangs);
+ if (resAR.isOk())
+ try {
+ if (this.debug)
+ System.out.println("AmzSellerApi --> amzDelListingsItem");
+ CloseableHttpClient client = HttpClients.createDefault();
+ String host = "https://sellingpartnerapi-eu.amazon.com".replace("https://", "");
+ String endPoint = "/listings/2021-08-01/items/:sellerId/:sku".replace(":sellerId", getAttivita().getAmzSellerid()).replace(":sku",
+ articolo.getCodiceEanNoZero());
+ TreeMap queryParms = new TreeMap<>();
+ queryParms.put("marketplaceIds", getMarketplacesIds(marketplaceLangs));
+ queryParms.put("issueLocale", "it_IT");
+ HttpDelete request = new HttpDelete("https://sellingpartnerapi-eu.amazon.com" + endPoint + getInlineQueryParms(queryParms));
+ TreeMap awsHeaders = new TreeMap<>();
+ awsHeaders.put("host", host);
+ awsHeaders.put("x-amz-access-token", getLwaAccessToken());
+ awsHeaders.put("x-amz-security-token", getStsSessionToken());
+ awsHeaders.put("Accept".toLowerCase(), "application/json");
+ AWSV4Auth aWSV4Auth = new AWSV4Auth.Builder(getStsAccessKeyId(), getStsSecretAccessKey()).regionName("eu-west-1")
+ .serviceName("execute-api").httpMethodName("DELETE").canonicalURI(endPoint).awsHeaders(awsHeaders)
+ .queryParametes(queryParms).payload(null)
+
+ .build();
+ if (this.debug) {
+ System.out.println("stsaccesskey: " + getStsAccessKeyId());
+ System.out.println("stsSecretAccessKey: " + getStsSecretAccessKey());
+ }
+ Map header = aWSV4Auth.getHeaders();
+ for (Map.Entry entrySet : header.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ for (Map.Entry entrySet : awsHeaders.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ CloseableHttpResponse closeableHttpResponse = client.execute((HttpUriRequest)request);
+ String content = EntityUtils.toString(closeableHttpResponse.getEntity());
+ int statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+ if (this.debug) {
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent = " + content);
+ }
+ if (statusCode >= 400) {
+ resAR.setOk(false);
+ resAR.setMsg(content);
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent= " + content);
+ } else {
+ JSONObject jo = new JSONObject(content);
+ if (jo.get("status").equals("ACCEPTED")) {
+ articolo.setFlgAmazon(0L);
+ articolo.superSave();
+ resAR.setMsg("Articolo ean " + articolo.getCodiceEan() + " asin " + articolo.getAsinAmz() + " cancellato");
+ resAR.setOk(true);
+ resAR.setResult(jo);
+ } else {
+ resAR.setMsg("Articolo ean " + articolo.getCodiceEan() + " asin " + articolo.getAsinAmz() + " NON CANCELLATO: " +
+ jo.getJSONArray("issues").toString(2));
+ resAR.setOk(false);
+ resAR.setResult(jo);
+ articolo.setFlgAmzWarn(1L);
+ articolo.superSave();
+ System.out.println(jo.toString(4));
+ }
+ if (this.debug)
+ System.out.println(jo.toString(4));
+ resAR.setMsg("Listing found");
+ resAR.setOk(true);
+ resAR.setResult(jo);
+ }
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ resAR.setOk(false);
+ resAR.setMsg(e.getMessage());
+ }
+ return resAR;
+ }
+
+ public AmzResult amzPostItemsOffersBatch(ArticoloCR CR, String marketplaceLang) {
+ int pageRow = 20;
+ StringBuilder res = new StringBuilder();
+ boolean result = true;
+ Articolo bean = new Articolo(getApFull());
+ Vectumerator vec = bean.findByCR(CR, 1, pageRow);
+ long totPages = (long)vec.getTotNumberOfPages();
+ CR.setPageRow(pageRow);
+ String TAG_THREAD_MSG = CR.getTAG_THREAD_MSG();
+ if (TAG_THREAD_MSG.isEmpty())
+ TAG_THREAD_MSG = "AMZ POST ITEMS OFFERS BATCH";
+ for (int pageNumber = 1; (long)pageNumber <= totPages; pageNumber++) {
+ StatusMsg.updateMsgByTag(getApFull(), TAG_THREAD_MSG, "amzPostItemsOffersBatch pagina " + pageNumber + " su " + totPages + "...");
+ CR.setPageNumber(pageNumber);
+ AmzResult amzResult = amzPostItemsOffersBatchNotPaged(CR, marketplaceLang);
+ res.append(amzResult.getMsg());
+ result &= amzResult.isOk();
+ }
+ AmzResult resAR = new AmzResult(res.toString(), result, null);
+ StatusMsg.deleteMsgByTag(getApFull(), TAG_THREAD_MSG);
+ return resAR;
+ }
+
+ private AmzResult amzPostItemsOffersBatchNotPaged(ArticoloCR CR, String marketplaceLang) {
+ AmzResult resAR = amzCheckTokensApi(marketplaceLang);
+ if (resAR.isOk())
+ try {
+ if (this.debug)
+ System.out.println("AmzSellerApi --> amzgetItemsOffersBatch");
+ CloseableHttpClient client = HttpClients.createDefault();
+ String host = "https://sellingpartnerapi-eu.amazon.com".replace("https://", "");
+ String endPoint = "/batches/products/pricing/v0/itemOffers";
+ TreeMap queryParms = new TreeMap<>();
+ queryParms.put("MarketplaceId", getMarketplacesIds(marketplaceLang));
+ queryParms.put("ItemCondition", "New");
+ HttpPost request = new HttpPost("https://sellingpartnerapi-eu.amazon.com" + endPoint + getInlineQueryParms(queryParms));
+ TreeMap awsHeaders = new TreeMap<>();
+ awsHeaders.put("host", host);
+ awsHeaders.put("x-amz-access-token", getLwaAccessToken());
+ awsHeaders.put("x-amz-security-token", getStsSessionToken());
+ awsHeaders.put("Content-Type".toLowerCase(), "application/json");
+ JSONObject items = getJsonItemsOffersBatchRequestByArticoloCR(CR, marketplaceLang);
+ String body = items.toString(4);
+ StringEntity stringEntity = new StringEntity(items.toString(4), "UTF-8");
+ request.setEntity((HttpEntity)stringEntity);
+ AWSV4Auth aWSV4Auth = new AWSV4Auth.Builder(getStsAccessKeyId(), getStsSecretAccessKey()).regionName("eu-west-1")
+ .serviceName("execute-api").httpMethodName("POST").canonicalURI(endPoint).awsHeaders(awsHeaders)
+ .queryParametes(queryParms).payload(body)
+
+ .build();
+ if (this.debug) {
+ System.out.println("stsaccesskey: " + getStsAccessKeyId());
+ System.out.println("stsSecretAccessKey: " + getStsSecretAccessKey());
+ }
+ Map header = aWSV4Auth.getHeaders();
+ for (Map.Entry entrySet : header.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ for (Map.Entry entrySet : awsHeaders.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ CloseableHttpResponse closeableHttpResponse = client.execute((HttpUriRequest)request);
+ String content = EntityUtils.toString(closeableHttpResponse.getEntity());
+ int statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+ if (this.debug) {
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent = " + content);
+ }
+ if (statusCode >= 400) {
+ resAR.setOk(false);
+ resAR.setMsg(content);
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent= " + content);
+ } else {
+ JSONObject jo = new JSONObject(content);
+ System.out.println(jo.toString(4));
+ ResParm rp = updatePricingOffers(jo);
+ if (this.debug)
+ System.out.println(jo.toString(4));
+ resAR.setMsg("ItemsOffersBatch found");
+ resAR.setOk(true);
+ resAR.setResult(rp.getMsg());
+ }
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ resAR.setOk(false);
+ resAR.setMsg(e.getMessage());
+ }
+ return resAR;
+ }
+
+ public AmzResult amzPostPricing(ArticoloCR CR, String marketplaceLangs) {
+ AmzResult resAR = amzCheckTokensApi(marketplaceLangs);
+ if (resAR.isOk())
+ try {
+ if (this.debug)
+ System.out.println("AmzSellerApi --> amzPostPricing");
+ CloseableHttpClient client = HttpClients.createDefault();
+ String host = "https://sellingpartnerapi-eu.amazon.com".replace("https://", "");
+ String endPoint = "/batches/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice";
+ TreeMap queryParms = new TreeMap<>();
+ HttpPost request = new HttpPost("https://sellingpartnerapi-eu.amazon.com" + endPoint + getInlineQueryParms(queryParms));
+ TreeMap awsHeaders = new TreeMap<>();
+ awsHeaders.put("host", host);
+ awsHeaders.put("x-amz-access-token", getLwaAccessToken());
+ awsHeaders.put("x-amz-security-token", getStsSessionToken());
+ awsHeaders.put("Content-Type".toLowerCase(), "application/json");
+ JSONObject items = getJsonFeaturedOfferExpectedPriceRequestByArticoloCR(CR, marketplaceLangs);
+ String body = items.toString(4);
+ StringEntity stringEntity = new StringEntity(items.toString(4), "UTF-8");
+ request.setEntity((HttpEntity)stringEntity);
+ AWSV4Auth aWSV4Auth = new AWSV4Auth.Builder(getStsAccessKeyId(), getStsSecretAccessKey()).regionName("eu-west-1")
+ .serviceName("execute-api").httpMethodName("POST").canonicalURI(endPoint).awsHeaders(awsHeaders)
+ .queryParametes(null).payload(body)
+
+ .build();
+ if (this.debug) {
+ System.out.println("stsaccesskey: " + getStsAccessKeyId());
+ System.out.println("stsSecretAccessKey: " + getStsSecretAccessKey());
+ }
+ Map header = aWSV4Auth.getHeaders();
+ for (Map.Entry entrySet : header.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ for (Map.Entry entrySet : awsHeaders.entrySet()) {
+ String key = entrySet.getKey();
+ String value = entrySet.getValue();
+ if (this.debug)
+ System.out.println(key + ":" + key);
+ request.setHeader(key, value);
+ }
+ CloseableHttpResponse closeableHttpResponse = client.execute((HttpUriRequest)request);
+ String content = EntityUtils.toString(closeableHttpResponse.getEntity());
+ int statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+ if (this.debug) {
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent = " + content);
+ }
+ if (statusCode >= 400) {
+ resAR.setOk(false);
+ resAR.setMsg(content);
+ System.out.println("Status Code: " + statusCode);
+ System.out.println("\ncontent= " + content);
+ } else {
+ JSONObject jo = new JSONObject(content);
+ ResParm rp = updateFeaturedOEPrice(jo);
+ if (this.debug)
+ System.out.println(jo.toString(4));
+ resAR.setMsg("FEOPrice found");
+ resAR.setOk(true);
+ resAR.setResult(rp.getMsg());
+ }
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ resAR.setOk(false);
+ resAR.setMsg(e.getMessage());
+ }
+ return resAR;
+ }
+
+ private ResParm updatePricingOffers(JSONObject jo) {
+ ResParm rp = new ResParm(true);
+ try {
+ long recordUpdate = 0L, recordError = 0L;
+ StringBuilder sb = new StringBuilder();
+ Articolo bean = new Articolo(getApFull());
+ JSONArray jaResponses = jo.getJSONArray("responses");
+ for (int i = 0; i < jaResponses.length(); i++) {
+ JSONObject joResponse = jaResponses.getJSONObject(i);
+ JSONObject joStatus = joResponse.getJSONObject("status");
+ if (joStatus.getInt("statusCode") == 200) {
+ JSONObject joPayload = joResponse.getJSONObject("body").getJSONObject("payload");
+ String currentLang = (String)getKeyByValue((Map)getHmMarketplaces(), joPayload.getString("marketplaceId"));
+ String currentAsin = joPayload.getString("ASIN");
+ bean.findByAsinAmz(currentAsin);
+ if (bean.getId_articolo() > 0L) {
+ DoubleOperator featuredOfferExpectedPrice = new DoubleOperator();
+ DoubleOperator competingFeaturedOffer = new DoubleOperator();
+ DoubleOperator currentFeaturedOffer = new DoubleOperator();
+ featuredOfferExpectedPrice.setScale(2, 5);
+ competingFeaturedOffer.setScale(2, 5);
+ currentFeaturedOffer.setScale(2, 5);
+ if (joPayload.has("Summary")) {
+ if (joPayload.getJSONObject("Summary").has("LowestPrices")) {
+ JSONObject joLowestPrices0 = joPayload.getJSONObject("Summary").getJSONArray("LowestPrices")
+ .getJSONObject(0);
+ featuredOfferExpectedPrice.add(joLowestPrices0.getJSONObject("ListingPrice").getDouble("Amount"));
+ featuredOfferExpectedPrice.add(joLowestPrices0.getJSONObject("Shipping").getDouble("Amount"));
+ }
+ if (joPayload.getJSONObject("Summary").has("BuyBoxPrices")) {
+ JSONObject joBuyBoxPrices0 = joPayload.getJSONObject("Summary").getJSONArray("BuyBoxPrices")
+ .getJSONObject(0);
+ competingFeaturedOffer.add(joBuyBoxPrices0.getJSONObject("ListingPrice").getDouble("Amount"));
+ competingFeaturedOffer.add(joBuyBoxPrices0.getJSONObject("Shipping").getDouble("Amount"));
+ }
+ AmzFeaturedPrice afp = new AmzFeaturedPrice(getApFull());
+ afp.findByArticoloLang(bean, currentLang);
+ afp.setId_articolo(bean.getId_articolo());
+ afp.setCompetingFOPriceAmz(competingFeaturedOffer.getResult());
+ afp.setCurrentFOPriceAmz(currentFeaturedOffer.getResult());
+ afp.setFeaturedOEPriceAmz(featuredOfferExpectedPrice.getResult());
+ afp.setLang(currentLang);
+ afp.setDataPriceAmz(DBAdapter.getToday());
+ rp = afp.save();
+ if (rp.getStatus()) {
+ recordUpdate++;
+ } else {
+ recordError++;
+ sb.append("err! ");
+ sb.append(rp.getMsg());
+ sb.append("\n");
+ }
+ } else {
+ sb.append("err! ");
+ sb.append(currentAsin);
+ sb.append(" Summary non trovato!\n");
+ }
+ } else {
+ sb.append("err! ");
+ sb.append(currentAsin);
+ sb.append(" non trovato!\n");
+ }
+ } else {
+ sb.append("err! ");
+ sb.append(joStatus.getString("reasonPhrase"));
+ sb.append("\n");
+ }
+ }
+ rp.setMsg("u:" + recordUpdate + " e:" + recordError + " " + sb.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return rp;
+ }
+
+ public static T getKeyByValue(Map map, E value) {
+ for (Map.Entry entry : map.entrySet()) {
+ if (Objects.equals(value, entry.getValue()))
+ return entry.getKey();
+ }
+ return null;
+ }
+
+ private JSONObject getJsonOfferByArticolo(Articolo bean, String marketplaceLangs) {
+ return getJsonOfferByArticoloSicura(bean, marketplaceLangs);
+ }
+
+ private JSONObject getJsonListingOffersBatchRequestByArticoloCR(ArticoloCR CR, String marketplaceLangs) {
+ String URI_PRICING = "/products/pricing/v0/listings/:Sku/offers";
+ String GET_METHOD = "GET";
+ String ITEM_CONDITION = "New";
+ String CUSTOMER_TYPE = "Consumer";
+ JSONObject jo = new JSONObject();
+ JSONArray jaRequest = new JSONArray();
+ Articolo bean = new Articolo(getApFull());
+ Vectumerator vec = bean.findByCR(CR, 0, 0);
+ while (vec.hasMoreElements()) {
+ Articolo row = (Articolo)vec.nextElement();
+ if (!row.getCodiceEanNoZero().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(marketplaceLangs, ",");
+ while (st.hasMoreTokens()) {
+ String currentLang = st.nextToken();
+ JSONObject joRequest = new JSONObject();
+ joRequest.put("marketplaceId", getHmMarketplaces().get(currentLang));
+ joRequest.put("method", "GET");
+ joRequest.put("uri", "/products/pricing/v0/listings/:Sku/offers".replace(":Sku", row.getCodiceEanNoZero()));
+ joRequest.put("ItemCondition", "New");
+ joRequest.put("CustomerType", "Consumer");
+ jaRequest.put(joRequest);
+ }
+ }
+ }
+ jo.put("requests", jaRequest);
+ return jo;
+ }
+
+ private JSONObject getJsonItemsOffersBatchRequestByArticoloCR(ArticoloCR CR, String marketplaceLangs) {
+ String URI_PRICING = "/products/pricing/v0/items/:Asin/offers";
+ String GET_METHOD = "GET";
+ String ITEM_CONDITION = "New";
+ String CUSTOMER_TYPE = "Consumer";
+ JSONObject jo = new JSONObject();
+ JSONArray jaRequest = new JSONArray();
+ Articolo bean = new Articolo(getApFull());
+ Vectumerator vec = bean.findByCR(CR, CR.getPageNumber(), CR.getPageRow());
+ ResParm rp = new ResParm(true);
+ while (vec.hasMoreElements()) {
+ Articolo row = (Articolo)vec.nextElement();
+ if (!row.getAsinAmz().isEmpty()) {
+ StringTokenizer st = new StringTokenizer(marketplaceLangs, ",");
+ while (st.hasMoreTokens()) {
+ String currentLang = st.nextToken();
+ JSONObject joRequest = new JSONObject();
+ joRequest.put("MarketplaceId", getHmMarketplaces().get(currentLang));
+ joRequest.put("method", "GET");
+ joRequest.put("uri", "/products/pricing/v0/items/:Asin/offers".replace(":Asin", row.getAsinAmz()));
+ joRequest.put("ItemCondition", "New");
+ joRequest.put("CustomerType", "Consumer");
+ jaRequest.put(joRequest);
+ }
+ }
+ }
+ jo.put("requests", jaRequest);
+ return jo;
+ }
+
+ private ResParm updateFeaturedOEPrice(JSONObject jo) {
+ ResParm rp = new ResParm(true);
+ try {
+ long recordUpdate = 0L, recordError = 0L;
+ StringBuilder sb = new StringBuilder();
+ Articolo bean = new Articolo(getApFull());
+ JSONArray jaResponses = jo.getJSONArray("responses");
+ for (int i = 0; i < jaResponses.length(); i++) {
+ JSONObject joResponse = jaResponses.getJSONObject(i);
+ JSONObject joStatus = joResponse.getJSONObject("status");
+ if (joStatus.getInt("statusCode") == 200) {
+ JSONObject joRequest = joResponse.getJSONObject("request");
+ String currentLang = (String)getKeyByValue((Map)getHmMarketplaces(), joRequest.getString("marketplaceId"));
+ String currentSku = joRequest.getString("sku");
+ bean.findByCodiceEanSerie(currentSku, null);
+ if (bean.getId_articolo() > 0L) {
+ DoubleOperator featuredOfferExpectedPrice = new DoubleOperator();
+ DoubleOperator competingFeaturedOffer = new DoubleOperator();
+ DoubleOperator currentFeaturedOffer = new DoubleOperator();
+ featuredOfferExpectedPrice.setScale(2, 5);
+ competingFeaturedOffer.setScale(2, 5);
+ currentFeaturedOffer.setScale(2, 5);
+ JSONObject joBody = joResponse.getJSONObject("body");
+ if (joBody.has("featuredOfferExpectedPriceResults")) {
+ JSONObject joFeaturedOfferExpectedPriceResult = joBody.getJSONArray("featuredOfferExpectedPriceResults")
+ .getJSONObject(0);
+ if (joFeaturedOfferExpectedPriceResult.has("featuredOfferExpectedPrice")) {
+ String resultStatus = joFeaturedOfferExpectedPriceResult.getString("resultStatus");
+ if (resultStatus.equals("VALID_FOEP") || resultStatus.equals("NO_COMPETING_OFFER"))
+ featuredOfferExpectedPrice.add(
+ joFeaturedOfferExpectedPriceResult.getJSONObject("featuredOfferExpectedPrice").getJSONObject("listingPrice").getDouble("amount"));
+ }
+ if (joFeaturedOfferExpectedPriceResult.has("competingFeaturedOffer")) {
+ competingFeaturedOffer.add(joFeaturedOfferExpectedPriceResult.getJSONObject("competingFeaturedOffer")
+ .getJSONObject("price").getJSONObject("listingPrice").getDouble("amount"));
+ competingFeaturedOffer.add(joFeaturedOfferExpectedPriceResult.getJSONObject("competingFeaturedOffer")
+ .getJSONObject("price").getJSONObject("shippingPrice").getDouble("amount"));
+ }
+ if (joFeaturedOfferExpectedPriceResult.has("currentFeaturedOffer")) {
+ currentFeaturedOffer.add(joFeaturedOfferExpectedPriceResult.getJSONObject("currentFeaturedOffer")
+ .getJSONObject("price").getJSONObject("listingPrice").getDouble("amount"));
+ currentFeaturedOffer.add(joFeaturedOfferExpectedPriceResult.getJSONObject("currentFeaturedOffer")
+ .getJSONObject("price").getJSONObject("shippingPrice").getDouble("amount"));
+ }
+ AmzFeaturedPrice afp = new AmzFeaturedPrice(getApFull());
+ afp.findByArticoloLang(bean, currentLang);
+ afp.setId_articolo(bean.getId_articolo());
+ afp.setCompetingFOPriceAmz(competingFeaturedOffer.getResult());
+ afp.setCurrentFOPriceAmz(currentFeaturedOffer.getResult());
+ afp.setFeaturedOEPriceAmz(featuredOfferExpectedPrice.getResult());
+ afp.setLang(currentLang);
+ afp.setDataPriceAmz(DBAdapter.getToday());
+ rp = afp.save();
+ if (rp.getStatus()) {
+ recordUpdate++;
+ } else {
+ recordError++;
+ sb.append("err! ");
+ sb.append(rp.getMsg());
+ sb.append("\n");
+ }
+ } else {
+ sb.append("err! ");
+ sb.append(currentSku);
+ sb.append(" featuredOfferExpectedPriceResults non trovato!\n");
+ }
+ } else {
+ sb.append("err! ");
+ sb.append(currentSku);
+ sb.append(" non trovato!\n");
+ }
+ } else {
+ sb.append("err! ");
+ sb.append(joStatus.getString("reasonPhrase"));
+ sb.append("\n");
+ }
+ }
+ rp.setMsg("u:" + recordUpdate + " e:" + recordError + " " + sb.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return rp;
+ }
+
+ private JSONObject getJsonOfferByArticoloMod(Articolo bean, String marketplaceLangs) {
+ JSONObject jo = new JSONObject();
+ String lang = "it";
+ jo.put("sku", bean.getCodiceEanNoZero());
+ JSONArray jaOffers = new JSONArray();
+ JSONArray jaPurchasable_offer = new JSONArray();
+ JSONArray jaFulfillment_availability = new JSONArray();
+ JSONArray jaCondition_type = new JSONArray();
+ JSONArray jaCountry_of_origin = new JSONArray();
+ JSONArray jaMerchant_shipping_group = new JSONArray();
+ JSONArray jaMerchant_suggested_asin = new JSONArray();
+ StringTokenizer st = new StringTokenizer(marketplaceLangs, ",");
+ while (st.hasMoreTokens()) {
+ String currentLang = st.nextToken();
+ String marketplaceID = getHmMarketplaces().get(currentLang);
+ JSONObject joFulfillment_availability = new JSONObject();
+ joFulfillment_availability.put("marketplaceid", marketplaceID);
+ joFulfillment_availability.put("quantity", bean.getQtaAmzDaInviare());
+ joFulfillment_availability.put("fulfillment_channel_code", "DEFAULT");
+ joFulfillment_availability.put("lead_time_to_ship_max_days", 3);
+ jaFulfillment_availability.put(joFulfillment_availability);
+ JSONObject joCondition_type = new JSONObject();
+ joCondition_type.put("marketplaceid", marketplaceID);
+ joCondition_type.put("value", "new_new");
+ jaCondition_type.put(joCondition_type);
+ JSONObject joCountry_of_origin = new JSONObject();
+ joCountry_of_origin.put("marketplaceid", marketplaceID);
+ joCountry_of_origin.put("value", "IT");
+ jaCountry_of_origin.put(joCountry_of_origin);
+ JSONObject joMerchant_shipping_group = new JSONObject();
+ joMerchant_shipping_group.put("marketplaceid", marketplaceID);
+ if (bean.getFlgPriceTypeAmz() == 0L) {
+ joMerchant_shipping_group.put("value", "legacy-template-id");
+ } else {
+ joMerchant_shipping_group.put("value", getAttivita().getAmzMerchantShippingGroupFree());
+ }
+ jaMerchant_shipping_group.put(joMerchant_shipping_group);
+ JSONObject joMerchant_suggested_asin = new JSONObject();
+ joMerchant_suggested_asin.put("marketplaceid", marketplaceID);
+ joMerchant_suggested_asin.put("value", bean.getAsinAmz());
+ jaMerchant_suggested_asin.put(joMerchant_suggested_asin);
+ JSONObject joPurchasable_offerB2C = new JSONObject();
+ joPurchasable_offerB2C.put("marketplaceid", marketplaceID);
+ joPurchasable_offerB2C.put("currency", "EUR");
+ joPurchasable_offerB2C.put("offerType", "B2C");
+ JSONObject joPurchasable_offerB2B = new JSONObject();
+ joPurchasable_offerB2B.put("marketplaceid", marketplaceID);
+ joPurchasable_offerB2B.put("currency", "EUR");
+ joPurchasable_offerB2B.put("offerType", "B2B");
+ JSONArray jaOur_price = new JSONArray();
+ JSONObject joOur_price = new JSONObject();
+ JSONArray jaSchedule = new JSONArray();
+ JSONObject joSchedule = new JSONObject();
+ joSchedule.put("value_with_tax", bean.getPrezzoArticoloAmazonIvaExport(currentLang, 1L));
+ jaSchedule.put(joSchedule);
+ joOur_price.put("schedule", jaSchedule);
+ jaOur_price.put(joOur_price);
+ joPurchasable_offerB2C.put("our_price", jaOur_price);
+ joPurchasable_offerB2B.put("our_price", jaOur_price);
+ jaPurchasable_offer.put(joPurchasable_offerB2C);
+ jaPurchasable_offer.put(joPurchasable_offerB2B);
+ }
+ jo.put("productType", bean.getProductTypeAmz());
+ jo.put("requirements", "LISTING_OFFER_ONLY");
+ JSONObject joAttributes = new JSONObject();
+ joAttributes.put("purchasable_offer", jaPurchasable_offer);
+ joAttributes.put("fulfillment_availability", jaFulfillment_availability);
+ joAttributes.put("condition_type", jaCondition_type);
+ joAttributes.put("country_of_origin", jaCountry_of_origin);
+ joAttributes.put("merchant_shipping_group", jaMerchant_shipping_group);
+ joAttributes.put("merchant_suggested_asin", jaMerchant_suggested_asin);
+ jo.put("attributes", joAttributes);
+ return jo;
+ }
+
+ private JSONObject getJsonOfferByArticoloSicura(Articolo bean, String marketplaceLangs) {
+ JSONObject jo = new JSONObject();
+ String lang = "it";
+ jo.put("sku", bean.getCodiceEanNoZero());
+ JSONArray jaOffers = new JSONArray();
+ JSONArray jaPurchasable_offer = new JSONArray();
+ JSONArray jaFulfillment_availability = new JSONArray();
+ JSONArray jaCondition_type = new JSONArray();
+ JSONArray jaCountry_of_origin = new JSONArray();
+ JSONArray jaMerchant_shipping_group = new JSONArray();
+ JSONArray jaMerchant_suggested_asin = new JSONArray();
+ StringTokenizer st = new StringTokenizer(marketplaceLangs, ",");
+ while (st.hasMoreTokens()) {
+ String currentLang = st.nextToken();
+ String marketplaceID = getHmMarketplaces().get(currentLang);
+ JSONObject joOfferB2C = new JSONObject();
+ joOfferB2C.put("marketplaceid", marketplaceID);
+ joOfferB2C.put("offerType", "B2C");
+ JSONObject joPriceB2C = new JSONObject();
+ joPriceB2C.put("amount", bean.getPrezzoArticoloAmazonIvaExport(currentLang, 1L));
+ joPriceB2C.put("currency", "EUR");
+ joPriceB2C.put("currencyCode", "EUR");
+ joOfferB2C.put("price", joPriceB2C);
+ jaOffers.put(joOfferB2C);
+ JSONObject joOfferB2B = new JSONObject();
+ joOfferB2B.put("marketplaceid", marketplaceID);
+ joOfferB2B.put("offerType", "B2B");
+ JSONObject joPriceB2B = new JSONObject();
+ joPriceB2B.put("amount", bean.getPrezzoArticoloAmazonIvaExport(currentLang, 1L));
+ joPriceB2B.put("currency", "EUR");
+ joPriceB2B.put("currencyCode", "EUR");
+ joOfferB2B.put("price", joPriceB2B);
+ jaOffers.put(joOfferB2B);
+ JSONObject joFulfillment_availability = new JSONObject();
+ joFulfillment_availability.put("marketplaceid", marketplaceID);
+ joFulfillment_availability.put("quantity", bean.getQtaAmzDaInviare());
+ joFulfillment_availability.put("fulfillment_channel_code", "DEFAULT");
+ joFulfillment_availability.put("lead_time_to_ship_max_days", 3);
+ jaFulfillment_availability.put(joFulfillment_availability);
+ JSONObject joCondition_type = new JSONObject();
+ joCondition_type.put("marketplaceid", marketplaceID);
+ joCondition_type.put("value", "new_new");
+ jaCondition_type.put(joCondition_type);
+ JSONObject joCountry_of_origin = new JSONObject();
+ joCountry_of_origin.put("marketplaceid", marketplaceID);
+ joCountry_of_origin.put("value", "IT");
+ jaCountry_of_origin.put(joCountry_of_origin);
+ JSONObject joMerchant_shipping_group = new JSONObject();
+ joMerchant_shipping_group.put("marketplaceid", marketplaceID);
+ if (bean.getFlgPriceTypeAmz() == 0L) {
+ joMerchant_shipping_group.put("value", "legacy-template-id");
+ } else {
+ joMerchant_shipping_group.put("value", getAttivita().getAmzMerchantShippingGroupFree());
+ }
+ jaMerchant_shipping_group.put(joMerchant_shipping_group);
+ JSONObject joMerchant_suggested_asin = new JSONObject();
+ joMerchant_suggested_asin.put("marketplaceid", marketplaceID);
+ joMerchant_suggested_asin.put("value", bean.getAsinAmz());
+ jaMerchant_suggested_asin.put(joMerchant_suggested_asin);
+ JSONObject joPurchasable_offer = new JSONObject();
+ joPurchasable_offer.put("marketplaceid", marketplaceID);
+ joPurchasable_offer.put("currency", "EUR");
+ JSONArray jaOur_price = new JSONArray();
+ JSONObject joOur_price = new JSONObject();
+ JSONArray jaSchedule = new JSONArray();
+ JSONObject joSchedule = new JSONObject();
+ joSchedule.put("value_with_tax", bean.getPrezzoArticoloAmazonIvaExport(currentLang, 1L));
+ jaSchedule.put(joSchedule);
+ joOur_price.put("schedule", jaSchedule);
+ jaOur_price.put(joOur_price);
+ joPurchasable_offer.put("our_price", jaOur_price);
+ jaPurchasable_offer.put(joPurchasable_offer);
+ }
+ jo.put("productType", bean.getProductTypeAmz());
+ jo.put("requirements", "LISTING_OFFER_ONLY");
+ JSONObject joAttributes = new JSONObject();
+ joAttributes.put("purchasable_offer", jaPurchasable_offer);
+ joAttributes.put("fulfillment_availability", jaFulfillment_availability);
+ joAttributes.put("condition_type", jaCondition_type);
+ joAttributes.put("country_of_origin", jaCountry_of_origin);
+ joAttributes.put("merchant_shipping_group", jaMerchant_shipping_group);
+ joAttributes.put("merchant_suggested_asin", jaMerchant_suggested_asin);
+ jo.put("attributes", joAttributes);
+ return jo;
+ }
+}
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/amz/json/package-info.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/amz/json/package-info.java
new file mode 100644
index 00000000..82624d3d
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/amz/json/package-info.java
@@ -0,0 +1 @@
+package it.acxent.api.amz.json;
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/amz/servlet/package-info.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/amz/servlet/package-info.java
new file mode 100644
index 00000000..1adcc6d5
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/amz/servlet/package-info.java
@@ -0,0 +1 @@
+package it.acxent.api.amz.servlet;
diff --git a/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/ebay/EbayAbliaApi.java b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/ebay/EbayAbliaApi.java
new file mode 100644
index 00000000..22e5709d
--- /dev/null
+++ b/decompiled-libs/www/acxent-common-1.0.1/it/acxent/api/ebay/EbayAbliaApi.java
@@ -0,0 +1,2027 @@
+package it.acxent.api.ebay;
+
+import com.ebay.sdk.ApiAccount;
+import com.ebay.sdk.ApiContext;
+import com.ebay.sdk.ApiCredential;
+import com.ebay.sdk.TimeFilter;
+import com.ebay.sdk.call.AddItemCall;
+import com.ebay.sdk.call.FetchTokenCall;
+import com.ebay.sdk.call.GetItemCall;
+import com.ebay.sdk.call.GetMyeBaySellingCall;
+import com.ebay.sdk.call.GetOrdersCall;
+import com.ebay.sdk.call.GetSellerListCall;
+import com.ebay.sdk.call.GetSessionIDCall;
+import com.ebay.sdk.call.GetSuggestedCategoriesCall;
+import com.ebay.sdk.call.GetUserCall;
+import com.ebay.sdk.call.VerifyAddItemCall;
+import com.ebay.soap.eBLBaseComponents.AmountType;
+import com.ebay.soap.eBLBaseComponents.BrandMPNType;
+import com.ebay.soap.eBLBaseComponents.BuyerPaymentMethodCodeType;
+import com.ebay.soap.eBLBaseComponents.CategoryType;
+import com.ebay.soap.eBLBaseComponents.CountryCodeType;
+import com.ebay.soap.eBLBaseComponents.CurrencyCodeType;
+import com.ebay.soap.eBLBaseComponents.DetailLevelCodeType;
+import com.ebay.soap.eBLBaseComponents.FeesType;
+import com.ebay.soap.eBLBaseComponents.GalleryTypeCodeType;
+import com.ebay.soap.eBLBaseComponents.ItemListCustomizationType;
+import com.ebay.soap.eBLBaseComponents.ItemType;
+import com.ebay.soap.eBLBaseComponents.ListingDurationCodeType;
+import com.ebay.soap.eBLBaseComponents.ListingTypeCodeType;
+import com.ebay.soap.eBLBaseComponents.OrderType;
+import com.ebay.soap.eBLBaseComponents.PaginatedItemArrayType;
+import com.ebay.soap.eBLBaseComponents.PaginationType;
+import com.ebay.soap.eBLBaseComponents.PictureDetailsType;
+import com.ebay.soap.eBLBaseComponents.ProductListingDetailsType;
+import com.ebay.soap.eBLBaseComponents.ReturnPolicyType;
+import com.ebay.soap.eBLBaseComponents.ReturnsAcceptedCodeType;
+import com.ebay.soap.eBLBaseComponents.ReturnsWithinOptionsCodeType;
+import com.ebay.soap.eBLBaseComponents.SKUArrayType;
+import com.ebay.soap.eBLBaseComponents.SellerPaymentProfileType;
+import com.ebay.soap.eBLBaseComponents.SellerProfilesType;
+import com.ebay.soap.eBLBaseComponents.SellerReturnProfileType;
+import com.ebay.soap.eBLBaseComponents.SellerShippingProfileType;
+import com.ebay.soap.eBLBaseComponents.ShippingCostPaidByOptionsCodeType;
+import com.ebay.soap.eBLBaseComponents.SiteCodeType;
+import com.ebay.soap.eBLBaseComponents.SuggestedCategoryType;
+import com.ebay.soap.eBLBaseComponents.TaxIdentifierType;
+import com.ebay.soap.eBLBaseComponents.TradingRoleCodeType;
+import it.acxent.api.ebay.json.EbayOrder;
+import it.acxent.art.Articolo;
+import it.acxent.art.CaratteristicaArticolo;
+import it.acxent.cc.Attivita;
+import it.acxent.common.Parm;
+import it.acxent.common.StatusMsg;
+import it.acxent.db.ApplParm;
+import it.acxent.db.ApplParmFull;
+import it.acxent.db.DBAdapter;
+import it.acxent.db.ResParm;
+import it.acxent.util.Vectumerator;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.sql.Date;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Base64;
+import java.util.Calendar;
+import java.util.Vector;
+import org.apache.commons.codec.binary.StringUtils;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpDelete;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpPut;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.entity.ByteArrayEntity;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+public class EbayAbliaApi {
+ private Attivita attivita;
+
+ private boolean debug = false;
+
+ private ApplParmFull apFull = null;
+
+ private String token;
+
+ private String applicationId;
+
+ private String ruName;
+
+ private String certificateId;
+
+ private Date expirationDate;
+
+ private String tokenUsername;
+
+ private boolean useSandbox = false;
+
+ public static final String EBAY_SESSION_ID = "_EBAY_SESSION_ID";
+
+ public static final String API_SANDBOX = "https://api.sandbox.ebay.com/wsapi";
+
+ public static final String API_PRODUCTION = "https://api.ebay.com/wsapi";
+
+ public static final String P_EBAY_USE_SANDBOX = "EBAY_USE_SANDBOX";
+
+ public static final String P_EBAY_CERTIFICATE_ID_PRODUCTION = "EBAY_CERTIFICATE_ID_PRODUCTION";
+
+ public static final String P_EBAY_APPLICATION_ID_PRODUCTION = "EBAY_APPLICATION_ID_PRODUCTION";
+
+ public static final String P_EBAY_DEVELOPER_ID_PRODUCTION = "EBAY_DEVELOPER_ID_PRODUCTION";
+
+ public static final String P_EBAY_RU_NAME_PRODUCTION = "EBAY_RU_NAME_PRODUCTION";
+
+ public static final String P_EBAY_SIGN_IN_AUTH_N_AUTH_PRODUCTION_LINK = "EBAY_SIGN_IN_AUTH_N_AUTH_PRODUCTION_LINK";
+
+ public static final String P_EBAY_SIGN_IN_OAUTH_PRODUCTION_LINK = "EBAY_SIGN_IN_OAUTH_PRODUCTION_LINK";
+
+ public static final String P_EBAY_USER_TOKEN_PRODUCTION = "EBAY_USER_TOKEN_PRODUCTION";
+
+ public static final String P_EBAY_EXPIRE_DATE_TOKEN_PRODUCTION = "EBAY_EXPIRE_DATE_TOKEN_PRODUCTION";
+
+ public static final String P_EBAY_USER_TOKEN_NAME_PRODUCTION = "EBAY_USER_TOKEN_NAME_PRODUCTION";
+
+ public static final String P_EBAY_CERTIFICATE_ID_SANDBOX = "EBAY_CERTIFICATE_ID_SANDBOX";
+
+ public static final String P_EBAY_APPLICATION_ID_SANDBOX = "EBAY_APPLICATION_ID_SANDBOX";
+
+ public static final String P_EBAY_DEVELOPER_ID_SANDBOX = "EBAY_DEVELOPER_ID_SANDBOX";
+
+ public static final String P_EBAY_RU_NAME_SANDBOX = "EBAY_RU_NAME_SANDBOX";
+
+ public static final String P_EBAY_USER_TOKEN_SANDBOX = "EBAY_USER_TOKEN_SANDBOX";
+
+ private ApiContext apiContext;
+
+ private String developerId;
+
+ private static final String URI_CMD_GET_DEFAULT_CATEGORY = "https://api.ebay.com/commerce/taxonomy/v1_beta/get_default_category_tree_id?marketplace_id=EBAY_IT";
+
+ private static final String URI_CMD_GET_ORDERS = "https://api.ebay.com/sell/fulfillment/v1/order?limit=150&offset=0";
+
+ private static final String URI_CMD_GET_ORDER = "https://api.ebay.com/sell/fulfillment/v1/order/{orderId}?";
+
+ private static final String URI_CMD_GET_CATEGORY_SUGGESTION = "https://api.ebay.com/commerce/taxonomy/v1/category_tree/{category_tree_id}/get_category_suggestions?q=";
+
+ private static final String URI_CMD_GET_FULLFILMENT_POLICY = "https://api.ebay.com/sell/account/v1/fulfillment_policy?marketplace_id=EBAY_IT";
+
+ private static final String URI_CMD_GET_PAYMENT_POLICY = "https://api.ebay.com/sell/account/v1/payment_policy?marketplace_id=EBAY_IT";
+
+ private static final String URI_CMD_GET_RETURN_POLICY = "https://api.ebay.com/sell/account/v1/return_policy?marketplace_id=EBAY_IT";
+
+ private static final String URI_CMD_CREATE_DELETE_INVENTORY_LOCATION = "https://api.ebay.com/sell/inventory/v1/location/{merchantLocationKey}";
+
+ private static final String URI_CMD_GET_INVENTORY_ITEM = "https://api.ebay.com/sell/inventory/v1/inventory_item/{sku}";
+
+ private static final String URI_CMD_GET_INVENTORY_ITEMS = "https://api.ebay.com/sell/inventory/v1/inventory_item?limit={limit}&offset={offset}";
+
+ private static final String URI_CMD_CREATE_OR_REPLACE_INVENTORY_ITEM = "https://api.ebay.com/sell/inventory/v1/inventory_item/{sku}";
+
+ private static final String URI_CMD_DELETE_INVENTORY_ITEM = "https://api.ebay.com/sell/inventory/v1/inventory_item/{sku}";
+
+ private static final String URI_CMD_CREATE_OFFER = "https://api.ebay.com/sell/inventory/v1/offer";
+
+ private static final String URI_CMD_GET_OFFER = "https://api.ebay.com/sell/inventory/v1/offer/{offerId}";
+
+ private static final String URI_CMD_PUBLISH_OFFER = "https://api.ebay.com/sell/inventory/v1/offer/{offerId}/publish/";
+
+ private static final String URI_CMD_UPDATE_DELETE_GET_OFFER = "https://api.ebay.com/sell/inventory/v1/offer/{offerId}";
+
+ private static final String URI_CMD_GET_USER_CONSENT = "https://auth.ebay.com/oauth2/authorize";
+
+ private static final String URI_CMD_GET_OR_REFRESH_USER_ACCESS_TOKEN = "https://api.ebay.com/identity/v1/oauth2/token";
+
+ private static final String EBAY_ALL_SCOPES = "https://api.ebay.com/oauth/api_scope https://api.ebay.com/oauth/api_scope/sell.marketing.readonly https://api.ebay.com/oauth/api_scope/sell.marketing https://api.ebay.com/oauth/api_scope/sell.inventory.readonly https://api.ebay.com/oauth/api_scope/sell.inventory https://api.ebay.com/oauth/api_scope/sell.account.readonly https://api.ebay.com/oauth/api_scope/sell.account https://api.ebay.com/oauth/api_scope/sell.fulfillment.readonly https://api.ebay.com/oauth/api_scope/sell.fulfillment https://api.ebay.com/oauth/api_scope/sell.analytics.readonly https://api.ebay.com/oauth/api_scope/sell.finances https://api.ebay.com/oauth/api_scope/sell.payment.dispute https://api.ebay.com/oauth/api_scope/commerce.identity.readonly";
+
+ public static final String CONDITION_NEW = "NEW";
+
+ public static final String CONDITION_LIKE_NEW = "LIKE_NEW";
+
+ public static final String CONDITION_NEW_OTHER = "NEW_OTHER";
+
+ public static final String CONDITION_NEW_WITH_DEFECTS = "NEW_WITH_DEFECTS";
+
+ public static final String CONDITION_CERTIFIED_REFURBISHED = "CERTIFIED_REFURBISHED";
+
+ public static final String CONDITION_SELLER_REFURBISHED = "SELLER_REFURBISHED";
+
+ public static final String CONDITION_USED_EXCELLENT = "USED_EXCELLENT";
+
+ public static final String CONDITION_USED_VERY_GOOD = "USED_VERY_GOOD";
+
+ public static final String CONDITION_USED_GOOD = "USED_GOOD";
+
+ public static final String CONDITION_USED_ACCEPTABLE = "USED_ACCEPTABLE";
+
+ public static final String CONDITION_FOR_PARTS_OR_NOT_WORKING = "FOR_PARTS_OR_NOT_WORKING";
+
+ public EbayAbliaApi(String applicationId, String developerId, String certificateId, String ruName, String token) {
+ this.applicationId = applicationId;
+ this.developerId = developerId;
+ this.certificateId = certificateId;
+ this.token = token;
+ this.ruName = ruName;
+ }
+
+ public EbayAbliaApi(ApplParmFull apFull) {
+ this.apFull = apFull;
+ this.applicationId = apFull.getParm("EBAY_APPLICATION_ID_PRODUCTION").getTesto();
+ this.developerId = apFull.getParm("EBAY_DEVELOPER_ID_PRODUCTION").getTesto();
+ this.certificateId = apFull.getParm("EBAY_CERTIFICATE_ID_PRODUCTION").getTesto();
+ this.ruName = apFull.getParm("EBAY_RU_NAME_PRODUCTION").getTesto();
+ this.token = apFull.getParm("EBAY_USER_TOKEN_PRODUCTION").getTesto();
+ this.expirationDate = apFull.getParm("EBAY_EXPIRE_DATE_TOKEN_PRODUCTION").getDataParm();
+ this.tokenUsername = apFull.getParm("EBAY_USER_TOKEN_NAME_PRODUCTION").getTesto();
+ }
+
+ public EbayAbliaApi() {}
+
+ public String getStatus() {
+ if (getApFull() == null)
+ return "Errore! Dati DB nullo";
+ StringBuilder sb = new StringBuilder("Token AuthNAuth\n");
+ if (getToken().isEmpty()) {
+ sb.append("Token AuthNAuth non presente. Procedere alla richiesta del token.");
+ } else {
+ sb.append("Token AuthNAuth presente per il cliente ");
+ sb.append(getTokenUsername());
+ long days = getDaysToExpire();
+ if (days > 0L) {
+ sb.append("\nScadenza Token tra " + days + " giorni");
+ } else {
+ sb.append("\nATTENZIONE. Token scaduto da " + -days + " giorni");
+ }
+ }
+ sb.append("\n\nToken oAuth2\n");
+ if (getAttivita().getEbayOAuthUserToken().isEmpty()) {
+ sb.append("User Token oAuth2 non presente. Procedere alla richiesta del token oAuth.");
+ } else {
+ sb.append("User Token oAuth2 presente");
+ if (getAttivita().getEbayOAuthUserTokenExpire() != null)
+ sb.append("\nScadenza oAuth2 Token:" + String.valueOf(getAttivita().getEbayOAuthUserTokenExpire()));
+ if (getAttivita().getEbayOAuthRefreshTokenExpire() != null)
+ sb.append("\nScadenza Refresh Token:" + String.valueOf(getAttivita().getEbayOAuthRefreshTokenExpire()));
+ }
+ return sb.toString();
+ }
+
+ public String getStatusHtml() {
+ return DBAdapter.convertStringToHtml(getStatus());
+ }
+
+ public boolean isTokenExpired() {
+ if (getDaysToExpire() <= 0L)
+ return true;
+ return false;
+ }
+
+ public boolean isTokenValid() {
+ if (getToken().isEmpty())
+ return false;
+ return !isTokenExpired();
+ }
+
+ public long getDaysToExpire() {
+ if (getApFull() == null)
+ return -1L;
+ long daysTOExpire = DBAdapter.getDateDiff(DBAdapter.getToday(), getExpirationDate());
+ return daysTOExpire;
+ }
+
+ public long getUserTokenHourToExpire() {
+ if (getApFull() == null)
+ return -1L;
+ long daysTOExpire = DBAdapter.getDateDiff(DBAdapter.getToday(), getExpirationDate());
+ return daysTOExpire;
+ }
+
+ private ApiContext getApiContext() throws IOException {
+ if (this.apiContext == null) {
+ this.apiContext = new ApiContext();
+ this.apiContext.setSite(SiteCodeType.ITALY);
+ ApiCredential cred = this.apiContext.getApiCredential();
+ if (this.useSandbox) {
+ this.apiContext.setApiServerUrl("https://api.sandbox.ebay.com/wsapi");
+ } else {
+ this.apiContext.setApiServerUrl("https://api.ebay.com/wsapi");
+ }
+ ApiAccount account = cred.getApiAccount();
+ account.setApplication(getApplicationId());
+ account.setCertificate(getCertificateId());
+ account.setDeveloper(getDeveloperId());
+ if (!getToken().isEmpty())
+ cred.seteBayToken(getToken());
+ }
+ return this.apiContext;
+ }
+
+ public String getToken() {
+ return (this.token == null) ? "" : this.token.trim();
+ }
+
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+ public static void initApplicationParms(ApplParmFull ap) {
+ if (ap != null) {
+ DBAdapter.logDebug(true, "ebay chechout initParms: start");
+ String l_tipoParm = "EBAY";
+ StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
+ Parm bean = new Parm(ap);
+ bean.findByCodice("EBAY_SIGN_IN_AUTH_N_AUTH_PRODUCTION_LINK");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("EBAY_SIGN_IN_AUTH_N_AUTH_PRODUCTION_LINK");
+ bean.setDescrizione("EBAY_SIGN_IN_AUTH_N_AUTH_PRODUCTION_LINK");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("\nhttps://signin.ebay.com/ws/eBayISAPI.dll?SignIn&runame=Ablia_S.r.l.-AbliaSrl-tuttof-dxiwgx&SessID=");
+ bean.setNota("LINK PER RICHIEDERE IL TOKEN AUTH N AUTH VIA APPLICATION. VIENE POI FATTO IL REDIRECT INDIETRO CON IL TOKEN O IL RISULTATO NEGATIVO");
+ bean.save();
+ bean.findByCodice("EBAY_SIGN_IN_OAUTH_PRODUCTION_LINK");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("EBAY_SIGN_IN_OAUTH_PRODUCTION_LINK");
+ bean.setDescrizione("EBAY_SIGN_IN_OAUTH_PRODUCTION_LINK");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("\nhttps://auth.ebay.com/oauth2/authorize?client_id=AbliaSrl-tuttofot-PRD-c14016a09-701a1eb1&response_type=code&redirect_uri=Ablia_S.r.l.-AbliaSrl-tuttof-dxiwgx&scope=https://api.ebay.com/oauth/api_scope https://api.ebay.com/oauth/api_scope/sell.marketing.readonly https://api.ebay.com/oauth/api_scope/sell.marketing https://api.ebay.com/oauth/api_scope/sell.inventory.readonly https://api.ebay.com/oauth/api_scope/sell.inventory https://api.ebay.com/oauth/api_scope/sell.account.readonly https://api.ebay.com/oauth/api_scope/sell.account https://api.ebay.com/oauth/api_scope/sell.fulfillment.readonly https://api.ebay.com/oauth/api_scope/sell.fulfillment https://api.ebay.com/oauth/api_scope/sell.analytics.readonly https://api.ebay.com/oauth/api_scope/sell.finances https://api.ebay.com/oauth/api_scope/sell.payment.dispute https://api.ebay.com/oauth/api_scope/commerce.identity.readonly");
+ bean.setNota("LINK PER RICHIEDERE IL TOKEN OAUTH2 VIA APPLICATION. VIENE POI FATTO IL REDIRECT INDIETRO CON IL TOKEN O IL RISULTATO NEGATIVO");
+ bean.save();
+ bean.findByCodice("EBAY_USER_TOKEN_PRODUCTION");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("EBAY_USER_TOKEN_PRODUCTION");
+ bean.setDescrizione("EBAY_USER_TOKEN_PRODUCTION");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("AgAAAA**AQAAAA**aAAAAA**vVQ0Xg**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6ABkYKnAZmCoQidj6x9nY+seQ**CmADAA**AAMAAA**ftrYwOnBwCWOl+k8pJKmriUUg/rWwZH/+E8fLpt/3YSoQhAL846AqCs9wXZv1rPU1jFiM26igTkKZvQTu1WbXuP5mm06fAuE2o1hL1NaQpvhgq4PIMTOo8GsxcNdF1x+jSuPe1mz1WYbtCoJV/y1CzUlsWmMjoVBeyiOfv+xLFKRHsfVWDO/wCbRclWznWrIoune9WYXIObvgT+49kQNqpFS+cXrQky3a+risHb79P525EZ8guGy1CvqpW4rd7PzgpxQImSVUgyBeYlpmKVpEDSBybPnvhJ72qor3U/zEWbmUBL2f/duRsKbvNkq4EiGfRcmPEHGOeEWtSbP1smMHxYRfpC5ZhvOU5dnuAioAej4zmntL0JaVqSZNa5WtF4jy7ZY0aX5DCHKlxCUp7daEC28VaoDFssnhfoL4CHYZ/nkyUWWUl6NosViy/bVf8gHq0zKOzSi7lW4FLd9SQnUNz/xslI3U90s5Cv5OthuCVQAFrNWi/AMUjKhNKoNq1Kvokq82D3mLkY35Kf6rsTRBWaznaGv+nsJB2L2HRPwgtwwgemBlZCSwJBWV2LfCKru6FYhy2M5HtdEDV8b5LcyWebTROrSohwBsFMpmt5f9ifHrG9gSBE85a+l2b5jo1cR4igiNnZY8vsFqih5Vr8Egs3baKGcY4Rjj03ifaDtuLa0aG3Rg3lVw76xKkOvbTEH+P2vR0RTixSVL/MltKiVTktVhimZth9zA5ixJXzIo5hylOrl6Bkt6bAaiYu+i6nM");
+ bean.setNota("USER TOKEN DI PRODUZIONE GENERATO FACENDO L'ACCESSO CON L'UTENZA CHE SI VUOLE INTERROGARE. TOKEN DIVERSI SERVONO PER ACCEDERE A ACCOUNT EBAY DIVERSI TRAMITE Get a User Token Here + Auth'n'Auth E' NECESSARIO AVERE I DATI DELL'ACCOUNT A CUI VOGLIAMO ACCEDERE PER POTER FARE LE CHIAMATE!!!!ATTENZIONE!!! I TOKEN HANNO UNA SCADENZA DI 18 MESI CIRCA");
+ bean.save();
+ bean.findByCodice("EBAY_EXPIRE_DATE_TOKEN_PRODUCTION");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("EBAY_EXPIRE_DATE_TOKEN_PRODUCTION");
+ bean.setDescrizione("EBAY_EXPIRE_DATE_TOKEN_PRODUCTION");
+ bean.setFlgTipo(2L);
+ if (bean.getDataParm() == null) {
+ Calendar cal = Calendar.getInstance();
+ cal.set(1, 2021);
+ cal.set(2, 6);
+ cal.set(5, 24);
+ bean.setDataParm(new Date(cal.getTimeInMillis()));
+ }
+ bean.setNota("DATA VALIDITA' PRODUCTION TOKEN DELL'ACCOUNT A CUI FA RIFERIMENTO IL TOKEN GENERATO. VIENE INDICATO QUANDO VIENE GENERATO IL TOKEN");
+ bean.save();
+ bean.findByCodice("EBAY_USER_TOKEN_NAME_PRODUCTION");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("EBAY_USER_TOKEN_NAME_PRODUCTION");
+ bean.setDescrizione("EBAY_USER_TOKEN_NAME_PRODUCTION");
+ bean.setFlgTipo(0L);
+ bean.setNota("USERNAME DELL'UTENTE EBAY CUI FA RIFERIMENTO IL TOKEN E LA SUA SCADENZA");
+ bean.save();
+ bean.findByCodice("EBAY_USER_TOKEN_SANDBOX");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("EBAY_USER_TOKEN_SANDBOX");
+ bean.setDescrizione("EBAY_USER_TOKEN_SANDBOX");
+ bean.setFlgTipo(0L);
+ bean.setNota("USER TOKEN DI PROVA SANDBOX DI UN UTENTE SANDBOX DI CUI VOGLIAMO TESTARE LE CHIAMATE TRAMITE Get a User Token Here + Auth'n'Auth ATTENZIONE!!! I TOKEN HANNO UNA SCADENZA DI 18 MESI CIRCA");
+ bean.save();
+ bean.findByCodice("EBAY_APPLICATION_ID_PRODUCTION");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("EBAY_APPLICATION_ID_PRODUCTION");
+ bean.setDescrizione("EBAY_APPLICATION_ID_PRODUCTION");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("AbliaSrl-tuttofot-PRD-c14016a09-701a1eb1");
+ bean.setNota("APPLICATION ID DI PRODUZIONE DELL'ACCOUNTE DEVELOPER");
+ bean.save();
+ bean.findByCodice("EBAY_DEVELOPER_ID_PRODUCTION");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("EBAY_DEVELOPER_ID_PRODUCTION");
+ bean.setDescrizione("EBAY_DEVELOPER_ID_PRODUCTION");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("e729c207-9749-4d9d-b882-046d88f14454");
+ bean.setNota("DEVELOPER ID DI PRODUZIONE DELL'ACCOUNTE DEVELOPER");
+ bean.save();
+ bean.findByCodice("EBAY_CERTIFICATE_ID_PRODUCTION");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("EBAY_CERTIFICATE_ID_PRODUCTION");
+ bean.setDescrizione("EBAY_CERTIFICATE_ID_PRODUCTION");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("PRD-14016a09b37a-1fa6-43a5-8201-dfa9");
+ bean.setNota("CERTIFICATE ID DI PRODUZIONE DELL'ACCOUNTE DEVELOPER");
+ bean.save();
+ bean.findByCodice("EBAY_APPLICATION_ID_SANDBOX");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("EBAY_APPLICATION_ID_SANDBOX");
+ bean.setDescrizione("EBAY_APPLICATION_ID_SANDBOX");
+ bean.setFlgTipo(0L);
+ bean.setNota("APPLICATION ID SANDBOX DELL'ACCOUNTE DEVELOPER");
+ bean.save();
+ bean.findByCodice("EBAY_DEVELOPER_ID_SANDBOX");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("EBAY_DEVELOPER_ID_SANDBOX");
+ bean.setDescrizione("EBAY_DEVELOPER_ID_SANDBOX");
+ bean.setFlgTipo(0L);
+ bean.setNota("DEVELOPER ID DI SANDBOX DELL'ACCOUNTE DEVELOPER");
+ bean.save();
+ bean.findByCodice("EBAY_CERTIFICATE_ID_SANDBOX");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("EBAY_CERTIFICATE_ID_SANDBOX");
+ bean.setDescrizione("EBAY_CERTIFICATE_ID_SANDBOX");
+ bean.setFlgTipo(0L);
+ bean.setNota("CERTIFICATE ID DI SANDBOX DELL'ACCOUNTE DEVELOPER");
+ bean.save();
+ bean.findByCodice("EBAY_USE_SANDBOX");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("EBAY_USE_SANDBOX");
+ bean.setDescrizione("EBAY_USE_SANDBOX");
+ bean.setFlgTipo(5L);
+ bean.setNota("USA PARAMETRI DI SANDBOX O PRODUZIONE");
+ bean.save();
+ bean.findByCodice("EBAY_RU_NAME_PRODUCTION");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("EBAY_RU_NAME_PRODUCTION");
+ bean.setDescrizione("EBAY_RU_NAME_PRODUCTION");
+ bean.setFlgTipo(0L);
+ if (bean.getTesto().isEmpty())
+ bean.setTesto("Ablia_S.r.l.-AbliaSrl-tuttof-dxiwgx");
+ bean.setNota("RuName (eBay Redirect URL name) interfaccia di login in cui si definisce le url di ritorno per prendere il token. Ha bisogno del sessionid");
+ bean.save();
+ bean.findByCodice("EBAY_RU_NAME_SANDBOX");
+ bean.setFlgAdmin(1L);
+ bean.setTipoParm(l_tipoParm);
+ bean.setCodice("EBAY_RU_NAME_SANDBOX");
+ bean.setDescrizione("EBAY_RU_NAME_SANDBOX");
+ bean.setFlgTipo(0L);
+ bean.setNota("RuName (eBay Redirect URL name) SANDBOX interfaccia di login in cui si definisce le url di ritorno per prendere il token. Ha bisogno del sessionid");
+ bean.save();
+ bean.findByCodice("EBAY_USER_TOKEN_OAUTH2_PRODUCTION");
+ bean.delete();
+ bean.findByCodice("EBAY_USER_TOKEN_OAUTH2_SANDBOX");
+ bean.delete();
+ DBAdapter.logDebug(true, "ebay chechout initParms: stop");
+ }
+ }
+
+ public static void main(String[] args) {
+ String tokenProductionTF = "AgAAAA**AQAAAA**aAAAAA**vVQ0Xg**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6ABkYKnAZmCoQidj6x9nY+seQ**CmADAA**AAMAAA**ftrYwOnBwCWOl+k8pJKmriUUg/rWwZH/+E8fLpt/3YSoQhAL846AqCs9wXZv1rPU1jFiM26igTkKZvQTu1WbXuP5mm06fAuE2o1hL1NaQpvhgq4PIMTOo8GsxcNdF1x+jSuPe1mz1WYbtCoJV/y1CzUlsWmMjoVBeyiOfv+xLFKRHsfVWDO/wCbRclWznWrIoune9WYXIObvgT+49kQNqpFS+cXrQky3a+risHb79P525EZ8guGy1CvqpW4rd7PzgpxQImSVUgyBeYlpmKVpEDSBybPnvhJ72qor3U/zEWbmUBL2f/duRsKbvNkq4EiGfRcmPEHGOeEWtSbP1smMHxYRfpC5ZhvOU5dnuAioAej4zmntL0JaVqSZNa5WtF4jy7ZY0aX5DCHKlxCUp7daEC28VaoDFssnhfoL4CHYZ/nkyUWWUl6NosViy/bVf8gHq0zKOzSi7lW4FLd9SQnUNz/xslI3U90s5Cv5OthuCVQAFrNWi/AMUjKhNKoNq1Kvokq82D3mLkY35Kf6rsTRBWaznaGv+nsJB2L2HRPwgtwwgemBlZCSwJBWV2LfCKru6FYhy2M5HtdEDV8b5LcyWebTROrSohwBsFMpmt5f9ifHrG9gSBE85a+l2b5jo1cR4igiNnZY8vsFqih5Vr8Egs3baKGcY4Rjj03ifaDtuLa0aG3Rg3lVw76xKkOvbTEH+P2vR0RTixSVL/MltKiVTktVhimZth9zA5ixJXzIo5hylOrl6Bkt6bAaiYu+i6nM";
+ String tokenProductionCC = "AgAAAA**AQAAAA**aAAAAA**PTFrXw**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6ABkYKnAZmCoQidj6x9nY+seQ**CmADAA**AAMAAA**ftrYwOnBwCWOl+k8pJKmriUUg/rWwZH/+E8fLpt/3YSoQhAL846AqCs9wXZv1rPU1jFiM26igTkKZvQTu1WbXuP5mm06fAuE2o1hL1NaQpvhgq4PIMTOo8GsxcNdF1x+jSuPe1mz1WYbtCoJV/y1CzUlsWmMjoVBeyiOfv+xLFKRHsfVWDO/wCbRclWznWrIoune9WYXIObvgT+49kQNqpFS+cXrQky3a+risHb79P525EZ8guGy1CvqpW4rd7PzgpxQImSVUgyBeYlpmKVpEDSBybPnvhJ72qor3U/zEWbmUBL2f/duRsKbvNkq4EiGfRcmPEHGOeEWtSbP1smMHxYRfpC5ZhvOU5dnuAioAej4zmntL0JaVqSZNa5WtF4jy7ZY0aX5DCHKlxCUp7daEC28VaoDFssnhfoL4CHYZ/nkyUWWUl6NosViy/bVf8gHq0zKOzSi7lW4FLd9SQnUNz/xslI3U90s5Cv5OthuCVQAFrNWi/AMUjKhNKoNq1Kvokq82D3mLkY35Kf6rsTRBWaznaGv+nsJB2L2HRPwgtwwgemBlZCSwJBWV2LfCKru6FYhy2M5HtdEDV8b5LcyWebTROrSohwBsFMpmt5f9ifHrG9gSBE85a+l2b5jo1cR4igiNnZY8vsFqih5Vr8Egs3baKGcY4Rjj03ifaDtuLa0aG3Rg3lVw76xKkOvbTEH+P2vR0RTixSVL/MltKiVTktVhimZth9zA5ixJXzIo5hylOrl6Bkt6bAaiYu+i6nM\n";
+ String tokenOath2CC = "v^1.1#i^1#f^0#I^3#p^3#r^0#t^H4sIAAAAAAAAAOVYbWwURRju9QsJLfCDFCxijgNiAu7d7N7ex27ag6O9SgNtj15bKwHK3O5cmbK3u+zMtb0GSVNJQ4xUiQYJUQI/EBslERViSEzEiH+IRrGYANFEMUHLDxMhYqIJzl6/q3y0R8wl3p/LvPN+Pc+878zsgN7iuav7N/TfKXXMyT/WC3rzHQ5+HphbXLRmfkF+eVEemKTgONa7srewr+DnCgKTmik3ImIaOkHO7qSmEzkjrHSlLF02IMFE1mESEZkqcixct0kW3EA2LYMaiqG5nLXVla6gwAuqXwxKfi9QeUlgUn3MZ5NR6RLiPoBEKQGleDAgeiU2T0gK1eqEQp2yeSAAjgec4G0SBJn3yT6/2+fzbXE5W5BFsKEzFTdwhTLpyhlba1Ku908VEoIsypy4QrXhmlhDuLY6Ut9U4ZnkKzTKQ4xCmiJTR1WGipwtUEuh+4chGW05llIURIjLExqJMNWpHB5LZhbpZ6hGisCLgEdAlPwBv6g8EiprDCsJ6f3zsCVY5RIZVRnpFNP0gxhlbMQ7kEJHR/XMRW210/7bnIIaTmBkVboi68PPNccijS5nLBq1jE6sItVGyvt44JckAERXCMY1DImljcYYcTTK8LQgVYauYpsv4qw36HrEEkbTaQGTaGFKDXqDFU5QO5lxPbEJgDH6RGmLvZ4jC5iiO3V7SVGSceDMDB9M/lg1TKz/o6oHnveDgD/uk/wwIAX5+L/Xg93rM6uJkL0s4WjUY+eC4jDNJaG1C1FTgwriFEZvKoksrMpeX0LwBhOIU/1SgmNNnuDiPtXP8QmEAELxuCIF/yelQamF4ymKxstj+kQGX6VLM9qxXofoTkN1TVfJ7DSjxdBNKl07KTVlj6erq8vd5XUbVrtHAID3tNZtiik7URK6xnXxg5U5nCkLBTErgmWaNlk23azqWHC93RWyua6tHivVKSmFpkvvgS2mGCaKGhpW0rmFzWupUWjRdAxpGhNkBZLYIHMLnm1PmANo2r2O3XbLuhUj6TEg26KYGLdlsnZOKN5byUMYSe6Rhmfe3RaCqqFr6dkYz8AG652saQwrPZuA48YzsIGKYqR0Optwo6YzsEiktATWNHtfmE3ASeYzSVOHWppihcwqJNbtiiMzMDFhOgNQxcS0++WhLJmMnSUKcrP9PXOvGE82qy61kIottvu3pSycW80ats+stpjbcmtuLjOIWRpHU5QaCU7txl3t3Q+H3O71e6APm2Ztjh0v05AalIs2VnOKfZ/1QyBxAcBDHsX5rFa9GnXmGm4UECRFAAFOCogSJ6qSysWDQYEDol8NBhO8KPrErDBjSHMLMbuUekWJ92aJy94xZAwTMjV2Ib0pnWuHbmOkpjES29DW1LAxUp/dtQkpFrr/IrJeP/SfI9zV6W1ujASlNbFqGGlMNGxoiW+UaqtgdTJlChujSldLpCda02Ptbq+rzIoAe7tKJlOUXedRrvWvIPC8lF0l17XjXAPFPmeA6BWkIABCVtiqNMyO7dzrzg0GoUh9WGjTBJO+4f7x5e6Z+moWysv8+D7HGdDnOJ3vcAAPWMWvAMuLC5oLC0rKCabsbgMTboLbdUhTFnLvQmkTYiu/2GE2w+FVk97pjm0DS8Zf6uYW8PMmPduBJyZmivgFi0sFwAPBy+rT5/NvASsmZgv5ssJFznBr85LeG1cHXrPm3t2PF97YUb4AlI4rORxFeYV9jrySk1aQPNZzYZ1Jtq14ZbDp+EdDp4+UlfQs/vYgPXr6G+P9tLtsX9V7AbJ0YPeZ3cUtpW8NL0lW/Ppl2apWxZtX82T/d8vmHf94WP+scsfR1sNvNL/9+ImnTha9qi37/ZnB3nOrTxVfDNy8RF56XRtYfKvv6kXv2d7Qm59oh+a8O/DCFbNx7YeHby18/vxy8fsvmot/irYOzb993p9/5Men62Pl4QLz/KWjlyv+cvj7r1/uGNqxdOWmH/68e/3igcN/bN96oS7+Tske3HSno1X+4GD7uUW/Db3ccaVocPPnB9c+23l164n95Nq62C9GhRzat/fmavHTNS9WpfMGT+35evuBtXtv89duDxfUfaWeHVm+vwEIbnSVQRUAAA==";
+ String appTOkenCC = "v^1.1#i^1#p^1#f^0#r^0#I^3#t^H4sIAAAAAAAAAOVYfWwTZRhf124EYQOZgQUNlBsQw9L2vbt+3UlryrqPMqBlLRPwY3nv7r3t2PXuvHvLWhLIWHQaICIBDEpCMEQliCaYIJpgojGAQkSiENR/CIkaIPEjGgX9w3jXltFNsiFrcIn9p7nnfd7n/T2/3/O873sH+qsnLxpsG7xeY5tUub8f9FfabOQUMLm6qrHWXjm7qgKUONj298/vdwzYryw2YFrW2A5kaKpiIGc2LSsGmzeGiIyusCo0JINVYBoZLObZZGT5MpZyA1bTVazyqkw4Y9EQEYQ0xQmiTxC8HB2kg6ZVuRkzpYYI0utDJBXkKS5AogAgzXHDyKCYYmCo4BBBAQq4SOCi6BQJWK+XpQNu4PetJZydSDckVTFd3IAI5+Gy+bl6CdbRoULDQDo2gxDhWKQlGY/Eos0rUos9JbHCRR6SGOKMMfypSRWQsxPKGTT6Mkbem01meB4ZBuEJF1YYHpSN3ARzF/DzVHsZfzDIUDREPg4EeKYsVLaoehri0XFYFklwiXlXFilYwrmxGDXZ4NYhHhefVpghYlGn9bcyA2VJlJAeIpqXRNZEEgkiHOFkCSZ12YUzGKuiil2JjqiLJ72A9EPAuMzCgSTiyOJChWhFmkes1KQqgmSRZjhXqHgJMlGjkdzQJdyYTnElrkdEbCEq9aOGOKTWWqIWVMzgHsXSFaVNIpz5x7EVGJqNsS5xGYyGIowcyFMUIqCmSQIxcjBfi8XyyRohogdjjfV4+vr63H20W9W7PRQApGf18mVJvgelIWH6Wr1e8JfGnuCS8qnwyJxpSCzOaSaWrFmrJgClmwhTFEky3iLvw2GFR1r/YSjJ2TO8I8rVIbwPegUaMaQoQEoQ/OXokHCxSD0WDsTBnCsN9V6ENRnyyMWbdZZJI10SWNonUnRQRC7Bz4guLyOKLs4n+F2kiBBAiON4Jvh/apQ7LfUk4nWEy1LrZavz3vX0qo7mINOYjMLmDjHe1sm1M7EmGE1nNKo9wfd1Nm9ItGzQn+5eHrrTbrh98ryqoYQqS3yuDAxYvV5GFmhdSEAd55JIlk3DuBI1rEQnlsjWfMMMADXJbTW2m1fTHhWaO7pl6sojHlfOEU2LpdMZDDkZxcqzm/9HO/lt05PMu86EysnUryCkJBQuKe68mm5jPe/WkaFmdPN+5o5bZ3ZK7UWKuQNiXZVlpHeS4xb6Xutr9foYfPzLw+Luci/fTWUi1TYvS2YJdU20zO6JohKcYKcx6Qe018sEA4Fx5dWU1zSVm2jnUJtqYCSMlpqj9S6v1Z7hL/nhivyPHLAdBQO2I5U2G/CABWQDmFdtX+WwT51tSBi5JSi6DalbMd9ddeTuRTkNSnpltU1bBa8tKPmssP9JUD/0YWGynZxS8pUBPHRrpIqcNquGAiSgaBJ4vXRgLWi4NeogZzoe+PW5SH1Ddt+fPx86Huk64zjHHlg6G9QMOdlsVRWOAVsFfzg39Upl+27PIWrH5ldqBenDZetCp7a+/8LjF8gljzlPHvll9xuttS/OOvb7Dzf2vqM+f/VU9srCc3sWtxzf3n6p9u2T6ys6T2/Z+OiuLwavp24c5ra9mpViS+3PeLs+W9l0/pNs055Z58U/DtWf+Pho/Gtf8/xHvrdHp+10/HV9DZrR4vgysiUmzeR+fPlB9NTBSZve/e6DNTNeuqC0TXdOl3qf3fDTvn1bF51YfRn5Ls57OD738MEzZzdeIk47t0eOnW2pPbUZ5TKtr9XUNbTveP2to9/u2EQ2ftRTf99CIXx+zubGz7s/XfneN8y1uvCkufenfqueU9e2k937JrNucBs6cLnlq4t1u/qmXn2iIN/fKcx3YPARAAA=";
+ String tokenOath2TX = "v^1.1#i^1#I^3#p^3#r^0#f^0#t^H4sIAAAAAAAAAOVYa2wUVRTubrdFHq1/CD6KsiwUDTC7986+ZifuJgtd0lraLp22KNGQOzN32pHZmXHmTssSA5UACZogBBIDwVg1ChgCPpEoP5DE+KAaIwZMfPAwUYuaYH9okJA4M32w1NjaLjGbuNlkc889r+/cc849e0Fv5fTF2+q3/VHlmebt6wW9Xo8HzgTTKyuWVJd7764oAwUMnr7ehb2+zeU/PWCinKKzrdjUNdXE/vU5RTVZl5gMWIbKasiUTVZFOWyyRGC5dNNKlg4CVjc0ogmaEvA31CUDYhwmMCNEGZqXYlIsalPVEZ1tWjJAR5HAQBFEGEGAkEb2vmlauEE1CVKJvQ9oQEH7G2uDYTYSY6N0kKajawL+DmyYsqbaLEEQSLnusq6sUeDr+K4i08QGsZUEUg3pFVxLuqEu09z2QKhAV2o4DhxBxDJvXi3XROzvQIqFxzdjutwsZwkCNs1AKDVk4WalbHrEmSm474YaIobHfFykoQQlGsZvSShXaEYOkfH9cCiySEkuK4tVIpP8RBG1o8E/hgUyvGq2VTTU+Z2fVRZSZEnGRjKQWZZ+uJ3LtAb8XDZraN2yiEUXKYgxEIBEPBxIEYsQTXJTLjdsZ0jZcJTHGFquqaLsxMz0N2tkGbadxmNDEy4Ijc3UorYYaYk4DhXyRUdCCJk1zpkOHaJFulTnWHHOjoPfXU58ACMZcSMHbllOSGEGMoBPgCgPGRj7e044tT75vEg5R5POZkOOL5hHeSqHjHWY6AoSMCXY4bVy2JBFNhyV6DAjYUqMJSQqkpAkio+KMQpKGAOMeV5IMP+j9CDEkHmL4NEUGbvhYkwGFK1TVpsw6dLEwFgWt+MMJ8R6MxnoIkRnQ6Genp5gTzioGZ0hGgAYeqhpJSd04ZzdUkd45YmZKdlNDQHbUqbMkrxue7PezjzbuNoZSDnxbqgbSdebXEqNpf4DNk7QdJzVFFnIlxa2sCFmkUHyHFYUm1AUSNMBWVrwuohT60Q3bSVIl4NO2QbtsghpyG5TDmmt67XfMTQRU8i0gxQcKnpbe9DASNRUJT8V4UnIyGq3XTSakZ+KwVHhScggQdAslUzF3LDoJCQkS5FkRXH6wlQMFohPxk0VKXkiC+aUTMqqk3HmJER0lHcBirKpO/XyryRtmn2fCDho93h3vhh1tqgqNbAoG3b3X2sZcmkVa5pXZLSWCxpBJUi5C85QqKHbjMrzRs9jvDUudKfWJ4Kf1vWGErtfxkDVCJVtraMEGAEwhkCCigOIIOZhUcdeh7tLDTeO0wmBBnEqEY8kqIiYECmeYWgKRGIiw0gwEolGisIsI1JaiGEM0Ew0BiAobprAgoFLDNq67nB7a4ZJLOHqUKZVaqnv4BsTDctRXc7S6cas0NOR2ZBdscF4vLMpWRR4p1+yMnJqXWKJtg6rbflSGztaMytaM1z92raWxkxzUWidO6EUZ+JsmuNWt7QWNxU7vTiXswjiFVxqzYmmIUwU136aOuVSA2X/WQORMJ1gAKCLwrZcke2h5D+qPN+TeyYBsl4zCRb/LboxhII/qX97ngjd/DyYKnM/cLPnbbDZ87rX4wEhUAsXgPmV5e2+8ll3mzKxhzckBU25U0XEMnBwHc7rSDa8lR69HV2uLXiQ7HsU3Dn6JDm9HM4seJ8Ec2/sVMDb76ii7RsExmA4EovSa8CCG7s+OMc3u/pi+rh3zXGUPOit3f3ggVN7Z/zWCapGmTyeijLfZk/ZvHOLt8+vaq5Fv5x/7o39u2q2xbc3buCTW4wPz25SOk7s7Z/97hOcVFPWv/0Z7+AnWwzp0oka30kuu8F37NN9V94ZfGpH9cBnF/ffd8r7/aG3jmy9fPvRa3uX9u0ZeH6rHDkaszoXLf36wsZ5hyuEmh9rru1bNijtW3blm2NM9OqO2le++pAcX3Thxe4vZp6/t+rA+y9VJNDi0K+7z1lt/R94us5M+3ZB7uyzT1/4aPXns169NLjS98XAbZs+ftN4pHHro+u/fXnbyT9nHF76xA/9pw+ljlTuHDj9c2CXf879g+98Mu/gwi9z1e9drv+9/oWN11cJbNX1xXfN5e65evb7l6vfPX3mu4H2/RePhir1PTtfGzq+vwBUwRysKhYAAA==";
+ String tokenOath2TF = "v^1.1#i^1#r^0#I^3#p^3#f^0#t^H4sIAAAAAAAAAOVYaWwUVRzv9kAJggEVCPFYBjECzu6bY48Z2TVLd4EV2i7dthwe5O3Mm/bZ2Zlx5k3bxSMFATUqxGAMRoGqhBhBFBIUQ0KIMRGwGkSiifGTfiGKgXiEQ6LOTA+WEgvtErOJux827//+1+9/vbcPdI8ZO3v9wvVnx/tuqOzpBt2VPh8zDowdUzNnQlXltJoKUMTg6+m+u7t6TdXJuRbMq4bYiCxD1yzk78qrmiV6xBhlm5qoQwtbogbzyBKJJGYTdYtFNgBEw9SJLukq5U8nY5QkRdlQlFdyIZQTWIZ3qNqAziY9RnFSOBxlI1CR5KjCRgRn37JslNYsAjUSo1jAApoBNMs1AUEMMWIoHAA8t4LytyDTwrrmsAQAFffcFT1Zs8jX4V2FloVM4iih4unE/GxDIp1M1TfNDRbpivfHIUsgsa3LV7W6jPwtULXR8GYsj1vM2pKELIsKxvssXK5UTAw4Mwr3vVCHJferKBHIAy6S465LKOfrZh6S4f1wKVimFY9VRBrBpHC1iDrRyD2GJNK/qndUpJN+92eJDVWsYGTGqNS8xPLmbKqR8mczGVPvwDKSXaQMCEcZAIQIR8WJTYiueCWX77fTp6w/ykMM1eqajN2YWf56ncxDjtNoaGj4otA4TA1ag5lQiOtQER/DDISQja5wc9qXRJu0aW5aUd6Jg99bXj0BAxVxqQauV03wAHJCJAQAwzOKIEWvrAm310deF3E3NYlMJuj6gnKwQOeh2Y6IoUIJ0ZITXjuPTCyLXEhhuaiCaDksKDQvKAqdC8lhmlEQAgjlcpIQ/R+VByEmztkEDZbI0A0PY4xS9Vas1SHSpsvUUBZv4vQXRJcVo9oIMcRgsLOzM9DJBXSzNcg6+Q4uq1ucldpQHlKDvPjqzDT2SkNCjpSFRVIwHG+6nMpzjGutVNyNdzo5UK6XuRQfSv0XbFlJN1BGV7FUKC9snClnoEkKWaSqDqEkkJYLsrzgtRG314lhOUqggQNu2wactgjq0BlTLmml57XfNXQ1pqDlBCnQ1/SO9oCJoKxramE0wiOQwVqH0zS6WRiNwUHhEchASdJtjYzGXL/oCCQUW1WwqrpzYTQGi8RH4qYG1QLBkjUqk1hzK84agYgBCx5AGVuG2y/XJOnQnPNEQgFnxnv3i0FnS+pSE8nYdKb/StvE5dWsiZyK4cpswAyoAdpbZE2V7jvNaLkLd7Z2DY/c6/Xh0ScMI11mx8sQpDqhM41JWmJ4wIQhEOgIYCCDckxJWU+ijnLDjSKsILEgQgsRXqB5WZDpXDTK0oAPy9GowvB8iC8JM4akvBAzYcDxfDjClIYriyQTlRm09g6uuTEVFeZkkzDVqDQsbMktEtK1MJm3DXZRRupsSa3KzF9lPt5aFysJvDsuRQwVt9dForcjralQbreOxtT8xlR24cqmhkWp+pLQukdCOV6JM4lsdmlDY2mXYncW5/M2gTkVldtwYlmGEUpr07pWXG6gAMtynBDmeOefYknYalXs3En+q86rXr3p2kEu1C2C5GtFN4RQ9B/1iteJ4OWvg/EK78Os8e0Da3x7Kn0+EAQzmRlg+piq5uqqm6ZZmDh3N6gELNyqQWKbKNCOCgbEZuUYn9EMf5pZ9B7Z8wiYOvgiObaKGVf0PAluv7RTw9w8ZTwLGMByQAgxofAKMOPSbjUzufrWXr1Z6Kk79Wbh8KSHaqZMn7XWXpIA4weZfL6aiuo1vooVp59+Uf2rBl388WBv54FfW6s6duLVD2yitjdtqXrku6fembBz98ZZ20jHjrZjkQe7BK1lwfnNa4OpzGent7RJ7PEjPx3d7Tv6/ritTySm3nFu8p5D20Oz16d+3PXMxs5J3783qXbB6dyJZ42LB5t/uf/Uyf3iublvPbf5pfHzDjZU5462r9M/eN730cbeE6/snTjnW9+2z3csP/xo5rflXEx4Ib7lXevMjeuWMPf9sW/cr9N//mJv+o+HJ0ydvSu5IfLqUmVZx+S35xzfP6P3h5c/vOvkId+ZrX/ee+TRCnCw943VT/79+leF8wsuTLzwze/rJm2cduy2Lz/+5LWxG2ZVVJ6t+PrTjgOnwdlbFm8uVDXdc2dDX/r+AVaPZtUpFgAA";
+ String tokenSandboxTF = "AgAAAA**AQAAAA**aAAAAA**lopgWw**nY+sHZ2PrBmdj6wVnY+sEZ2PrA2dj6AEloqgCJCLpg+dj6x9nY+seQ**CmADAA**AAMAAA**EXdobuByZfo3jlPyaaoMjmIzLPynG/su/LcK/ez5bscXTnZrsisIO3r4SfIwHpnGKil7PA5mXe2WQcfzAUA8MGh08lMoYMyaSRVN9jLuJSKxYBWYRdxyvJG+OKC/m4L7Zkorn/7g2KSrZO/pOxl8cJUD9ya3mNu1k3g0OnO5a4/x9iRmdUtcMRDJXKbeACTuoJF5bZdUZCj2SuH/FWhu4EJSh1WVRab+Mbqt1RYJqLUMLL0cGJNAt4hyI4h5w5lsU2Cu/8aoPmEqaZg0UkUBp6RgYa7+/VTI5vlbSuBJdJcZetyhQMcYb7geFYXxOgj3H144rpNjAIv43TK9tioPtUB8WSMz90f8GAdA1gVtg5eJIBVm4MK73VFajnxeaSD97SZUv6LCH6HAvB7coBIZFJWTiMzkpoGu8l+l3xBnjypZKKSAk12bxBXRHHmy1DcZ3/F/aZe/oRAo29VUS88FVzjgtYybjHw6fott2BQBDKz0d1AH5xLPmFBc7vaoGO0seU0GU/a8EIlGS19JOfslAdQOBpOsXuV6E6ldfmWPstJevyv2gP0rEM2kZohKdZGkIXzYg1T2DJAPxoVKEMNko8eqbjuvQrRnRSKbo/9C2TrANIBkoaV04hsQIKfb1HdaYigN2LIeQOF8SQh1y2dg2eNM9J8Y4KGsh7iNLWSicNxEG5ykESblJ6NgTMjh8TEVBpnH7ES+JaXsNdqAmNU+gR1sAtY2MXET4ACEV6eA2EvOyJKl4sG6NoN40kMJNt2o";
+ String applicationId = "AbliaSrl-tuttofot-PRD-c14016a09-701a1eb1";
+ String certificateId = "PRD-14016a09b37a-1fa6-43a5-8201-dfa9";
+ String developerId = "e729c207-9749-4d9d-b882-046d88f14454";
+ String ruName = "Ablia_S.r.l.-AbliaSrl-tuttof-dxiwgx";
+ String hostname = "localhost";
+ String db = "cc";
+ ApplParmFull ap = new ApplParmFull(new ApplParm(3, "//" + hostname + "/" + db, "root", "root", 1, 10, 300));
+ EbayAbliaApi bean = new EbayAbliaApi(ap);
+ EbayResult ebayRes = bean.ebayGetFulfillmentPolicy();
+ System.out.println(ebayRes.getMsg() + "\n" + ebayRes.getMsg());
+ ebayRes = bean.ebayGetReturnPolicy();
+ System.out.println(ebayRes.getMsg() + "\n" + ebayRes.getMsg());
+ ebayRes = bean.ebayGetPaymentPolicy();
+ System.out.println(ebayRes.getMsg() + "\n" + ebayRes.getMsg());
+ }
+
+ public String getApplicationId() {
+ return (this.applicationId == null) ? "" : this.applicationId.trim();
+ }
+
+ public void setApplicationId(String applicationId) {
+ this.applicationId = applicationId;
+ }
+
+ public String getDeveloperId() {
+ return (this.developerId == null) ? "" : this.developerId.trim();
+ }
+
+ public void setDeveloperId(String developerId) {
+ this.developerId = developerId;
+ }
+
+ public String getCertificateId() {
+ return (this.certificateId == null) ? "" : this.certificateId;
+ }
+
+ public void setCertificateId(String certificateId) {
+ this.certificateId = certificateId;
+ }
+
+ public boolean isUseSandbox() {
+ return this.useSandbox;
+ }
+
+ public void setUseSandbox(boolean useSandbox) {
+ this.useSandbox = useSandbox;
+ }
+
+ public EbayResult ebayGetFulfillmentPolicy() {
+ EbayResult res = new EbayResult();
+ try {
+ if (this.debug)
+ System.out.println("AbliaEbayApi --> ebayGetFulfillmentPolicy");
+ CloseableHttpClient closeableHttpClient = HttpClientBuilder.create().build();
+ HttpGet request = new HttpGet("https://api.ebay.com/sell/account/v1/fulfillment_policy?marketplace_id=EBAY_IT");
+ request.setHeader("Authorization", getTokenOath4GetRequest());
+ request.setHeader("Accept-Encoding", "application/gzip");
+ HttpResponse resp = closeableHttpClient.execute((HttpUriRequest)request);
+ String content = EntityUtils.toString(resp.getEntity());
+ int statusCode = resp.getStatusLine().getStatusCode();
+ String defaultPolicyId = "";
+ if (statusCode == 200) {
+ JSONObject jo = new JSONObject(content);
+ JSONArray joArr = jo.getJSONArray("fulfillmentPolicies");
+ for (int i = 0; i < joArr.length(); i++) {
+ JSONObject row = joArr.getJSONObject(i);
+ JSONArray categoryTypes = row.getJSONArray("categoryTypes");
+ if (categoryTypes.length() > 0) {
+ JSONObject categoryType = categoryTypes.getJSONObject(0);
+ if (categoryType.getBoolean("default")) {
+ defaultPolicyId = row.getString("fulfillmentPolicyId");
+ break;
+ }
+ }
+ }
+ if (!defaultPolicyId.isEmpty()) {
+ res.setOk(true);
+ res.setResult(defaultPolicyId);
+ res.setMsg("Trovata fulfillmentPolicyId di default: " + defaultPolicyId);
+ } else {
+ res.setMsg("Impossibile trovare fulfillmentPolicyId di default.\nCollegati al tuo account ebay:\nimpostazioni account --> \nPreferenze account: impostazioni --> \nGestore delle regole di vendita --> \nCrea regola Spedizione");
+ res.setOk(false);
+ }
+ } else {
+ res.setMsg(content);
+ res.setOk(false);
+ }
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ res.setMsg(e.getMessage());
+ res.setOk(false);
+ }
+ return res;
+ }
+
+ public EbayResult XXXaddEbayItem(Articolo bean) {
+ EbayResult res = new EbayResult();
+ try {
+ if (this.debug)
+ System.out.println("AbliaEbayApi --> addEbayItem ");
+ ApiContext apiContext = getApiContext();
+ VerifyAddItemCall callVI = new VerifyAddItemCall(apiContext);
+ callVI.setEnableCompression(true);
+ callVI.setItem(getEbayItemByArticolo(bean));
+ FeesType feesTYpe = callVI.verifyAddItem();
+ if (this.debug)
+ System.out.println(callVI.getErrorHandling().value());
+ AddItemCall addItemCall = new AddItemCall(apiContext);
+ } catch (Exception e) {
+ e.printStackTrace();
+ res.setOk(false);
+ res.setMsg(e.getMessage());
+ }
+ return res;
+ }
+
+ private ItemType getEbayItemByArticolo(Articolo bean) {
+ String lang = "it";
+ ItemType item = new ItemType();
+ item.setTitle(bean.getNome());
+ item.setSKU(bean.getCodice());
+ item.setDescription(bean.getDescrizioneMarketplace(lang));
+ item.setCurrency(CurrencyCodeType.EUR);
+ item.setCountry(CountryCodeType.IT);
+ item.setPostalCode("59100");
+ item.setLocation("Prato");
+ item.setQuantity(Integer.valueOf((int)bean.getQuantita()));
+ item.setQuantityAvailable(Integer.valueOf((int)bean.getQuantita()));
+ if (bean.getFlgUsato() == 0L) {
+ item.setConditionDisplayName("Nuovo");
+ item.setConditionID(Integer.valueOf(1000));
+ } else {
+ item.setConditionDisplayName("Usato");
+ item.setConditionID(Integer.valueOf(0));
+ }
+ ProductListingDetailsType pldt = new ProductListingDetailsType();
+ pldt.setEAN(bean.getCodiceEan());
+ BrandMPNType mpn = new BrandMPNType();
+ mpn.setBrand(bean.getMarca().getDescrizione());
+ mpn.setMPN(bean.getCodiceProduttore());
+ pldt.setBrandMPN(mpn);
+ item.setProductListingDetails(pldt);
+ item.setDispatchTimeMax(Integer.valueOf(2));
+ item.setListingType(ListingTypeCodeType.FIXED_PRICE_ITEM);
+ item.setListingDuration(ListingDurationCodeType.DAYS_30.value());
+ ReturnPolicyType rpt = new ReturnPolicyType();
+ rpt.setDescription("Si accettano restituzione di prodotti in perfetto stato, nella confezione originale entro il termine di 14 gg come previsto dalla legge.");
+ rpt.setReturnsAccepted("Restituzione accettata");
+ rpt.setReturnsAcceptedOption(ReturnsAcceptedCodeType.RETURNS_ACCEPTED.value());
+ rpt.setReturnsWithin("14 giorni");
+ rpt.setReturnsWithinOption(ReturnsWithinOptionsCodeType.DAYS_14.value());
+ rpt.setShippingCostPaidBy("Acquirente");
+ rpt.setShippingCostPaidByOption(ShippingCostPaidByOptionsCodeType.BUYER.value());
+ item.setReturnPolicy(rpt);
+ SellerProfilesType sellerProfile = new SellerProfilesType();
+ SellerShippingProfileType sellerShippingProfile = new SellerShippingProfileType();
+ sellerShippingProfile.setShippingProfileID(Long.valueOf(4949L));
+ sellerProfile.setSellerShippingProfile(sellerShippingProfile);
+ SellerReturnProfileType sellerReturnProfile = new SellerReturnProfileType();
+ sellerReturnProfile.setReturnProfileID(Long.valueOf(4947L));
+ sellerProfile.setSellerReturnProfile(sellerReturnProfile);
+ SellerPaymentProfileType sellerPaymentProfile = new SellerPaymentProfileType();
+ sellerPaymentProfile.setPaymentProfileID(Long.valueOf(4945L));
+ sellerProfile.setSellerPaymentProfile(sellerPaymentProfile);
+ item.setSellerProfiles(sellerProfile);
+ BuyerPaymentMethodCodeType[] paymentA = new BuyerPaymentMethodCodeType[1];
+ paymentA[0] = BuyerPaymentMethodCodeType.PAY_PAL;
+ item.setPaymentMethods(paymentA);
+ item.setPayPalEmailAddress("acolzi@f3.com");
+ if (!bean.getTipo().getEbayCategoryId().isEmpty()) {
+ CategoryType ct = new CategoryType();
+ ct.setCategoryID(bean.getTipo().getEbayCategoryId());
+ ct.setCategoryName(bean.getTipo().getEbayCategoryDesc());
+ item.setPrimaryCategory(ct);
+ } else {
+ CategoryType ct = new CategoryType();
+ ct.setCategoryID("80053");
+ ct.setCategoryName("Monitor");
+ item.setPrimaryCategory(ct);
+ }
+ AmountType at = new AmountType();
+ if (bean.getListinoEbay().getId_listino() > 0L) {
+ at.setValue(bean.getListinoEbay().getPrezzoIva(bean).getPrezzoFinale());
+ } else {
+ at.setValue(bean.getPrezzoBaseIva());
+ }
+ at.setCurrencyID(CurrencyCodeType.EUR);
+ item.setStartPrice(at);
+ PictureDetailsType pdt = new PictureDetailsType();
+ pdt.setGalleryType(GalleryTypeCodeType.GALLERY);
+ ArrayList urlAL = new ArrayList<>();
+ for (int i = 1; i < 20; i++) {
+ if (bean.isImgExist(i)) {
+ String url = bean.getWwwAddressParm() + bean.getWwwAddressParm() + bean.getPathImg();
+ urlAL.add(url);
+ }
+ }
+ if (urlAL.size() > 0) {
+ String[] arr = urlAL.toArray(new String[urlAL.size()]);
+ pdt.setPictureURL(arr);
+ } else {
+ String[] fake = { "https://i2.ebayimg.com/abc/M28/dummy.jpg" };
+ pdt.setPictureURL(fake);
+ }
+ item.setPictureDetails(pdt);
+ return item;
+ }
+
+ public EbayAuthNAuthToken fetchTokenSdk(String l_sessionId) {
+ EbayAuthNAuthToken res = new EbayAuthNAuthToken();
+ try {
+ FetchTokenCall ftc = new FetchTokenCall(getApiContext());
+ ftc.setSessionID(l_sessionId);
+ res.setToken(ftc.fetchToken());
+ res.setExpirationDate(new Date(ftc.getHardExpirationTime().getTimeInMillis()));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public EbayResult ebayCreateInventoryLocation(String merchantLocationKey) {
+ EbayResult resER = new EbayResult();
+ try {
+ if (this.debug)
+ System.out.println("AbliaEbayApi --> ebayCreateInventoryLocation");
+ CloseableHttpClient client = HttpClients.createDefault();
+ HttpPost request = new HttpPost("https://api.ebay.com/sell/inventory/v1/location/{merchantLocationKey}".replace("{merchantLocationKey}", merchantLocationKey));
+ request.setHeader("Authorization", getTokenOath4GetRequest());
+ request.setHeader("Accept", "application/json");
+ request.setHeader("Content-Type", "application/json");
+ request.setHeader("Content-Language", "it-IT");
+ JSONObject item = getJsonInventoryLocation(merchantLocationKey);
+ if (this.debug)
+ System.out.println("json ebay v 1:\n" + item.toString(4));
+ StringEntity stringEntity = new StringEntity(item.toString(4), "UTF-8");
+ request.setEntity((HttpEntity)stringEntity);
+ int statusCode = 200;
+ CloseableHttpResponse closeableHttpResponse = client.execute((HttpUriRequest)request);
+ statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+ if (statusCode < 300) {
+ resER.setOk(true);
+ resER.setMsg("Inventory location con chiave " + merchantLocationKey + " creato correttamente");
+ if (this.debug)
+ System.out.println("Inventory location con chiave " + merchantLocationKey + " creato correttamente");
+ } else {
+ resER.setOk(false);
+ System.out.println("Errore Inventory location con chiave " + merchantLocationKey + ". status code: " + statusCode);
+ resER.setMsg("Errore Inventory location con chiave " + merchantLocationKey + ". status code: " + statusCode);
+ }
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ resER.setOk(false);
+ resER.setMsg(e.getMessage());
+ }
+ return resER;
+ }
+
+ private JSONObject getJsonItemByArticolo(Articolo bean) {
+ JSONObject jo = new JSONObject();
+ String lang = "it";
+ JSONObject availability = new JSONObject();
+ JSONObject shipToLocationAvailability = new JSONObject();
+ shipToLocationAvailability.put("quantity", bean.getQtaEbayDaInviare());
+ availability.put("shipToLocationAvailability", shipToLocationAvailability);
+ jo.put("availability", availability);
+ if (bean.getFlgUsato() > 0L) {
+ jo.put("condition", bean.getStatoUsato().getEbayCondition());
+ jo.put("conditionDescription", bean.getStatoUsato().getDescrizione(lang));
+ } else {
+ jo.put("condition", "NEW");
+ }
+ JSONObject product = new JSONObject();
+ product.put("title", bean.getNomeMarketplace(lang));
+ product.put("description", bean.getDescrizioneMarketplace(lang).replace(" ", " "));
+ product.put("brand", bean.getMarca().getDescrizione());
+ if (!bean.getCodiceProduttore().isEmpty())
+ product.put("mpn", bean.getCodiceProduttore());
+ if (!bean.getCodiceEan().isEmpty()) {
+ String[] eans = { bean.getCodiceEan() };
+ product.put("ean", eans);
+ }
+ JSONObject aspects = new JSONObject();
+ String[] Brand = { bean.getMarca().getDescrizione() };
+ aspects.put("Marca", Brand);
+ Vectumerator vecCa = bean.getCaratteristicheArticolo();
+ while (vecCa.hasMoreElements()) {
+ CaratteristicaArticolo rowCa = (CaratteristicaArticolo)vecCa.nextElement();
+ String[] val = { rowCa.getVal() };
+ aspects.put(rowCa.getCaratteristica().getDescrizione(), val);
+ }
+ product.put("aspects", aspects);
+ ArrayList urlAL = new ArrayList<>();
+ for (int i = 1; i < 20; i++) {
+ if (bean.isImgExist(i)) {
+ String url = bean.getWwwAddressParm() + bean.getWwwAddressParm() + bean.getPathImg();
+ urlAL.add(url);
+ }
+ }
+ if (urlAL.size() > 0) {
+ String[] arr = urlAL.toArray(new String[urlAL.size()]);
+ product.put("imageUrls", arr);
+ } else {
+ String[] fake = { "https://i2.ebayimg.com/abc/M28/dummy.jpg" };
+ product.put("imageUrls", fake);
+ }
+ jo.put("product", product);
+ return jo;
+ }
+
+ public JSONObject bulkUpdatePriceQuantityRest(String l_query) {
+ JSONObject res = null;
+ return res;
+ }
+
+ public String getCategoryTreeId() {
+ String res = "";
+ try {
+ CloseableHttpClient closeableHttpClient = HttpClientBuilder.create().build();
+ HttpGet request = new HttpGet("https://api.ebay.com/commerce/taxonomy/v1_beta/get_default_category_tree_id?marketplace_id=EBAY_IT");
+ request.setHeader("Authorization", getTokenOath4GetRequest());
+ HttpResponse resp = closeableHttpClient.execute((HttpUriRequest)request);
+ String content = EntityUtils.toString(resp.getEntity());
+ int statusCode = resp.getStatusLine().getStatusCode();
+ JSONObject jRes = new JSONObject(content);
+ return jRes.getString("categoryTreeId");
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ return res;
+ }
+ }
+
+ public EbayOrder getEbayOrderRest(String orderId) {
+ EbayOrder res = new EbayOrder();
+ try {
+ CloseableHttpClient closeableHttpClient = HttpClientBuilder.create().build();
+ HttpGet request = new HttpGet("https://api.ebay.com/sell/fulfillment/v1/order/{orderId}?".replace("{orderId}", orderId));
+ request.setHeader("Authorization", getTokenOath4GetRequest());
+ HttpResponse resp = closeableHttpClient.execute((HttpUriRequest)request);
+ String content = EntityUtils.toString(resp.getEntity());
+ int statusCode = resp.getStatusLine().getStatusCode();
+ JSONObject jOrder = new JSONObject(content);
+ String buyerId = jOrder.getJSONObject("buyer").getString("username");
+ String amount = jOrder.getJSONObject("pricingSummary").getJSONObject("total").getString("value");
+ try {
+ String buyerTaxId = jOrder.getJSONObject("buyer").getJSONObject("taxIdentifier").getString("taxpayerId");
+ String taxIdType = jOrder.getJSONObject("buyer").getJSONObject("taxIdentifier").getString("taxIdentifierType");
+ res.setBuyerTaxId(buyerTaxId);
+ res.setTaxIdType(taxIdType);
+ } catch (Exception e) {}
+ res.setBuyerId(buyerId);
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ }
+ return res;
+ }
+
+ public Vectumerator getEbayOrdersRest() {
+ Vectumerator vec = new Vectumerator();
+ try {
+ CloseableHttpClient closeableHttpClient = HttpClientBuilder.create().build();
+ HttpGet request = new HttpGet("https://api.ebay.com/sell/fulfillment/v1/order?limit=150&offset=0");
+ request.setHeader("Authorization", getTokenOath4GetRequest());
+ HttpResponse resp = closeableHttpClient.execute((HttpUriRequest)request);
+ String content = EntityUtils.toString(resp.getEntity());
+ int statusCode = resp.getStatusLine().getStatusCode();
+ if (this.debug)
+ System.out.println("Status Code: " + statusCode);
+ if (this.debug)
+ System.out.println("\ncontent = " + content);
+ JSONObject jo = new JSONObject(content);
+ JSONArray jOrders = jo.getJSONArray("orders");
+ for (int i = 0; i < jOrders.length(); i++) {
+ JSONObject jOrder = jOrders.getJSONObject(i);
+ String orderId = jOrder.getString("orderId");
+ EbayOrder row = getEbayOrderRest(orderId);
+ if (this.debug)
+ System.out.println(orderId + " " + orderId + " " + row.getBuyerId() + " " + row.getAmount() + " " + row.getTaxIdType());
+ }
+ } catch (Exception e) {
+ System.out.println(e.getMessage());
+ e.printStackTrace();
+ }
+ return vec;
+ }
+
+ public EbayResult getSdkEbayOrders() {
+ EbayResult resER = new EbayResult();
+ try {
+ Vector