Implementata mtb_part in rettifica giacenze.
This commit is contained in:
parent
eee0567d71
commit
f8edeeefcb
46
.idea/assetWizardSettings.xml
generated
Normal file
46
.idea/assetWizardSettings.xml
generated
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="WizardSettings">
|
||||||
|
<option name="children">
|
||||||
|
<map>
|
||||||
|
<entry key="vectorWizard">
|
||||||
|
<value>
|
||||||
|
<PersistentState>
|
||||||
|
<option name="children">
|
||||||
|
<map>
|
||||||
|
<entry key="vectorAssetStep">
|
||||||
|
<value>
|
||||||
|
<PersistentState>
|
||||||
|
<option name="children">
|
||||||
|
<map>
|
||||||
|
<entry key="clipartAsset">
|
||||||
|
<value>
|
||||||
|
<PersistentState>
|
||||||
|
<option name="values">
|
||||||
|
<map>
|
||||||
|
<entry key="url" value="jar:file:/C:/Program%20Files/Android/Android%20Studio/plugins/android/lib/android.jar!/images/material_design_icons/content/ic_clear_black_24dp.xml" />
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</PersistentState>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
<option name="values">
|
||||||
|
<map>
|
||||||
|
<entry key="outputName" value="ic_clear_black_24dp" />
|
||||||
|
<entry key="sourceFile" value="C:\Users\Giuseppe" />
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</PersistentState>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</PersistentState>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@ -3,14 +3,14 @@ apply plugin: 'kotlin-android'
|
|||||||
apply plugin: 'kotlin-android-extensions'
|
apply plugin: 'kotlin-android-extensions'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 27
|
compileSdkVersion 28
|
||||||
buildToolsVersion '28.0.3'
|
buildToolsVersion '28.0.3'
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "it.integry.integrywmsnative"
|
applicationId "it.integry.integrywmsnative"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 27
|
targetSdkVersion 28
|
||||||
versionCode 1
|
versionCode 4
|
||||||
versionName "1.0"
|
versionName "1.0.1"
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@ -36,13 +36,13 @@ dependencies {
|
|||||||
})
|
})
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||||
implementation 'com.orhanobut:logger:2.2.0'
|
implementation 'com.orhanobut:logger:2.2.0'
|
||||||
implementation 'com.android.support:appcompat-v7:27.1.1'
|
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||||
implementation 'com.android.support:support-v4:27.1.1'
|
implementation 'com.android.support:support-v4:28.0.0'
|
||||||
implementation 'com.android.support:design:27.1.1'
|
implementation 'com.android.support:design:28.0.0'
|
||||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||||
implementation 'com.android.support:cardview-v7:27.1.1'
|
implementation 'com.android.support:cardview-v7:28.0.0'
|
||||||
implementation 'com.android.support:recyclerview-v7:27.1.1'
|
implementation 'com.android.support:recyclerview-v7:28.0.0'
|
||||||
implementation 'com.android.support:preference-v7:27.1.1'
|
implementation 'com.android.support:preference-v7:28.0.0'
|
||||||
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
|
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
|
||||||
implementation 'com.squareup.retrofit2:converter-gson:2.0.0'
|
implementation 'com.squareup.retrofit2:converter-gson:2.0.0'
|
||||||
implementation 'org.parceler:parceler-api:1.1.10'
|
implementation 'org.parceler:parceler-api:1.1.10'
|
||||||
@ -72,6 +72,13 @@ dependencies {
|
|||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
implementation project(':waterfall_toolbar')
|
implementation project(':waterfall_toolbar')
|
||||||
implementation 'com.mikhaellopez:lazydatepicker:1.0.0'
|
implementation 'com.mikhaellopez:lazydatepicker:1.0.0'
|
||||||
|
implementation 'com.github.demoNo:AutoScrollViewPager:v1.0.2'
|
||||||
|
|
||||||
|
//AppUpdate
|
||||||
|
implementation 'com.github.javiersantos:AppUpdater:2.7'
|
||||||
|
|
||||||
|
|
||||||
|
//Barcode
|
||||||
implementation project(':pointmobilescannerlibrary')
|
implementation project(':pointmobilescannerlibrary')
|
||||||
implementation project(path: ':barcode_base_library')
|
implementation project(path: ':barcode_base_library')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,8 @@
|
|||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
android:windowSoftInputMode="adjustPan">
|
android:windowSoftInputMode="adjustPan"
|
||||||
|
android:screenOrientation="portrait">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
@ -28,21 +29,26 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".gest.accettazione_ordine_inevaso.AccettazioneOrdineInevasoActivity"
|
android:name=".gest.accettazione_ordine_inevaso.AccettazioneOrdineInevasoActivity"
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
android:windowSoftInputMode="adjustNothing" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.vendita_ordine_inevaso.VenditaOrdineInevasoActivity"
|
android:name=".gest.vendita_ordine_inevaso.VenditaOrdineInevasoActivity"
|
||||||
android:theme="@style/Light"
|
android:theme="@style/Light"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:windowSoftInputMode="adjustNothing" />
|
android:windowSoftInputMode="adjustNothing" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.login.LoginActivity"
|
android:name=".gest.login.LoginActivity"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/Light" />
|
android:theme="@style/Light" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.lista_bancali.ListaBancaliActivity"
|
android:name=".gest.lista_bancali.ListaBancaliActivity"
|
||||||
android:label="@string/activity_lista_bancali_title"
|
android:label="@string/activity_lista_bancali_title"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/Light" />
|
android:theme="@style/Light" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".gest.contenuto_bancale.ContenutoBancaleActivity"
|
android:name=".gest.contenuto_bancale.ContenutoBancaleActivity"
|
||||||
android:label="@string/activity_contenuto_bancale_title"
|
android:label="@string/activity_contenuto_bancale_title"
|
||||||
|
android:screenOrientation="portrait"
|
||||||
android:theme="@style/Light" />
|
android:theme="@style/Light" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package it.integry.integrywmsnative;
|
package it.integry.integrywmsnative;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.databinding.DataBindingUtil;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
@ -11,10 +12,13 @@ import android.support.v7.app.ActionBarDrawerToggle;
|
|||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.support.v7.widget.SearchView;
|
import android.support.v7.widget.SearchView;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
@ -25,7 +29,9 @@ import it.integry.integrywmsnative.core.interfaces.IFilterableFragment;
|
|||||||
import it.integry.integrywmsnative.core.interfaces.IRecyclerFragment;
|
import it.integry.integrywmsnative.core.interfaces.IRecyclerFragment;
|
||||||
import it.integry.integrywmsnative.core.interfaces.ISelectAllFragment;
|
import it.integry.integrywmsnative.core.interfaces.ISelectAllFragment;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
import it.integry.integrywmsnative.core.update.UpdatesManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilitySettings;
|
import it.integry.integrywmsnative.core.utility.UtilitySettings;
|
||||||
|
import it.integry.integrywmsnative.databinding.ActivityMainBinding;
|
||||||
import it.integry.integrywmsnative.gest.accettazione.MainAccettazioneFragment;
|
import it.integry.integrywmsnative.gest.accettazione.MainAccettazioneFragment;
|
||||||
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
import it.integry.integrywmsnative.core.interfaces.ITitledFragment;
|
||||||
import it.integry.integrywmsnative.gest.login.LoginActivity;
|
import it.integry.integrywmsnative.gest.login.LoginActivity;
|
||||||
@ -39,17 +45,10 @@ import it.integry.plugins.waterfalltoolbar.WaterfallToolbar;
|
|||||||
public class MainActivity extends AppCompatActivity
|
public class MainActivity extends AppCompatActivity
|
||||||
implements NavigationView.OnNavigationItemSelectedListener {
|
implements NavigationView.OnNavigationItemSelectedListener {
|
||||||
|
|
||||||
@BindView(R.id.main_search) SearchView mSearchView;
|
//@BindView(R.id.drawer_username) TextView mDrawerUsername;
|
||||||
@BindView(R.id.main_select_all) ImageButton mSelectAll;
|
//@BindView(R.id.drawer_logoAzienda) ImageView mDrawerLogo;
|
||||||
@BindView(R.id.main_filter) ImageButton mFilterBtn;
|
|
||||||
|
|
||||||
@BindView(R.id.nav_view) NavigationView mNavigationView;
|
|
||||||
|
|
||||||
@BindView(R.id.waterfall_toolbar) WaterfallToolbar mWaterfallToolbar;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private ActivityMainBinding mBinding;
|
||||||
|
|
||||||
private boolean firstCheckExecution = true;
|
private boolean firstCheckExecution = true;
|
||||||
private boolean mIsOnline = false;
|
private boolean mIsOnline = false;
|
||||||
@ -61,24 +60,23 @@ public class MainActivity extends AppCompatActivity
|
|||||||
if(SettingsManager.i().user.username == null && SettingsManager.i().user.password == null){
|
if(SettingsManager.i().user.username == null && SettingsManager.i().user.password == null){
|
||||||
startLoginActivity();
|
startLoginActivity();
|
||||||
} else {
|
} else {
|
||||||
setContentView(R.layout.activity_main);
|
mBinding = DataBindingUtil.inflate(LayoutInflater.from(this), R.layout.activity_main, null, false);
|
||||||
|
setContentView(mBinding.getRoot());
|
||||||
|
|
||||||
ButterKnife.bind(this);
|
UpdatesManager.init(this);
|
||||||
|
|
||||||
Toolbar toolbar = findViewById(R.id.toolbar);
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
|
|
||||||
DrawerLayout drawer = findViewById(R.id.drawer_layout);
|
|
||||||
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
|
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
|
||||||
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
|
this, mBinding.drawerLayout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
|
||||||
drawer.setDrawerListener(toggle);
|
mBinding.drawerLayout.setDrawerListener(toggle);
|
||||||
toggle.syncState();
|
toggle.syncState();
|
||||||
|
|
||||||
|
|
||||||
mNavigationView = findViewById(R.id.nav_view);
|
mBinding.navView.setNavigationItemSelectedListener(this);
|
||||||
mNavigationView.setNavigationItemSelectedListener(this);
|
mBinding.appBarMain.mainSearch.setVisibility(View.GONE);
|
||||||
|
|
||||||
mSearchView.setVisibility(View.GONE);
|
|
||||||
|
|
||||||
changeContentFragment(MainFragment.newInstance());
|
changeContentFragment(MainFragment.newInstance());
|
||||||
|
|
||||||
@ -133,8 +131,8 @@ public class MainActivity extends AppCompatActivity
|
|||||||
@Override
|
@Override
|
||||||
public boolean onNavigationItemSelected(MenuItem item) {
|
public boolean onNavigationItemSelected(MenuItem item) {
|
||||||
|
|
||||||
mWaterfallToolbar.resetElevation();
|
mBinding.appBarMain.waterfallToolbar.resetElevation();
|
||||||
mWaterfallToolbar.setRecyclerView(null);
|
mBinding.appBarMain.waterfallToolbar.setRecyclerView(null);
|
||||||
|
|
||||||
// Handle navigation view item clicks here.
|
// Handle navigation view item clicks here.
|
||||||
Fragment fragment = null;
|
Fragment fragment = null;
|
||||||
@ -152,11 +150,12 @@ public class MainActivity extends AppCompatActivity
|
|||||||
} else if (id == R.id.nav_manage) {
|
} else if (id == R.id.nav_manage) {
|
||||||
fragment = VersamentoMerceFragment.newInstance();
|
fragment = VersamentoMerceFragment.newInstance();
|
||||||
this.adaptViewToFragment(fragment);
|
this.adaptViewToFragment(fragment);
|
||||||
} else if (id == R.id.nav_share) {
|
}
|
||||||
|
/*else if (id == R.id.nav_share) {
|
||||||
|
|
||||||
} else if (id == R.id.nav_send) {
|
} else if (id == R.id.nav_send) {
|
||||||
|
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
else if(id == R.id.nav_settings){
|
else if(id == R.id.nav_settings){
|
||||||
@ -186,11 +185,11 @@ public class MainActivity extends AppCompatActivity
|
|||||||
|
|
||||||
private void adaptViewToFragment(Fragment fragment){
|
private void adaptViewToFragment(Fragment fragment){
|
||||||
if(fragment instanceof SearchView.OnQueryTextListener) {
|
if(fragment instanceof SearchView.OnQueryTextListener) {
|
||||||
mSearchView.setOnQueryTextListener((SearchView.OnQueryTextListener) fragment);
|
mBinding.appBarMain.mainSearch.setOnQueryTextListener((SearchView.OnQueryTextListener) fragment);
|
||||||
mSearchView.setVisibility(View.VISIBLE);
|
mBinding.appBarMain.mainSearch.setVisibility(View.VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
mSearchView.setOnQueryTextListener(null);
|
mBinding.appBarMain.mainSearch.setOnQueryTextListener(null);
|
||||||
mSearchView.setVisibility(View.GONE);
|
mBinding.appBarMain.mainSearch.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -201,23 +200,23 @@ public class MainActivity extends AppCompatActivity
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(fragment instanceof IRecyclerFragment) {
|
if(fragment instanceof IRecyclerFragment) {
|
||||||
((IRecyclerFragment) fragment).setWaterfallToolbar(mWaterfallToolbar);
|
((IRecyclerFragment) fragment).setWaterfallToolbar(mBinding.appBarMain.waterfallToolbar);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fragment instanceof ISelectAllFragment && ((ISelectAllFragment)fragment).isEnabled()) {
|
if(fragment instanceof ISelectAllFragment && ((ISelectAllFragment)fragment).isEnabled()) {
|
||||||
mSelectAll.setVisibility(View.VISIBLE);
|
mBinding.appBarMain.mainSelectAll.setVisibility(View.VISIBLE);
|
||||||
mSelectAll.setOnClickListener(v -> ((ISelectAllFragment)fragment).onSelectAll());
|
mBinding.appBarMain.mainSelectAll.setOnClickListener(v -> ((ISelectAllFragment)fragment).onSelectAll());
|
||||||
} else {
|
} else {
|
||||||
mSelectAll.setVisibility(View.GONE);
|
mBinding.appBarMain.mainSelectAll.setVisibility(View.GONE);
|
||||||
mSelectAll.setOnClickListener(null);
|
mBinding.appBarMain.mainSelectAll.setOnClickListener(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(fragment instanceof IFilterableFragment) {
|
if(fragment instanceof IFilterableFragment) {
|
||||||
mFilterBtn.setVisibility(View.VISIBLE);
|
mBinding.appBarMain.mainFilter.setVisibility(View.VISIBLE);
|
||||||
mFilterBtn.setOnClickListener(v -> ((IFilterableFragment)fragment).onFilterClick());
|
mBinding.appBarMain.mainFilter.setOnClickListener(v -> ((IFilterableFragment)fragment).onFilterClick());
|
||||||
} else {
|
} else {
|
||||||
mFilterBtn.setVisibility(View.GONE);
|
mBinding.appBarMain.mainFilter.setVisibility(View.GONE);
|
||||||
mFilterBtn.setOnClickListener(null);
|
mBinding.appBarMain.mainFilter.setOnClickListener(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,6 +249,8 @@ public class MainActivity extends AppCompatActivity
|
|||||||
SettingsManager.reloadDBVariables(() -> {
|
SettingsManager.reloadDBVariables(() -> {
|
||||||
mIsOnline = true;
|
mIsOnline = true;
|
||||||
firstCheckExecution = false;
|
firstCheckExecution = false;
|
||||||
|
|
||||||
|
onDBLoaded();
|
||||||
}, ex -> {
|
}, ex -> {
|
||||||
//mNoConnectionLayout.expand(true);
|
//mNoConnectionLayout.expand(true);
|
||||||
if(!mIsOnline) mIsOnline = false;
|
if(!mIsOnline) mIsOnline = false;
|
||||||
@ -261,8 +262,18 @@ public class MainActivity extends AppCompatActivity
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void onDBLoaded() {
|
||||||
|
LinearLayout headerLayout = (LinearLayout) mBinding.navView.getHeaderView(0);
|
||||||
|
|
||||||
|
((TextView) headerLayout.findViewById(R.id.drawer_username)).setText(SettingsManager.i().user.fullname);
|
||||||
|
((TextView) headerLayout.findViewById(R.id.drawer_deposito)).setText(SettingsManager.i().userSession.depo.getCodMdep() + " - " + SettingsManager.i().userSession.depo.getDescrizione());
|
||||||
|
|
||||||
|
if(SettingsManager.iDB().getDatiAzienda().isLogoAvailable()) {
|
||||||
|
((ImageView) headerLayout.findViewById(R.id.drawer_logoAzienda)).setImageBitmap(SettingsManager.iDB().getDatiAzienda().getLogo());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import it.integry.integrywmsnative.core.REST.watcher.ServerStatusChecker;
|
|||||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.settings.Stash;
|
import it.integry.integrywmsnative.core.settings.Stash;
|
||||||
|
import it.integry.integrywmsnative.core.update.UpdatesManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
import it.integry.integrywmsnative.core.utility.UtilityResources;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogSimpleMessageHelper;
|
import it.integry.integrywmsnative.view.dialogs.DialogSimpleMessageHelper;
|
||||||
@ -40,9 +41,6 @@ public class MainApplication extends Application {
|
|||||||
|
|
||||||
res = getResources();
|
res = getResources();
|
||||||
Context = this;
|
Context = this;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called by the system when the device configuration changes while your component is running.
|
// Called by the system when the device configuration changes while your component is running.
|
||||||
|
|||||||
@ -54,8 +54,26 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void createColloLavorazione(RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
|
||||||
|
public static void saveCollo(MtbColt mtbColtToSave, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed){
|
||||||
|
|
||||||
|
EntityRESTConsumer.processEntity(mtbColtToSave, new ISimpleOperationCallback<MtbColt>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(MtbColt value) {
|
||||||
|
if(onComplete != null) onComplete.run(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailed(Exception ex) {
|
||||||
|
if(onFailed != null) onFailed.run(ex);
|
||||||
|
}
|
||||||
|
}, MtbColt.class);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void createColloLavorazione(int segno, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
MtbColt mtbColtToCreate = new MtbColt()
|
MtbColt mtbColtToCreate = new MtbColt()
|
||||||
|
.setSegno(segno)
|
||||||
.setGestione(GestioneEnum.LAVORAZIONE);
|
.setGestione(GestioneEnum.LAVORAZIONE);
|
||||||
|
|
||||||
mtbColtToCreate
|
mtbColtToCreate
|
||||||
@ -76,12 +94,17 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void createColloFromEtichettaAnonima(BarcodeScanDTO barcodeScanDTO, String gestione, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
public static void createColloFromEtichettaAnonima(BarcodeScanDTO barcodeScanDTO, GestioneEnum gestione, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
createColloFromEtichettaAnonima(barcodeScanDTO.getStringValue(), gestione, onComplete, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static void createColloFromEtichettaAnonima(String barcode, GestioneEnum gestione, RunnableArgs<MtbColt> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
MtbColt mtbColtToCreate = new MtbColt()
|
MtbColt mtbColtToCreate = new MtbColt()
|
||||||
.setGestione(gestione);
|
.setGestione(gestione);
|
||||||
|
|
||||||
Integer customNumCollo = UtilityBarcode.getNumColloFromULAnonima(barcodeScanDTO);
|
Integer customNumCollo = UtilityBarcode.getNumColloFromULAnonima(barcode);
|
||||||
String customSerCollo = CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE;
|
String customSerCollo = CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE;
|
||||||
|
|
||||||
if(customNumCollo != null) {
|
if(customNumCollo != null) {
|
||||||
@ -180,14 +203,21 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
mtbColr.setMtbAart(foundMtbAart);
|
mtbColr.setMtbAart(foundMtbAart);
|
||||||
|
mtbColr.setGestione(mtbColt.getGestione());
|
||||||
|
mtbColr.setSerCollo(mtbColt.getSerCollo());
|
||||||
|
mtbColr.setNumCollo(mtbColt.getNumCollo());
|
||||||
|
mtbColr.setDataCollo(mtbColt.getDataColloS());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
onComplete.run(mtbColt);
|
||||||
}
|
}
|
||||||
|
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
|
|
||||||
}
|
} else {
|
||||||
|
|
||||||
onComplete.run(mtbColt);
|
onComplete.run(mtbColt);
|
||||||
|
}
|
||||||
|
|
||||||
}, onFailed);
|
}, onFailed);
|
||||||
|
|
||||||
@ -241,6 +271,8 @@ public class ColliMagazzinoRESTConsumer extends _BaseRESTConsumer{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void changePosizione(MtbColt testata, MtbDepoPosizione posizione, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
public static void changePosizione(MtbColt testata, MtbDepoPosizione posizione, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
testata.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
testata.setOperation(CommonModelConsts.OPERATION.UPDATE);
|
||||||
|
|||||||
@ -4,12 +4,14 @@ import android.text.TextUtils;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.CommonConst;
|
import it.integry.integrywmsnative.core.CommonConst;
|
||||||
@ -19,6 +21,8 @@ import it.integry.integrywmsnative.core.REST.model.MailRequestDTO;
|
|||||||
import it.integry.integrywmsnative.core.REST.model.NativeSqlRequestDTO;
|
import it.integry.integrywmsnative.core.REST.model.NativeSqlRequestDTO;
|
||||||
import it.integry.integrywmsnative.core.REST.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.REST.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.Azienda;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
@ -149,4 +153,24 @@ public class SystemRESTConsumer extends _BaseRESTConsumer {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static void getAzienda(RunnableArgs<Azienda> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
String sql = "SELECT TOP 1 * FROM azienda";
|
||||||
|
|
||||||
|
Type typeOfObjectsList = new TypeToken<ArrayList<Azienda>>() {}.getType();
|
||||||
|
SystemRESTConsumer.processSql(sql, typeOfObjectsList, new ISimpleOperationCallback<List<Azienda>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(List<Azienda> value) {
|
||||||
|
if(onComplete != null) onComplete.run(value.get(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailed(Exception ex) {
|
||||||
|
if(onFailed != null) onFailed.run(ex);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,711 @@
|
|||||||
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.BitmapFactory;
|
||||||
|
import android.util.Base64;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
|
||||||
|
public class Azienda {
|
||||||
|
|
||||||
|
private String nomeDitta;
|
||||||
|
private String indirizzo;
|
||||||
|
private String cap;
|
||||||
|
private String citta;
|
||||||
|
private String prov;
|
||||||
|
private String partIva;
|
||||||
|
private String numTel;
|
||||||
|
private String numFax;
|
||||||
|
private String eMail;
|
||||||
|
private Integer annoContab;
|
||||||
|
private Integer annoMagaz;
|
||||||
|
private Integer annoAttuale;
|
||||||
|
private String ultDataGio;
|
||||||
|
private Integer ultNumGio;
|
||||||
|
private String ribaRSoc1;
|
||||||
|
private String ribaRSoc2;
|
||||||
|
private String ribaRSocBreve;
|
||||||
|
private String dataInizMsg;
|
||||||
|
private String dataFineMsg;
|
||||||
|
private String messaggioDoc;
|
||||||
|
private String liquidazioniIva;
|
||||||
|
private String lastUpgDb;
|
||||||
|
private String logoFile;
|
||||||
|
private String logoB64;
|
||||||
|
private BigDecimal ultDareAv;
|
||||||
|
private Integer sollTop;
|
||||||
|
private Integer sollLeft;
|
||||||
|
private Integer ggUtili;
|
||||||
|
private String codSia;
|
||||||
|
private String flagFattDiff;
|
||||||
|
private String sollHeadPersonal;
|
||||||
|
private String lastUpgSp;
|
||||||
|
private String sitoWeb;
|
||||||
|
private BigDecimal capitaleSoc;
|
||||||
|
private String cciaa;
|
||||||
|
private String iscRegImp;
|
||||||
|
private String ragSocMod;
|
||||||
|
private String prefissoEan;
|
||||||
|
private String codFiscale;
|
||||||
|
private String persFisicaCognome;
|
||||||
|
private String persFisicaNome;
|
||||||
|
private String persFisicaSesso;
|
||||||
|
private String persFisicaDataNascita;
|
||||||
|
private String persFisicaComuneNascita;
|
||||||
|
private String persFisicaProvNascita;
|
||||||
|
private String flagPersFisica;
|
||||||
|
private String persFisicaCodFisc;
|
||||||
|
private String rapprLegale;
|
||||||
|
private String rapprLegaleCodFisc;
|
||||||
|
private String sedeAmm;
|
||||||
|
private String flagSetIvaOmaggi;
|
||||||
|
private String applicationName;
|
||||||
|
private String flagTipoFatturazione;
|
||||||
|
private String tribunale;
|
||||||
|
private Integer settRitardoAnno;
|
||||||
|
private String dbDistributore;
|
||||||
|
private String coStringco;
|
||||||
|
private String lastUpgQc;
|
||||||
|
private String tipoAzienda;
|
||||||
|
private String nazione;
|
||||||
|
private String codDiviContab;
|
||||||
|
private String codIvaOmaggi;
|
||||||
|
private String codCconQuadra;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Regime Fiscale
|
||||||
|
*/
|
||||||
|
private String regFisc;
|
||||||
|
private String statoLiquidazione;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indirizzo PEC Sistema di Interscambio
|
||||||
|
*/
|
||||||
|
|
||||||
|
private String emailSdi;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indirizzo PEC di invio mail verso lo SDI
|
||||||
|
*/
|
||||||
|
|
||||||
|
private String fromEmailSdi;
|
||||||
|
|
||||||
|
|
||||||
|
public String getNomeDitta() {
|
||||||
|
return nomeDitta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setNomeDitta(String nomeDitta) {
|
||||||
|
this.nomeDitta = nomeDitta;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIndirizzo() {
|
||||||
|
return indirizzo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setIndirizzo(String indirizzo) {
|
||||||
|
this.indirizzo = indirizzo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCap() {
|
||||||
|
return cap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setCap(String cap) {
|
||||||
|
this.cap = cap;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCitta() {
|
||||||
|
return citta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setCitta(String citta) {
|
||||||
|
this.citta = citta;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProv() {
|
||||||
|
return prov;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setProv(String prov) {
|
||||||
|
this.prov = prov;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPartIva() {
|
||||||
|
return partIva;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setPartIva(String partIva) {
|
||||||
|
this.partIva = partIva;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNumTel() {
|
||||||
|
return numTel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setNumTel(String numTel) {
|
||||||
|
this.numTel = numTel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNumFax() {
|
||||||
|
return numFax;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setNumFax(String numFax) {
|
||||||
|
this.numFax = numFax;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String geteMail() {
|
||||||
|
return eMail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda seteMail(String eMail) {
|
||||||
|
this.eMail = eMail;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getAnnoContab() {
|
||||||
|
return annoContab;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setAnnoContab(Integer annoContab) {
|
||||||
|
this.annoContab = annoContab;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getAnnoMagaz() {
|
||||||
|
return annoMagaz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setAnnoMagaz(Integer annoMagaz) {
|
||||||
|
this.annoMagaz = annoMagaz;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getAnnoAttuale() {
|
||||||
|
return annoAttuale;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setAnnoAttuale(Integer annoAttuale) {
|
||||||
|
this.annoAttuale = annoAttuale;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUltDataGio() {
|
||||||
|
return ultDataGio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setUltDataGio(String ultDataGio) {
|
||||||
|
this.ultDataGio = ultDataGio;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUltNumGio() {
|
||||||
|
return ultNumGio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setUltNumGio(Integer ultNumGio) {
|
||||||
|
this.ultNumGio = ultNumGio;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRibaRSoc1() {
|
||||||
|
return ribaRSoc1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setRibaRSoc1(String ribaRSoc1) {
|
||||||
|
this.ribaRSoc1 = ribaRSoc1;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRibaRSoc2() {
|
||||||
|
return ribaRSoc2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setRibaRSoc2(String ribaRSoc2) {
|
||||||
|
this.ribaRSoc2 = ribaRSoc2;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRibaRSocBreve() {
|
||||||
|
return ribaRSocBreve;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setRibaRSocBreve(String ribaRSocBreve) {
|
||||||
|
this.ribaRSocBreve = ribaRSocBreve;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataInizMsg() {
|
||||||
|
return dataInizMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setDataInizMsg(String dataInizMsg) {
|
||||||
|
this.dataInizMsg = dataInizMsg;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataFineMsg() {
|
||||||
|
return dataFineMsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setDataFineMsg(String dataFineMsg) {
|
||||||
|
this.dataFineMsg = dataFineMsg;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessaggioDoc() {
|
||||||
|
return messaggioDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setMessaggioDoc(String messaggioDoc) {
|
||||||
|
this.messaggioDoc = messaggioDoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLiquidazioniIva() {
|
||||||
|
return liquidazioniIva;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setLiquidazioniIva(String liquidazioniIva) {
|
||||||
|
this.liquidazioniIva = liquidazioniIva;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLastUpgDb() {
|
||||||
|
return lastUpgDb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setLastUpgDb(String lastUpgDb) {
|
||||||
|
this.lastUpgDb = lastUpgDb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLogoFile() {
|
||||||
|
return logoFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setLogoFile(String logoFile) {
|
||||||
|
this.logoFile = logoFile;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLogoB64() {
|
||||||
|
return logoB64;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isLogoAvailable() {
|
||||||
|
return !UtilityString.isNullOrEmpty(getLogoB64());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Bitmap getLogo() {
|
||||||
|
if(getLogoB64() != null) {
|
||||||
|
byte[] decodedString = Base64.decode(getLogoB64(), Base64.DEFAULT);
|
||||||
|
Bitmap decodedByte = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
|
||||||
|
return decodedByte;
|
||||||
|
} else return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setLogoB64(String logoB64) {
|
||||||
|
this.logoB64 = logoB64;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getUltDareAv() {
|
||||||
|
return ultDareAv;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setUltDareAv(BigDecimal ultDareAv) {
|
||||||
|
this.ultDareAv = ultDareAv;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSollTop() {
|
||||||
|
return sollTop;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setSollTop(Integer sollTop) {
|
||||||
|
this.sollTop = sollTop;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSollLeft() {
|
||||||
|
return sollLeft;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setSollLeft(Integer sollLeft) {
|
||||||
|
this.sollLeft = sollLeft;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getGgUtili() {
|
||||||
|
return ggUtili;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setGgUtili(Integer ggUtili) {
|
||||||
|
this.ggUtili = ggUtili;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodSia() {
|
||||||
|
return codSia;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setCodSia(String codSia) {
|
||||||
|
this.codSia = codSia;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlagFattDiff() {
|
||||||
|
return flagFattDiff;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setFlagFattDiff(String flagFattDiff) {
|
||||||
|
this.flagFattDiff = flagFattDiff;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSollHeadPersonal() {
|
||||||
|
return sollHeadPersonal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setSollHeadPersonal(String sollHeadPersonal) {
|
||||||
|
this.sollHeadPersonal = sollHeadPersonal;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLastUpgSp() {
|
||||||
|
return lastUpgSp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setLastUpgSp(String lastUpgSp) {
|
||||||
|
this.lastUpgSp = lastUpgSp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSitoWeb() {
|
||||||
|
return sitoWeb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setSitoWeb(String sitoWeb) {
|
||||||
|
this.sitoWeb = sitoWeb;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getCapitaleSoc() {
|
||||||
|
return capitaleSoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setCapitaleSoc(BigDecimal capitaleSoc) {
|
||||||
|
this.capitaleSoc = capitaleSoc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCciaa() {
|
||||||
|
return cciaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setCciaa(String cciaa) {
|
||||||
|
this.cciaa = cciaa;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIscRegImp() {
|
||||||
|
return iscRegImp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setIscRegImp(String iscRegImp) {
|
||||||
|
this.iscRegImp = iscRegImp;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRagSocMod() {
|
||||||
|
return ragSocMod;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setRagSocMod(String ragSocMod) {
|
||||||
|
this.ragSocMod = ragSocMod;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrefissoEan() {
|
||||||
|
return prefissoEan;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setPrefissoEan(String prefissoEan) {
|
||||||
|
this.prefissoEan = prefissoEan;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodFiscale() {
|
||||||
|
return codFiscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setCodFiscale(String codFiscale) {
|
||||||
|
this.codFiscale = codFiscale;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPersFisicaCognome() {
|
||||||
|
return persFisicaCognome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setPersFisicaCognome(String persFisicaCognome) {
|
||||||
|
this.persFisicaCognome = persFisicaCognome;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPersFisicaNome() {
|
||||||
|
return persFisicaNome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setPersFisicaNome(String persFisicaNome) {
|
||||||
|
this.persFisicaNome = persFisicaNome;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPersFisicaSesso() {
|
||||||
|
return persFisicaSesso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setPersFisicaSesso(String persFisicaSesso) {
|
||||||
|
this.persFisicaSesso = persFisicaSesso;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPersFisicaDataNascita() {
|
||||||
|
return persFisicaDataNascita;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setPersFisicaDataNascita(String persFisicaDataNascita) {
|
||||||
|
this.persFisicaDataNascita = persFisicaDataNascita;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPersFisicaComuneNascita() {
|
||||||
|
return persFisicaComuneNascita;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setPersFisicaComuneNascita(String persFisicaComuneNascita) {
|
||||||
|
this.persFisicaComuneNascita = persFisicaComuneNascita;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPersFisicaProvNascita() {
|
||||||
|
return persFisicaProvNascita;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setPersFisicaProvNascita(String persFisicaProvNascita) {
|
||||||
|
this.persFisicaProvNascita = persFisicaProvNascita;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlagPersFisica() {
|
||||||
|
return flagPersFisica;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setFlagPersFisica(String flagPersFisica) {
|
||||||
|
this.flagPersFisica = flagPersFisica;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPersFisicaCodFisc() {
|
||||||
|
return persFisicaCodFisc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setPersFisicaCodFisc(String persFisicaCodFisc) {
|
||||||
|
this.persFisicaCodFisc = persFisicaCodFisc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRapprLegale() {
|
||||||
|
return rapprLegale;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setRapprLegale(String rapprLegale) {
|
||||||
|
this.rapprLegale = rapprLegale;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRapprLegaleCodFisc() {
|
||||||
|
return rapprLegaleCodFisc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setRapprLegaleCodFisc(String rapprLegaleCodFisc) {
|
||||||
|
this.rapprLegaleCodFisc = rapprLegaleCodFisc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSedeAmm() {
|
||||||
|
return sedeAmm;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setSedeAmm(String sedeAmm) {
|
||||||
|
this.sedeAmm = sedeAmm;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlagSetIvaOmaggi() {
|
||||||
|
return flagSetIvaOmaggi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setFlagSetIvaOmaggi(String flagSetIvaOmaggi) {
|
||||||
|
this.flagSetIvaOmaggi = flagSetIvaOmaggi;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApplicationName() {
|
||||||
|
return applicationName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setApplicationName(String applicationName) {
|
||||||
|
this.applicationName = applicationName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFlagTipoFatturazione() {
|
||||||
|
return flagTipoFatturazione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setFlagTipoFatturazione(String flagTipoFatturazione) {
|
||||||
|
this.flagTipoFatturazione = flagTipoFatturazione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTribunale() {
|
||||||
|
return tribunale;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setTribunale(String tribunale) {
|
||||||
|
this.tribunale = tribunale;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSettRitardoAnno() {
|
||||||
|
return settRitardoAnno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setSettRitardoAnno(Integer settRitardoAnno) {
|
||||||
|
this.settRitardoAnno = settRitardoAnno;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDbDistributore() {
|
||||||
|
return dbDistributore;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setDbDistributore(String dbDistributore) {
|
||||||
|
this.dbDistributore = dbDistributore;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCoStringco() {
|
||||||
|
return coStringco;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setCoStringco(String coStringco) {
|
||||||
|
this.coStringco = coStringco;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLastUpgQc() {
|
||||||
|
return lastUpgQc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setLastUpgQc(String lastUpgQc) {
|
||||||
|
this.lastUpgQc = lastUpgQc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTipoAzienda() {
|
||||||
|
return tipoAzienda;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setTipoAzienda(String tipoAzienda) {
|
||||||
|
this.tipoAzienda = tipoAzienda;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNazione() {
|
||||||
|
return nazione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setNazione(String nazione) {
|
||||||
|
this.nazione = nazione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodDiviContab() {
|
||||||
|
return codDiviContab;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setCodDiviContab(String codDiviContab) {
|
||||||
|
this.codDiviContab = codDiviContab;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodIvaOmaggi() {
|
||||||
|
return codIvaOmaggi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setCodIvaOmaggi(String codIvaOmaggi) {
|
||||||
|
this.codIvaOmaggi = codIvaOmaggi;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodCconQuadra() {
|
||||||
|
return codCconQuadra;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setCodCconQuadra(String codCconQuadra) {
|
||||||
|
this.codCconQuadra = codCconQuadra;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRegFisc() {
|
||||||
|
return regFisc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setRegFisc(String regFisc) {
|
||||||
|
this.regFisc = regFisc;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatoLiquidazione() {
|
||||||
|
return statoLiquidazione;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setStatoLiquidazione(String statoLiquidazione) {
|
||||||
|
this.statoLiquidazione = statoLiquidazione;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEmailSdi() {
|
||||||
|
return emailSdi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setEmailSdi(String emailSdi) {
|
||||||
|
this.emailSdi = emailSdi;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFromEmailSdi() {
|
||||||
|
return fromEmailSdi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Azienda setFromEmailSdi(String fromEmailSdi) {
|
||||||
|
this.fromEmailSdi = fromEmailSdi;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
|||||||
package it.integry.integrywmsnative.core.model;
|
package it.integry.integrywmsnative.core.model;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
@ -21,6 +22,7 @@ public class MtbCols extends EntityBase {
|
|||||||
type = "mtb_cols";
|
type = "mtb_cols";
|
||||||
setCodMdep(SettingsManager.i().userSession.depo.getCodMdep());
|
setCodMdep(SettingsManager.i().userSession.depo.getCodMdep());
|
||||||
setModificatoDa(SettingsManager.i().user.fullname);
|
setModificatoDa(SettingsManager.i().user.fullname);
|
||||||
|
setDataMove(new Date());
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDataCollo() {
|
public String getDataCollo() {
|
||||||
@ -86,6 +88,12 @@ public class MtbCols extends EntityBase {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MtbCols setDataMove(Date dataMove) {
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
|
||||||
|
this.dataMove = sdf.format(dataMove);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getModificatoDa() {
|
public String getModificatoDa() {
|
||||||
return modificatoDa;
|
return modificatoDa;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package it.integry.integrywmsnative.core.settings;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.REST.model.AvailableCodMdepsDTO;
|
import it.integry.integrywmsnative.core.REST.model.AvailableCodMdepsDTO;
|
||||||
|
import it.integry.integrywmsnative.core.model.Azienda;
|
||||||
import it.integry.integrywmsnative.core.model.MtbDepo;
|
import it.integry.integrywmsnative.core.model.MtbDepo;
|
||||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
|
|
||||||
@ -12,6 +13,8 @@ public class DBSettingsModel {
|
|||||||
private List<AvailableCodMdepsDTO> availableCodMdep = null;
|
private List<AvailableCodMdepsDTO> availableCodMdep = null;
|
||||||
private List<MtbDepoPosizione> availablePosizioni = null;
|
private List<MtbDepoPosizione> availablePosizioni = null;
|
||||||
|
|
||||||
|
private Azienda datiAzienda = null;
|
||||||
|
|
||||||
private boolean enableCheckPartitaMagCheckPickingV;
|
private boolean enableCheckPartitaMagCheckPickingV;
|
||||||
private boolean flagMultiClienteOrdV;
|
private boolean flagMultiClienteOrdV;
|
||||||
private String defaultCodAnag;
|
private String defaultCodAnag;
|
||||||
@ -33,6 +36,15 @@ public class DBSettingsModel {
|
|||||||
this.availablePosizioni = availablePosizioni;
|
this.availablePosizioni = availablePosizioni;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Azienda getDatiAzienda() {
|
||||||
|
return datiAzienda;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DBSettingsModel setDatiAzienda(Azienda datiAzienda) {
|
||||||
|
this.datiAzienda = datiAzienda;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public List<AvailableCodMdepsDTO> getAvailableCodMdep() {
|
public List<AvailableCodMdepsDTO> getAvailableCodMdep() {
|
||||||
return availableCodMdep;
|
return availableCodMdep;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,10 +68,19 @@ public class SettingsManager {
|
|||||||
public static void reloadDBVariables(Runnable onComplete, RunnableArgs<Exception> onFailed){
|
public static void reloadDBVariables(Runnable onComplete, RunnableArgs<Exception> onFailed){
|
||||||
dbSettingsModelIstance = new DBSettingsModel();
|
dbSettingsModelIstance = new DBSettingsModel();
|
||||||
|
|
||||||
|
loadDatiAzienda(() ->
|
||||||
loadAvailableProfiles(() ->
|
loadAvailableProfiles(() ->
|
||||||
loadAvailableCodMdeps(() ->
|
loadAvailableCodMdeps(() ->
|
||||||
loadAvailablePosizioni(() ->
|
loadAvailablePosizioni(() ->
|
||||||
loadGestSetupValues(onComplete, onFailed) ,onFailed), onFailed), onFailed);
|
loadGestSetupValues(onComplete, onFailed) ,onFailed), onFailed), onFailed), onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void loadDatiAzienda(Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
SystemRESTConsumer.getAzienda(datiAzienda -> {
|
||||||
|
SettingsManager.iDB().setDatiAzienda(datiAzienda);
|
||||||
|
|
||||||
|
if(onComplete != null) onComplete.run();
|
||||||
|
}, onFailed);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void loadAvailableProfiles(Runnable onComplete, RunnableArgs<Exception> onFailed){
|
private static void loadAvailableProfiles(Runnable onComplete, RunnableArgs<Exception> onFailed){
|
||||||
|
|||||||
@ -0,0 +1,21 @@
|
|||||||
|
package it.integry.integrywmsnative.core.update;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.github.javiersantos.appupdater.AppUpdater;
|
||||||
|
import com.github.javiersantos.appupdater.enums.Display;
|
||||||
|
import com.github.javiersantos.appupdater.enums.UpdateFrom;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
|
||||||
|
public class UpdatesManager {
|
||||||
|
|
||||||
|
public static void init(Context context) {
|
||||||
|
AppUpdater appUpdater = new AppUpdater(context)
|
||||||
|
.setDisplay(Display.DIALOG)
|
||||||
|
.setUpdateFrom(UpdateFrom.JSON)
|
||||||
|
.setUpdateJSON("http://" + SettingsManager.i().server.host + ":" + SettingsManager.i().server.port + "/ems-api/wms/currentVersion");
|
||||||
|
appUpdater.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -13,6 +13,10 @@ public class UtilityBarcode {
|
|||||||
return barcodeScanDTO != null && barcodeScanDTO.getType() == BarcodeType.CODE128 && barcodeScanDTO.getStringValue().startsWith("U");
|
return barcodeScanDTO != null && barcodeScanDTO.getType() == BarcodeType.CODE128 && barcodeScanDTO.getStringValue().startsWith("U");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isEtichetta128(BarcodeScanDTO barcodeScanDTO){
|
||||||
|
return barcodeScanDTO != null && (barcodeScanDTO.getType() == BarcodeType.CODE128 || barcodeScanDTO.getType() == BarcodeType.EAN128);
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isEtichettaPosizione(BarcodeScanDTO barcodeScanDTO) {
|
public static boolean isEtichettaPosizione(BarcodeScanDTO barcodeScanDTO) {
|
||||||
String barcode = barcodeScanDTO.getStringValue();
|
String barcode = barcodeScanDTO.getStringValue();
|
||||||
boolean isPosizione = false;
|
boolean isPosizione = false;
|
||||||
@ -36,9 +40,9 @@ public class UtilityBarcode {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static Integer getNumColloFromULAnonima(BarcodeScanDTO barcodeScanDTO) {
|
public static Integer getNumColloFromULAnonima(String barcode) {
|
||||||
if(barcodeScanDTO != null && barcodeScanDTO.getType() == BarcodeType.CODE128){
|
if(barcode != null){
|
||||||
return Integer.parseInt(barcodeScanDTO.getStringValue().substring(3));
|
return Integer.parseInt(barcode.substring(3));
|
||||||
} else
|
} else
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,24 @@
|
|||||||
|
package it.integry.integrywmsnative.core.utility;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
|
|
||||||
|
public class UtilityPosizione {
|
||||||
|
|
||||||
|
public static boolean isPosizioneWithLivello(MtbDepoPosizione mtbDepoPosizione) {
|
||||||
|
|
||||||
|
//TODO: Review this check
|
||||||
|
|
||||||
|
|
||||||
|
if(mtbDepoPosizione != null) {
|
||||||
|
|
||||||
|
char LChar = mtbDepoPosizione.getPosizione().charAt(mtbDepoPosizione.getPosizione().length()-2);
|
||||||
|
|
||||||
|
if(LChar == 'L') {
|
||||||
|
return true;
|
||||||
|
} else return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -203,7 +203,7 @@ public class AccettazioneOnOrdineAccettazioneInevasoViewModel implements IOnColl
|
|||||||
|
|
||||||
if(UtilityBarcode.isEtichettaAnonima(data) && !thereIsAnOpenedUL()){
|
if(UtilityBarcode.isEtichettaAnonima(data) && !thereIsAnOpenedUL()){
|
||||||
this.executeEtichettaAnonima(data, progressDialog);
|
this.executeEtichettaAnonima(data, progressDialog);
|
||||||
} else if(data.getType() == BarcodeType.EAN128) {
|
} else if(UtilityBarcode.isEtichetta128(data)) {
|
||||||
this.executeEtichettaEan128(data, progressDialog);
|
this.executeEtichettaEan128(data, progressDialog);
|
||||||
} else if(UtilityBarcode.isEanPeso(data)){
|
} else if(UtilityBarcode.isEanPeso(data)){
|
||||||
this.executeEtichettaEanPeso(data, progressDialog);
|
this.executeEtichettaEanPeso(data, progressDialog);
|
||||||
@ -218,7 +218,7 @@ public class AccettazioneOnOrdineAccettazioneInevasoViewModel implements IOnColl
|
|||||||
ColliMagazzinoRESTConsumer.getBySSCC(barcodeScanDTO.getStringValue(), false, false, mtbColt -> {
|
ColliMagazzinoRESTConsumer.getBySSCC(barcodeScanDTO.getStringValue(), false, false, mtbColt -> {
|
||||||
|
|
||||||
if(mtbColt == null) {
|
if(mtbColt == null) {
|
||||||
this.createNewUL(UtilityBarcode.getNumColloFromULAnonima(barcodeScanDTO), CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE, progressDialog, true, null);
|
this.createNewUL(UtilityBarcode.getNumColloFromULAnonima(barcodeScanDTO.getStringValue()), CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE, progressDialog, true, null);
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
} else {
|
} else {
|
||||||
progressDialog.dismiss();
|
progressDialog.dismiss();
|
||||||
@ -444,7 +444,7 @@ public class AccettazioneOnOrdineAccettazioneInevasoViewModel implements IOnColl
|
|||||||
.setDisablePrint(disablePrint)
|
.setDisablePrint(disablePrint)
|
||||||
.setMtbColr(new ObservableArrayList<>());
|
.setMtbColr(new ObservableArrayList<>());
|
||||||
|
|
||||||
|
value.setMtbCols(null);
|
||||||
|
|
||||||
setULToCurrentContext(value);
|
setULToCurrentContext(value);
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.REST.consumers.ColliMagazzinoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.ISimpleOperationCallback;
|
import it.integry.integrywmsnative.core.REST.consumers.ISimpleOperationCallback;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.SystemRESTConsumer;
|
import it.integry.integrywmsnative.core.REST.consumers.SystemRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.interfaces.IRecyclerItemClicked;
|
import it.integry.integrywmsnative.core.interfaces.IRecyclerItemClicked;
|
||||||
@ -74,7 +75,19 @@ public class ListaBancaliViewModel implements IRecyclerItemClicked<MtbColt> {
|
|||||||
mContext.getText(R.string.loading) + " ...", true);
|
mContext.getText(R.string.loading) + " ...", true);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String sql = "SELECT *, mtb_aart.descrizione, mtb_aart.unt_mis " +
|
ColliMagazzinoRESTConsumer.getByTestata(item, true, false, mtbColt -> {
|
||||||
|
|
||||||
|
ObservableArrayList<MtbColr> mtbColrObservableArrayList = new ObservableArrayList<>();
|
||||||
|
mtbColrObservableArrayList.addAll(mtbColt.getMtbColr());
|
||||||
|
item.setMtbColr(mtbColrObservableArrayList);
|
||||||
|
|
||||||
|
progress.dismiss();
|
||||||
|
|
||||||
|
mContext.startContenutoBancaleActivity(item);
|
||||||
|
|
||||||
|
}, ex -> UtilityExceptions.defaultException(mContext, ex, progress));
|
||||||
|
|
||||||
|
/*String sql = "SELECT *, mtb_aart.descrizione, mtb_aart.unt_mis " +
|
||||||
"FROM mtb_colr " +
|
"FROM mtb_colr " +
|
||||||
"LEFT OUTER JOIN mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart " +
|
"LEFT OUTER JOIN mtb_aart ON mtb_colr.cod_mart = mtb_aart.cod_mart " +
|
||||||
"WHERE " +
|
"WHERE " +
|
||||||
@ -103,7 +116,7 @@ public class ListaBancaliViewModel implements IRecyclerItemClicked<MtbColt> {
|
|||||||
UtilityExceptions.defaultException(mContext, ex, progress);
|
UtilityExceptions.defaultException(mContext, ex, progress);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
@ -31,6 +31,7 @@ public class MainFragment extends Fragment implements ITitledFragment {
|
|||||||
|
|
||||||
@BindView(R.id.no_connection_top_layout) ExpandableLayout mNoConnectionLayout;
|
@BindView(R.id.no_connection_top_layout) ExpandableLayout mNoConnectionLayout;
|
||||||
@BindView(R.id.current_user_name) TextView currentUsername;
|
@BindView(R.id.current_user_name) TextView currentUsername;
|
||||||
|
//@BindView(R.id.drawer_username) TextView drawerUsername;
|
||||||
|
|
||||||
private View mView;
|
private View mView;
|
||||||
|
|
||||||
@ -81,6 +82,7 @@ public class MainFragment extends Fragment implements ITitledFragment {
|
|||||||
|
|
||||||
|
|
||||||
currentUsername.setText(SettingsManager.i().user.fullname);
|
currentUsername.setText(SettingsManager.i().user.fullname);
|
||||||
|
//drawerUsername.setText(SettingsManager.i().user.fullname);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -95,7 +95,7 @@ public class RettificaGiacenzeFragment extends Fragment implements ITitledFragme
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDetach() {
|
public void onDetach() {
|
||||||
mRettificaGiacenzeViewModel.closeLU(false);
|
mRettificaGiacenzeViewModel.closeLU(false, false);
|
||||||
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||||
super.onDetach();
|
super.onDetach();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@ public class RettificaGiacenzeHelper {
|
|||||||
|
|
||||||
public void loadListaFornitori(RunnableArgs<ArrayList<FornitoreDTO>> onComplete) {
|
public void loadListaFornitori(RunnableArgs<ArrayList<FornitoreDTO>> onComplete) {
|
||||||
final ProgressDialog progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
final ProgressDialog progress = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
progress.show();
|
//progress.show();
|
||||||
|
|
||||||
String sql = "SELECT cod_alis as 'codAlis', descrizione FROM atb_list WHERE flag_attivo = 'S'";
|
String sql = "SELECT cod_alis as 'codAlis', descrizione FROM atb_list WHERE flag_attivo = 'S'";
|
||||||
|
|
||||||
@ -53,11 +53,15 @@ public class RettificaGiacenzeHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void searchArtForn(String codAlis, String codArtForOrDescr, RunnableArgs<ArrayList<MtbAartWithFornitore>> onComplete, RunnableArgs<Exception> onFailed) {
|
public void searchArtForn(String codAlis, String codArtForOrDescr, RunnableArgs<ArrayList<MtbAartWithFornitore>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
String sql = "SELECT mtb_aart.*, mtb_lisa.cod_art_for from mtb_lisa, mtb_aart " +
|
|
||||||
" WHERE cod_alis = " + UtilityDB.valueToString(codAlis) +
|
String sql = "SELECT mtb_aart.*, mtb_lisa.cod_art_for from mtb_lisa, mtb_aart, mtb_part " +
|
||||||
|
" WHERE mtb_lisa.cod_alis = " + UtilityDB.valueToString(codAlis) +
|
||||||
" AND mtb_lisa.cod_mart = mtb_aart.cod_mart " +
|
" AND mtb_lisa.cod_mart = mtb_aart.cod_mart " +
|
||||||
" AND (mtb_aart.descrizione_estesa LIKE '%" + codArtForOrDescr +"%' OR cod_art_for LIKE '%" + codArtForOrDescr + "%') " +
|
" AND mtb_lisa.cod_mart = mtb_part.cod_mart " +
|
||||||
" ORDER BY mtb_aart.descrizione_estesa";
|
" AND mtb_part.cod_mdep = '01' " +
|
||||||
|
" AND (mtb_aart.descrizione_estesa LIKE '%" + codArtForOrDescr + "%' OR cod_art_for LIKE '%" + codArtForOrDescr + "%') " +
|
||||||
|
" ORDER BY ABS(mtb_part.qta_esistente) DESC, mtb_aart.descrizione_estesa";
|
||||||
|
|
||||||
|
|
||||||
Type typeOfObjectsList = new TypeToken<ArrayList<MtbAartWithFornitore>>() {}.getType();
|
Type typeOfObjectsList = new TypeToken<ArrayList<MtbAartWithFornitore>>() {}.getType();
|
||||||
SystemRESTConsumer.processSql(sql, typeOfObjectsList, new ISimpleOperationCallback<ArrayList<MtbAartWithFornitore>>() {
|
SystemRESTConsumer.processSql(sql, typeOfObjectsList, new ISimpleOperationCallback<ArrayList<MtbAartWithFornitore>>() {
|
||||||
|
|||||||
@ -26,6 +26,7 @@ import it.integry.integrywmsnative.R;
|
|||||||
import it.integry.integrywmsnative.core.REST.CommonRESTException;
|
import it.integry.integrywmsnative.core.REST.CommonRESTException;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.ColliMagazzinoRESTConsumer;
|
import it.integry.integrywmsnative.core.REST.consumers.ColliMagazzinoRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.ISimpleOperationCallback;
|
import it.integry.integrywmsnative.core.REST.consumers.ISimpleOperationCallback;
|
||||||
|
import it.integry.integrywmsnative.core.REST.consumers.ISingleValueOperationCallback;
|
||||||
import it.integry.integrywmsnative.core.REST.consumers.PrinterRESTConsumer;
|
import it.integry.integrywmsnative.core.REST.consumers.PrinterRESTConsumer;
|
||||||
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
import it.integry.integrywmsnative.core.di.BindableBoolean;
|
||||||
@ -36,6 +37,7 @@ import it.integry.integrywmsnative.core.model.MtbAart;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbCols;
|
import it.integry.integrywmsnative.core.model.MtbCols;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
import it.integry.integrywmsnative.core.report.ReportManager;
|
import it.integry.integrywmsnative.core.report.ReportManager;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
@ -49,6 +51,7 @@ import it.integry.integrywmsnative.gest.rettifica_giacenze.core.adapter.Rettific
|
|||||||
import it.integry.integrywmsnative.gest.rettifica_giacenze.dto.FornitoreDTO;
|
import it.integry.integrywmsnative.gest.rettifica_giacenze.dto.FornitoreDTO;
|
||||||
import it.integry.integrywmsnative.ui.StatusBarAlert;
|
import it.integry.integrywmsnative.ui.StatusBarAlert;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogSimpleMessageHelper;
|
import it.integry.integrywmsnative.view.dialogs.DialogSimpleMessageHelper;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.ask_position_of_lu.DialogAskPositionOfLU;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.DialogChooseArtFromListaArts;
|
import it.integry.integrywmsnative.view.dialogs.choose_art_from_lista_arts.DialogChooseArtFromListaArts;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity.QuantityDTO;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity.QuantityDTO;
|
||||||
@ -216,7 +219,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
private void searchArtFor(String codAlis, String queryText) {
|
private void searchArtFor(String codAlis, String queryText) {
|
||||||
final ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
final ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
progressDialog.show();
|
//progressDialog.show();
|
||||||
|
|
||||||
mHelper.searchArtForn(codAlis, queryText, listaArts -> {
|
mHelper.searchArtForn(codAlis, queryText, listaArts -> {
|
||||||
progressDialog.dismiss();
|
progressDialog.dismiss();
|
||||||
@ -229,7 +232,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
|
|
||||||
private void searchArtInt(String queryText) {
|
private void searchArtInt(String queryText) {
|
||||||
final ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
final ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
progressDialog.show();
|
//progressDialog.show();
|
||||||
|
|
||||||
mHelper.searchArtInt(queryText, listaArts -> {
|
mHelper.searchArtInt(queryText, listaArts -> {
|
||||||
progressDialog.dismiss();
|
progressDialog.dismiss();
|
||||||
@ -409,18 +412,17 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
mtbColt.get().getMtbColr().size() > 0;
|
mtbColt.get().getMtbColr().size() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void closeLU(boolean openNewOne) {
|
public void closeLU(boolean openNewOne, boolean saveCausale) {
|
||||||
|
|
||||||
if(thereIsAnyRowInUL()) {
|
if(thereIsAnOpenedUL()) {
|
||||||
|
|
||||||
final ProgressDialog progress = ProgressDialog.show(mContext, mContext.getText(R.string.waiting),
|
final ProgressDialog progress = ProgressDialog.show(mContext, mContext.getText(R.string.waiting),
|
||||||
mContext.getText(R.string.loading) + " ...", true);
|
mContext.getText(R.string.loading) + " ...", true);
|
||||||
|
|
||||||
if (thereIsAnyRowInUL()) {
|
if (thereIsAnyRowInUL()) {
|
||||||
|
|
||||||
if (!UtilityString.isNullOrEmpty(SettingsManager.iDB().getDefaultCausaleRettificaGiacenze())) {
|
if (!UtilityString.isNullOrEmpty(SettingsManager.iDB().getDefaultCausaleRettificaGiacenze()) && saveCausale) {
|
||||||
|
posizionaCollo(() ->
|
||||||
progress.show();
|
|
||||||
saveCausaleRettificaGiacenze(progress, () -> {
|
saveCausaleRettificaGiacenze(progress, () -> {
|
||||||
if (!mtbColt.get().getDisablePrint()) {
|
if (!mtbColt.get().getDisablePrint()) {
|
||||||
printCollo(progress);
|
printCollo(progress);
|
||||||
@ -428,17 +430,22 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
progress.dismiss();
|
progress.dismiss();
|
||||||
resetMtbColt(openNewOne);
|
resetMtbColt(openNewOne);
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
, ex ->
|
||||||
|
UtilityExceptions.defaultException(mContext, ex, progress)
|
||||||
|
);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
posizionaCollo(() -> {
|
||||||
if (!mtbColt.get().getDisablePrint()) {
|
if (!mtbColt.get().getDisablePrint()) {
|
||||||
progress.show();
|
|
||||||
printCollo(progress);
|
printCollo(progress);
|
||||||
} else {
|
} else {
|
||||||
resetMtbColt(openNewOne);
|
resetMtbColt(openNewOne);
|
||||||
}
|
}
|
||||||
|
}, ex -> UtilityExceptions.defaultException(mContext, ex, progress));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
progress.show();
|
|
||||||
ColliMagazzinoRESTConsumer.deleteCollo(mtbColt.get(), () -> {
|
ColliMagazzinoRESTConsumer.deleteCollo(mtbColt.get(), () -> {
|
||||||
progress.dismiss();
|
progress.dismiss();
|
||||||
resetMtbColt(openNewOne);
|
resetMtbColt(openNewOne);
|
||||||
@ -473,8 +480,17 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void posizionaCollo(Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
/*DialogAskPositionOfLU.makeBase(mContext, mtbColt.get(), () -> {
|
||||||
|
|
||||||
public void printCollo(ProgressDialog progress) {
|
}, ex -> {
|
||||||
|
|
||||||
|
}).show();*/
|
||||||
|
onComplete.run();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void printCollo(ProgressDialog progress) {
|
||||||
|
|
||||||
this.showAskPrint(shouldPrint -> {
|
this.showAskPrint(shouldPrint -> {
|
||||||
|
|
||||||
@ -535,6 +551,7 @@ public class RettificaGiacenzeViewModel implements IRecyclerItemClicked<MtbColr>
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
progress.dismiss();
|
||||||
resetMtbColt(true);
|
resetMtbColt(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,8 @@ import butterknife.ButterKnife;
|
|||||||
import butterknife.OnClick;
|
import butterknife.OnClick;
|
||||||
import it.integry.integrywmsnative.R;
|
import it.integry.integrywmsnative.R;
|
||||||
import it.integry.integrywmsnative.core.REST.CommonRESTException;
|
import it.integry.integrywmsnative.core.REST.CommonRESTException;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.interfaces.IFilterableFragment;
|
import it.integry.integrywmsnative.core.interfaces.IFilterableFragment;
|
||||||
import it.integry.integrywmsnative.core.interfaces.IRecyclerFragment;
|
import it.integry.integrywmsnative.core.interfaces.IRecyclerFragment;
|
||||||
@ -40,8 +42,10 @@ import it.integry.integrywmsnative.gest.vendita.dialogs.DialogVenditaFiltroAvanz
|
|||||||
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaGroupedInevasoDTO;
|
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaGroupedInevasoDTO;
|
||||||
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
|
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
|
||||||
import it.integry.integrywmsnative.gest.vendita.dto.PickingObjectDTO;
|
import it.integry.integrywmsnative.gest.vendita.dto.PickingObjectDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.vendita.viewmodel.VenditaViewModel;
|
||||||
import it.integry.integrywmsnative.gest.vendita_ordine_inevaso.VenditaOrdineInevasoActivity;
|
import it.integry.integrywmsnative.gest.vendita_ordine_inevaso.VenditaOrdineInevasoActivity;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogSimpleMessageHelper;
|
import it.integry.integrywmsnative.view.dialogs.DialogSimpleMessageHelper;
|
||||||
|
import it.integry.plugins.barcode_base_library.model.BarcodeScanDTO;
|
||||||
import it.integry.plugins.waterfalltoolbar.WaterfallToolbar;
|
import it.integry.plugins.waterfalltoolbar.WaterfallToolbar;
|
||||||
|
|
||||||
public class MainVenditaFragment extends Fragment implements ITitledFragment, IRecyclerFragment, ISelectAllFragment, IFilterableFragment {
|
public class MainVenditaFragment extends Fragment implements ITitledFragment, IRecyclerFragment, ISelectAllFragment, IFilterableFragment {
|
||||||
@ -50,6 +54,7 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IR
|
|||||||
|
|
||||||
private VenditaHelper mHelper;
|
private VenditaHelper mHelper;
|
||||||
private FragmentMainVenditaBinding mBinding = null;
|
private FragmentMainVenditaBinding mBinding = null;
|
||||||
|
private VenditaViewModel mViewModel;
|
||||||
|
|
||||||
private MainListVenditaAdapter mAdapter;
|
private MainListVenditaAdapter mAdapter;
|
||||||
|
|
||||||
@ -58,6 +63,10 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IR
|
|||||||
|
|
||||||
private DialogVenditaFiltroAvanzatoViewModel mAppliedFilterViewModel;
|
private DialogVenditaFiltroAvanzatoViewModel mAppliedFilterViewModel;
|
||||||
|
|
||||||
|
private int barcodeScannerIstanceID = -1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public MainVenditaFragment() {
|
public MainVenditaFragment() {
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -83,6 +92,13 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IR
|
|||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
@ -95,29 +111,26 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IR
|
|||||||
|
|
||||||
ButterKnife.bind(this, mBinding.getRoot());
|
ButterKnife.bind(this, mBinding.getRoot());
|
||||||
|
|
||||||
initActionBar();
|
|
||||||
|
|
||||||
mWaterfallToolbar.setRecyclerView(mBinding.venditaMainList);
|
mWaterfallToolbar.setRecyclerView(mBinding.venditaMainList);
|
||||||
|
|
||||||
return mBinding.getRoot();
|
return mBinding.getRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initActionBar() {
|
|
||||||
// ((AppCompatActivity)getActivity()).getSupportActionBar().
|
|
||||||
}
|
|
||||||
|
|
||||||
private void init(){
|
private void init(){
|
||||||
|
|
||||||
final ProgressDialog progress = ProgressDialog.show(getActivity(), getText(R.string.waiting),
|
final ProgressDialog progress = ProgressDialog.show(getActivity(), getText(R.string.waiting),
|
||||||
getText(R.string.loading) + " ...", true);
|
getText(R.string.loading) + " ...", true);
|
||||||
|
|
||||||
mHelper = new VenditaHelper(getActivity());
|
mHelper = new VenditaHelper(getActivity());
|
||||||
|
mViewModel = new VenditaViewModel(getActivity(), this, mBinding, mHelper);
|
||||||
|
|
||||||
mHelper.loadOrdini(new VenditaHelper.ILoadOrdiniCallback() {
|
mHelper.loadOrdini(new VenditaHelper.ILoadOrdiniCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onLoadSuccess(List<OrdineVenditaInevasoDTO> ordini) {
|
public void onLoadSuccess(List<OrdineVenditaInevasoDTO> ordini) {
|
||||||
Toast.makeText(getActivity(), "Caricati " + ordini.size() + " ordini", Toast.LENGTH_LONG).show();
|
UtilityToast.showToast("Caricati " + ordini.size() + " ordini");
|
||||||
mOriginalOrderList = ordini;
|
mOriginalOrderList = ordini;
|
||||||
|
mViewModel.setListOrder(ordini);
|
||||||
|
|
||||||
groupOrdini(ordini);
|
groupOrdini(ordini);
|
||||||
initRecyclerView();
|
initRecyclerView();
|
||||||
progress.dismiss();
|
progress.dismiss();
|
||||||
@ -133,10 +146,14 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IR
|
|||||||
DialogSimpleMessageHelper.makeErrorDialog(getActivity(), new SpannableString(errorMessage), null, null).show();
|
DialogSimpleMessageHelper.makeErrorDialog(getActivity(), new SpannableString(errorMessage), null, null).show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||||
|
.setOnScanSuccessfull(mViewModel.onScanSuccessfull)
|
||||||
|
.setOnScanFailed(ex -> UtilityExceptions.defaultException(getActivity(), ex, false)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void groupOrdini(List<OrdineVenditaInevasoDTO> ordini){
|
public void groupOrdini(List<OrdineVenditaInevasoDTO> ordini){
|
||||||
|
|
||||||
groupedOrdiniInevasi = new ArrayList<>();
|
groupedOrdiniInevasi = new ArrayList<>();
|
||||||
|
|
||||||
@ -220,7 +237,7 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IR
|
|||||||
mBinding.venditaMainList.setAdapter(mAdapter);
|
mBinding.venditaMainList.setAdapter(mAdapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refreshRecyclerView() {
|
public void refreshRecyclerView() {
|
||||||
mAdapter.updateItems(groupedOrdiniInevasi);
|
mAdapter.updateItems(groupedOrdiniInevasi);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,6 +259,7 @@ public class MainVenditaFragment extends Fragment implements ITitledFragment, IR
|
|||||||
else mBinding.venditaMainFab.hide();
|
else mBinding.venditaMainFab.hide();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@OnClick(R.id.vendita_main_fab)
|
@OnClick(R.id.vendita_main_fab)
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,10 @@ import it.integry.integrywmsnative.core.REST.consumers.SystemRESTConsumer;
|
|||||||
import it.integry.integrywmsnative.core.REST.model.EsitoType;
|
import it.integry.integrywmsnative.core.REST.model.EsitoType;
|
||||||
import it.integry.integrywmsnative.core.REST.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.REST.model.ServiceRESTResponse;
|
||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.DtbOrdt;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
import it.integry.integrywmsnative.core.utility.UtilityDate;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||||
@ -52,7 +55,7 @@ public class VenditaHelper {
|
|||||||
callback.onLoadSuccess(response.body().getDto());
|
callback.onLoadSuccess(response.body().getDto());
|
||||||
} else {
|
} else {
|
||||||
Log.e("Vendita", response.body().getErrorMessage());
|
Log.e("Vendita", response.body().getErrorMessage());
|
||||||
callback.onLoadFail(new Exception(response.message()));
|
callback.onLoadFail(new Exception(response.body().getErrorMessage()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Log.e("Vendita", response.message());
|
Log.e("Vendita", response.message());
|
||||||
@ -164,9 +167,53 @@ public class VenditaHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void getOrdiniInCommessaCollo(MtbColt testataCollo, RunnableArgs<List<DtbOrdt>> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
OrdiniVenditaRESTConsumerService service = RESTBuilder.getService(OrdiniVenditaRESTConsumerService.class);
|
||||||
|
service.getOrdiniInCommessaCollo(
|
||||||
|
testataCollo.getDataColloS(),
|
||||||
|
testataCollo.getNumCollo(),
|
||||||
|
testataCollo.getSerCollo(),
|
||||||
|
testataCollo.getGestione(),
|
||||||
|
GestioneEnum.VENDITA.getText(),
|
||||||
|
SettingsManager.i().userSession.depo.getCodMdep())
|
||||||
|
.enqueue(new Callback<ServiceRESTResponse<List<DtbOrdt>>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(Call<ServiceRESTResponse<List<DtbOrdt>>> call, Response<ServiceRESTResponse<List<DtbOrdt>>> response) {
|
||||||
|
|
||||||
|
if(response.isSuccessful()) {
|
||||||
|
|
||||||
|
if(response.body() != null) {
|
||||||
|
if(response.body().getEsito() == EsitoType.OK) {
|
||||||
|
onComplete.run(response.body().getDto());
|
||||||
|
} else {
|
||||||
|
Log.e("getOrdiniInCommCollo", response.body().getErrorMessage());
|
||||||
|
onFailed.run(new Exception(response.body().getErrorMessage()));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Log.e("getOrdiniInCommCollo", response.message());
|
||||||
|
onFailed.run(new Exception(response.message()));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Log.e("getOrdiniInCommCollo", "Status " + response.code() + ": " + response.message());
|
||||||
|
onFailed.run(new Exception("Status " + response.code() + ": " + response.message()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(Call<ServiceRESTResponse<List<DtbOrdt>>> call, Throwable t) {
|
||||||
|
Log.e("getOrdiniInCommCollo", t.toString());
|
||||||
|
UtilityLogger.errorMe(new Exception(t));
|
||||||
|
onFailed.run(new Exception(t));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<OrdineVenditaGroupedInevasoDTO> getSelectedOrders(List<OrdineVenditaGroupedInevasoDTO> groupedOrdiniInevasi){
|
public List<OrdineVenditaGroupedInevasoDTO> getSelectedOrders(List<OrdineVenditaGroupedInevasoDTO> groupedOrdiniInevasi){
|
||||||
|
|||||||
@ -50,7 +50,10 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
return new DialogVenditaFiltroAvanzato(context, ordersList, null, onDismiss).currentAlert;
|
return new DialogVenditaFiltroAvanzato(context, ordersList, null, onDismiss).currentAlert;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static AlertDialog make(final Context context, final List<OrdineVenditaInevasoDTO> ordersList, DialogVenditaFiltroAvanzatoViewModel baseViewModel, RunnableArgss<List<OrdineVenditaInevasoDTO>, DialogVenditaFiltroAvanzatoViewModel> onDismiss) {
|
public static AlertDialog make(final Context context,
|
||||||
|
final List<OrdineVenditaInevasoDTO> ordersList,
|
||||||
|
DialogVenditaFiltroAvanzatoViewModel baseViewModel,
|
||||||
|
RunnableArgss<List<OrdineVenditaInevasoDTO>, DialogVenditaFiltroAvanzatoViewModel> onDismiss) {
|
||||||
return new DialogVenditaFiltroAvanzato(context, ordersList, baseViewModel, onDismiss).currentAlert;
|
return new DialogVenditaFiltroAvanzato(context, ordersList, baseViewModel, onDismiss).currentAlert;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -270,7 +273,7 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Stream.of(currentFilteredOrderList).map(x -> x.getTermCons()).distinct().withoutNulls().toList();
|
return Stream.of(currentFilteredOrderList).map(OrdineVenditaInevasoDTO::getTermCons).distinct().withoutNulls().toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getAvailableAutomezzi() {
|
private List<String> getAvailableAutomezzi() {
|
||||||
@ -288,7 +291,7 @@ public class DialogVenditaFiltroAvanzato {
|
|||||||
currentFilteredOrderList = tmpStream.toList();
|
currentFilteredOrderList = tmpStream.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Stream.of(currentFilteredOrderList).map(x -> x.getCodAuto()).distinct().withoutNulls().toList();
|
return Stream.of(currentFilteredOrderList).map(OrdineVenditaInevasoDTO::getCodAuto).distinct().withoutNulls().toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refreshList() {
|
private void refreshList() {
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package it.integry.integrywmsnative.gest.vendita.rest;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import it.integry.integrywmsnative.core.REST.model.ServiceRESTResponse;
|
import it.integry.integrywmsnative.core.REST.model.ServiceRESTResponse;
|
||||||
|
import it.integry.integrywmsnative.core.model.DtbOrdt;
|
||||||
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
|
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
|
||||||
import it.integry.integrywmsnative.gest.vendita.dto.PickingObjectDTO;
|
import it.integry.integrywmsnative.gest.vendita.dto.PickingObjectDTO;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
@ -17,4 +18,7 @@ public interface OrdiniVenditaRESTConsumerService {
|
|||||||
@GET("getPickingListFromOrdini")
|
@GET("getPickingListFromOrdini")
|
||||||
Call<ServiceRESTResponse<List<PickingObjectDTO>>> getPickingList(@Query("codMdep") String codMdep, @Query("dataCons") String dataCons, @Query("chiaviOrdini") String codBarreBacale);
|
Call<ServiceRESTResponse<List<PickingObjectDTO>>> getPickingList(@Query("codMdep") String codMdep, @Query("dataCons") String dataCons, @Query("chiaviOrdini") String codBarreBacale);
|
||||||
|
|
||||||
|
@GET("getOrdiniInCommCollo")
|
||||||
|
Call<ServiceRESTResponse<List<DtbOrdt>>> getOrdiniInCommessaCollo(@Query("dataCollo") String dataCollo, @Query("numCollo") Integer numCollo, @Query("serCollo") String serCollo, @Query("gestioneCollo") String gestioneCollo, @Query("gestioneOrdine") String gestioneOrdine, @Query("codMdep") String codMdep);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,189 @@
|
|||||||
|
package it.integry.integrywmsnative.gest.vendita.viewmodel;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.app.ProgressDialog;
|
||||||
|
import android.text.Html;
|
||||||
|
import android.text.SpannableString;
|
||||||
|
|
||||||
|
import com.annimon.stream.Collectors;
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.REST.consumers.BarcodeRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.REST.consumers.ColliMagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.DtbOrdt;
|
||||||
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityPosizione;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
||||||
|
import it.integry.integrywmsnative.databinding.FragmentMainVenditaBinding;
|
||||||
|
import it.integry.integrywmsnative.gest.vendita.MainVenditaFragment;
|
||||||
|
import it.integry.integrywmsnative.gest.vendita.core.VenditaHelper;
|
||||||
|
import it.integry.integrywmsnative.gest.vendita.dialogs.DialogVenditaFiltroAvanzatoViewModel;
|
||||||
|
import it.integry.integrywmsnative.gest.vendita.dto.OrdineVenditaInevasoDTO;
|
||||||
|
import it.integry.integrywmsnative.gest.vendita.dto.PickingObjectDTO;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.DialogSimpleMessageHelper;
|
||||||
|
import it.integry.plugins.barcode_base_library.model.BarcodeScanDTO;
|
||||||
|
|
||||||
|
public class VenditaViewModel {
|
||||||
|
|
||||||
|
private Activity mContext;
|
||||||
|
private MainVenditaFragment mFragment;
|
||||||
|
private FragmentMainVenditaBinding mBinding;
|
||||||
|
private VenditaHelper mHelper;
|
||||||
|
|
||||||
|
private List<OrdineVenditaInevasoDTO> mOrdini = new ArrayList<>();
|
||||||
|
|
||||||
|
public VenditaViewModel(Activity context, MainVenditaFragment fragment, FragmentMainVenditaBinding binding, VenditaHelper helper) {
|
||||||
|
mContext = context;
|
||||||
|
mFragment = fragment;
|
||||||
|
mBinding = binding;
|
||||||
|
mHelper = helper;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setListOrder(List<OrdineVenditaInevasoDTO> ordini) {
|
||||||
|
mOrdini = ordini;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public RunnableArgs<BarcodeScanDTO> onScanSuccessfull = data -> {
|
||||||
|
|
||||||
|
BarcodeManager.disable();
|
||||||
|
final ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
|
|
||||||
|
if(UtilityBarcode.isEtichetta128(data)){
|
||||||
|
this.executeEtichettaEan128(data, progressDialog);
|
||||||
|
} else {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void executeEtichettaEan128(BarcodeScanDTO barcodeScanDTO, ProgressDialog progressDialog) {
|
||||||
|
BarcodeRESTConsumer.decodeEan128(barcodeScanDTO, ean128Model -> {
|
||||||
|
|
||||||
|
String barcodeProd = null;
|
||||||
|
|
||||||
|
if(!UtilityString.isNullOrEmpty(ean128Model.Sscc)) barcodeProd = ean128Model.Sscc;
|
||||||
|
if(!UtilityString.isNullOrEmpty(ean128Model.Gtin)) barcodeProd = ean128Model.Gtin;
|
||||||
|
if(!UtilityString.isNullOrEmpty(ean128Model.Content)) barcodeProd = ean128Model.Content;
|
||||||
|
|
||||||
|
|
||||||
|
if(!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||||
|
|
||||||
|
if(!UtilityString.isNullOrEmpty(ean128Model.Sscc)){
|
||||||
|
this.executeEtichettaLU(ean128Model.Sscc, progressDialog);
|
||||||
|
} else {
|
||||||
|
showNoULFound();
|
||||||
|
progressDialog.dismiss();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
//EAN 128 non completo o comunque mancano i riferimenti al prodotto
|
||||||
|
showNoULFound();
|
||||||
|
progressDialog.dismiss();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
}
|
||||||
|
}, ex-> {
|
||||||
|
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||||
|
BarcodeManager.enable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void executeEtichettaLU(String SSCC, ProgressDialog progressDialog) {
|
||||||
|
ColliMagazzinoRESTConsumer.getBySSCC(SSCC, true, false, mtbColt -> {
|
||||||
|
|
||||||
|
if(mtbColt != null && mtbColt.getMtbColr() != null && mtbColt.getMtbColr().size() > 0) {
|
||||||
|
|
||||||
|
if(mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO) {
|
||||||
|
//GET BY COMMESSA COLLO
|
||||||
|
mHelper.getOrdiniInCommessaCollo(mtbColt, orderList -> {
|
||||||
|
|
||||||
|
if(orderList != null && orderList.size() > 0) {
|
||||||
|
UtilityToast.showToast("Caricati " + orderList.size() + " ordini");
|
||||||
|
|
||||||
|
List<Integer> numOrds = Stream.of(orderList)
|
||||||
|
.map(DtbOrdt::getNumOrd)
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
List<OrdineVenditaInevasoDTO> filteredOrders = Stream.of(mOrdini)
|
||||||
|
.filter(x -> numOrds.contains(x.getNumOrd())).toList();
|
||||||
|
|
||||||
|
mFragment.groupOrdini(filteredOrders);
|
||||||
|
mFragment.refreshRecyclerView();
|
||||||
|
} else {
|
||||||
|
showNoOrderFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
progressDialog.dismiss();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}, ex -> {
|
||||||
|
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||||
|
BarcodeManager.enable();
|
||||||
|
});
|
||||||
|
|
||||||
|
progressDialog.dismiss();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
showWrongGestioneUL();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
showNoULFound();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}, ex -> {
|
||||||
|
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||||
|
BarcodeManager.enable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void showNoOrderFound() {
|
||||||
|
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||||
|
new SpannableString(mContext.getResources().getText(R.string.no_orders_found_message)),
|
||||||
|
null, null).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void showNoULFound() {
|
||||||
|
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||||
|
new SpannableString(mContext.getResources().getText(R.string.no_lu_found_message)),
|
||||||
|
null, null).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void showWrongGestioneUL() {
|
||||||
|
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||||
|
new SpannableString(Html.fromHtml(mContext.getResources().getText(R.string.gestione_V_not_accepted_message).toString())),
|
||||||
|
null, null).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -274,7 +274,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
//invece se esiste apro un collo nuovo e cerco gli articoli presenti nell'ul
|
//invece se esiste apro un collo nuovo e cerco gli articoli presenti nell'ul
|
||||||
//dell'etichetta anonima
|
//dell'etichetta anonima
|
||||||
this.executeEtichettaAnonimaNotOpenedLU(data, progressDialog);
|
this.executeEtichettaAnonimaNotOpenedLU(data, progressDialog);
|
||||||
} else if(data.getType() == BarcodeType.EAN128) {
|
} else if(UtilityBarcode.isEtichetta128(data)) {
|
||||||
|
|
||||||
//Creo una nuova ul e cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
//Creo una nuova ul e cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
||||||
this.createNewUL(null, null, progressDialog, false, false, () -> {
|
this.createNewUL(null, null, progressDialog, false, false, () -> {
|
||||||
@ -289,7 +289,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
if(UtilityBarcode.isEtichettaAnonima(data)){
|
if(UtilityBarcode.isEtichettaAnonima(data)){
|
||||||
//Cerco gli articoli presenti nell'ul dell'etichetta anonima
|
//Cerco gli articoli presenti nell'ul dell'etichetta anonima
|
||||||
this.executeEtichettaLU(data.getStringValue(), progressDialog);
|
this.executeEtichettaLU(data.getStringValue(), progressDialog);
|
||||||
} else if(data.getType() == BarcodeType.EAN128) {
|
} else if(UtilityBarcode.isEtichetta128(data)) {
|
||||||
|
|
||||||
//Cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
//Cerco tramite etichetta ean 128 (che può indicarmi un articolo o una UL)
|
||||||
this.executeEtichettaEan128(data, progressDialog);
|
this.executeEtichettaEan128(data, progressDialog);
|
||||||
@ -305,7 +305,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
|
|
||||||
if(mtbColt == null) {
|
if(mtbColt == null) {
|
||||||
this.createNewUL(
|
this.createNewUL(
|
||||||
UtilityBarcode.getNumColloFromULAnonima(barcodeScanDTO),
|
UtilityBarcode.getNumColloFromULAnonima(barcodeScanDTO.getStringValue()),
|
||||||
CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE, progressDialog,
|
CommonConst.Config.DEFAULT_ANONYMOUS_UL_SERIE, progressDialog,
|
||||||
true, true,
|
true, true,
|
||||||
null);
|
null);
|
||||||
@ -556,7 +556,7 @@ public class VenditaOrdineInevasoViewModel implements IOnColloClosedCallback, IO
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
applyFilter("COD: ");
|
applyFilter("");
|
||||||
refreshOrderBy(false);
|
refreshOrderBy(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,13 +46,17 @@ public class VersamentoMerceFragment extends Fragment implements ITitledFragment
|
|||||||
//mParam1 = getArguments().getString(ARG_PARAM1);
|
//mParam1 = getArguments().getString(ARG_PARAM1);
|
||||||
//mParam2 = getArguments().getString(ARG_PARAM2);
|
//mParam2 = getArguments().getString(ARG_PARAM2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mVersamentoMerceViewModel = new VersamentoMerceViewModel();
|
||||||
|
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||||
|
.setOnScanSuccessfull(mVersamentoMerceViewModel.onScanSuccessfull)
|
||||||
|
.setOnScanFailed(ex -> UtilityExceptions.defaultException(getActivity(), ex, false)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_main_versamento_merce, container, false);
|
mBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_main_versamento_merce, container, false);
|
||||||
mVersamentoMerceViewModel = new VersamentoMerceViewModel();
|
|
||||||
|
|
||||||
mBinding.setView(this);
|
mBinding.setView(this);
|
||||||
mBinding.setViewmodel(mVersamentoMerceViewModel);
|
mBinding.setViewmodel(mVersamentoMerceViewModel);
|
||||||
@ -65,42 +69,17 @@ public class VersamentoMerceFragment extends Fragment implements ITitledFragment
|
|||||||
mHelper = new VersamentoMerceHelper(getActivity());
|
mHelper = new VersamentoMerceHelper(getActivity());
|
||||||
mVersamentoMerceViewModel.init(getActivity(), mBinding, mHelper);
|
mVersamentoMerceViewModel.init(getActivity(), mBinding, mHelper);
|
||||||
|
|
||||||
barcodeScannerIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
|
||||||
.setOnScanSuccessfull(mVersamentoMerceViewModel.onScanSuccessfull)
|
|
||||||
.setOnScanFailed(ex -> UtilityExceptions.defaultException(getActivity(), ex, false)));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
mHelper.loadListaFornitori(listaFornitori -> {
|
|
||||||
mRettificaGiacenzeViewModel.setupSearchFornitori(listaFornitori);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
mBinding.autoCompleteFornitori.setOnFocusChangeListener((v, hasFocus) -> {
|
|
||||||
setUIToForn();
|
|
||||||
});
|
|
||||||
mBinding.inputCodArtDescrForn.setOnFocusChangeListener((v, hasFocus) -> {
|
|
||||||
setUIToForn();
|
|
||||||
});
|
|
||||||
|
|
||||||
mBinding.inputCodArtDescrInt.setOnFocusChangeListener((v, hasFocus) -> {
|
|
||||||
setUIToIntArt();
|
|
||||||
});
|
|
||||||
|
|
||||||
*/
|
|
||||||
mVersamentoMerceViewModel.openLU();
|
mVersamentoMerceViewModel.openLU();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAttach(Context context) {
|
public void onDestroy() {
|
||||||
super.onAttach(context);
|
BarcodeManager.removeCallback(barcodeScannerIstanceID);
|
||||||
}
|
super.onDestroy();
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDetach() {
|
|
||||||
super.onDetach();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -3,7 +3,9 @@ package it.integry.integrywmsnative.gest.versamento_merce.viewmodel;
|
|||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.databinding.ObservableArrayList;
|
||||||
import android.databinding.ObservableField;
|
import android.databinding.ObservableField;
|
||||||
|
import android.text.Html;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
|
|
||||||
import com.annimon.stream.Stream;
|
import com.annimon.stream.Stream;
|
||||||
@ -27,15 +29,18 @@ import it.integry.integrywmsnative.core.model.MtbAart;
|
|||||||
import it.integry.integrywmsnative.core.model.MtbColr;
|
import it.integry.integrywmsnative.core.model.MtbColr;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
import it.integry.integrywmsnative.core.utility.UtilityLogger;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityPosizione;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityString;
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
||||||
import it.integry.integrywmsnative.databinding.FragmentMainVersamentoMerceBinding;
|
import it.integry.integrywmsnative.databinding.FragmentMainVersamentoMerceBinding;
|
||||||
import it.integry.integrywmsnative.gest.versamento_merce.core.VersamentoMerceHelper;
|
import it.integry.integrywmsnative.gest.versamento_merce.core.VersamentoMerceHelper;
|
||||||
|
import it.integry.integrywmsnative.view.dialogs.DialogAskLivelloPosizione;
|
||||||
import it.integry.integrywmsnative.view.dialogs.DialogSimpleMessageHelper;
|
import it.integry.integrywmsnative.view.dialogs.DialogSimpleMessageHelper;
|
||||||
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArts;
|
import it.integry.integrywmsnative.view.dialogs.choose_arts_from_lista_arts.DialogChooseArtsFromListaArts;
|
||||||
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
import it.integry.integrywmsnative.view.dialogs.input_quantity.DialogInputQuantity;
|
||||||
@ -63,8 +68,12 @@ public class VersamentoMerceViewModel {
|
|||||||
DialogScanOrCreateLU.make(mContext, true, mtbColt -> {
|
DialogScanOrCreateLU.make(mContext, true, mtbColt -> {
|
||||||
if(mtbColt == null) {
|
if(mtbColt == null) {
|
||||||
((MainActivity)mContext).popToMain();
|
((MainActivity)mContext).popToMain();
|
||||||
} else {
|
} else if((mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO || mtbColt.getGestioneEnum() == GestioneEnum.LAVORAZIONE) && mtbColt.getSegno().equals(+1)){
|
||||||
setMtbColt(mtbColt);
|
setMtbColt(mtbColt);
|
||||||
|
} else {
|
||||||
|
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||||
|
new SpannableString(Html.fromHtml("Sono accettate solamente UL di <b>Acquisto</b> o <b>Lavorazione</b> di <b>CARICO</b>")),
|
||||||
|
null, this::openLU).show();
|
||||||
}
|
}
|
||||||
}).show();
|
}).show();
|
||||||
}
|
}
|
||||||
@ -75,6 +84,7 @@ public class VersamentoMerceViewModel {
|
|||||||
|
|
||||||
public void resetMtbColt() {
|
public void resetMtbColt() {
|
||||||
this.mtbColt.set(null);
|
this.mtbColt.set(null);
|
||||||
|
openLU();
|
||||||
}
|
}
|
||||||
|
|
||||||
public RunnableArgs<BarcodeScanDTO> onScanSuccessfull = data -> {
|
public RunnableArgs<BarcodeScanDTO> onScanSuccessfull = data -> {
|
||||||
@ -88,7 +98,9 @@ public class VersamentoMerceViewModel {
|
|||||||
this.executeEtichettaPosizione(data, progressDialog);
|
this.executeEtichettaPosizione(data, progressDialog);
|
||||||
} else if(data.getType() == BarcodeType.EAN8 || data.getType() == BarcodeType.EAN13 || data.getType() == BarcodeType.UPCA){
|
} else if(data.getType() == BarcodeType.EAN8 || data.getType() == BarcodeType.EAN13 || data.getType() == BarcodeType.UPCA){
|
||||||
//searchArtInt(data.getStringValue());
|
//searchArtInt(data.getStringValue());
|
||||||
} else if(data.getType() == BarcodeType.EAN128) {
|
} else if(UtilityBarcode.isEtichettaAnonima(data)) {
|
||||||
|
this.executeEtichettaLU(data.getStringValue(), true, progressDialog);
|
||||||
|
}else if(UtilityBarcode.isEtichetta128(data)) {
|
||||||
this.executeEtichettaEan128(data, progressDialog);
|
this.executeEtichettaEan128(data, progressDialog);
|
||||||
} else {
|
} else {
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
@ -127,17 +139,7 @@ public class VersamentoMerceViewModel {
|
|||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
updatePosizione(foundPosizione, UtilityPosizione.isPosizioneWithLivello(foundPosizione), progressDialog);
|
||||||
ColliMagazzinoRESTConsumer.changePosizione(mtbColt.get(), foundPosizione, () -> {
|
|
||||||
progressDialog.dismiss();
|
|
||||||
BarcodeManager.enable();
|
|
||||||
|
|
||||||
resetMtbColt();
|
|
||||||
}, ex -> {
|
|
||||||
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
|
||||||
BarcodeManager.enable();
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +156,7 @@ public class VersamentoMerceViewModel {
|
|||||||
if(!UtilityString.isNullOrEmpty(barcodeProd)) {
|
if(!UtilityString.isNullOrEmpty(barcodeProd)) {
|
||||||
|
|
||||||
if(!UtilityString.isNullOrEmpty(ean128Model.Sscc)){
|
if(!UtilityString.isNullOrEmpty(ean128Model.Sscc)){
|
||||||
this.executeEtichettaLU(ean128Model.Sscc, progressDialog);
|
this.executeEtichettaLU(ean128Model.Sscc, false, progressDialog);
|
||||||
} else {
|
} else {
|
||||||
showNoULFound();
|
showNoULFound();
|
||||||
progressDialog.dismiss();
|
progressDialog.dismiss();
|
||||||
@ -176,11 +178,33 @@ public class VersamentoMerceViewModel {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void executeEtichettaLU(String sscc, ProgressDialog progressDialog) {
|
private void executeEtichettaLU(String sscc, boolean isAnonima, ProgressDialog progressDialog) {
|
||||||
ColliMagazzinoRESTConsumer.getBySSCC(sscc, true, false, mtbColt -> {
|
ColliMagazzinoRESTConsumer.getBySSCC(sscc, true, false, mtbColt -> {
|
||||||
|
|
||||||
//TAKE HERE
|
if(mtbColt == null && !isAnonima) {
|
||||||
|
showNoULFound();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
progressDialog.dismiss();
|
||||||
|
} else if(mtbColt != null && (mtbColt.getGestioneEnum() == GestioneEnum.ACQUISTO || mtbColt.getGestioneEnum() == GestioneEnum.VENDITA)) {
|
||||||
|
showWrongGestioneUL();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
progressDialog.dismiss();
|
||||||
|
} else {
|
||||||
|
if(mtbColt == null && isAnonima) {
|
||||||
|
ColliMagazzinoRESTConsumer.createColloFromEtichettaAnonima(sscc, GestioneEnum.LAVORAZIONE, mtbColtAnonimo -> {
|
||||||
|
pickMerceULtoUL(mtbColtAnonimo, progressDialog);
|
||||||
|
}, ex -> {
|
||||||
|
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||||
|
BarcodeManager.enable();
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
pickMerceULtoUL(mtbColt, progressDialog);
|
pickMerceULtoUL(mtbColt, progressDialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}, ex -> {
|
}, ex -> {
|
||||||
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||||
@ -188,7 +212,38 @@ public class VersamentoMerceViewModel {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updatePosizione(MtbDepoPosizione mtbDepoPosizione, boolean shouldAskLivello, ProgressDialog progressDialog) {
|
||||||
|
|
||||||
|
if(shouldAskLivello) {
|
||||||
|
DialogAskLivelloPosizione.make(mContext, livello -> {
|
||||||
|
|
||||||
|
if(livello == null) {
|
||||||
|
updatePosizione(mtbDepoPosizione, shouldAskLivello, progressDialog);
|
||||||
|
} else {
|
||||||
|
String newPosizione = mtbDepoPosizione.getPosizione().substring(0, mtbDepoPosizione.getPosizione().length()-1);
|
||||||
|
newPosizione += livello;
|
||||||
|
mtbDepoPosizione.setPosizione(newPosizione);
|
||||||
|
|
||||||
|
updatePosizione(mtbDepoPosizione, false, progressDialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
}, ex -> {
|
||||||
|
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||||
|
BarcodeManager.enable();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
ColliMagazzinoRESTConsumer.changePosizione(mtbColt.get(), mtbDepoPosizione, () -> {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
BarcodeManager.enable();
|
||||||
|
|
||||||
|
resetMtbColt();
|
||||||
|
}, ex -> {
|
||||||
|
UtilityExceptions.defaultException(mContext, ex, progressDialog);
|
||||||
|
BarcodeManager.enable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void pickMerceULtoUL(MtbColt destMtbColt, ProgressDialog progressDialog) {
|
private void pickMerceULtoUL(MtbColt destMtbColt, ProgressDialog progressDialog) {
|
||||||
@ -199,14 +254,42 @@ public class VersamentoMerceViewModel {
|
|||||||
DialogChooseArtsFromListaArts.make(mContext, mtbColrsToPick, pickedAarts -> {
|
DialogChooseArtsFromListaArts.make(mContext, mtbColrsToPick, pickedAarts -> {
|
||||||
|
|
||||||
progressDialog.dismiss();
|
progressDialog.dismiss();
|
||||||
UtilityToast.showToast("Selezionati " + pickedAarts.size() + " articoli");
|
|
||||||
|
|
||||||
List<MtbColr> destNewMtbColr = new ArrayList<>();
|
List<MtbColr> destNewMtbColr = new ArrayList<>();
|
||||||
|
|
||||||
askQuantities(pickedAarts.iterator(), destNewMtbColr, () -> {
|
askQuantities(pickedAarts.iterator(), destNewMtbColr, () -> {
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
|
|
||||||
UtilityToast.showToast("Create " + destNewMtbColr.size() + " nuove righe");
|
if(destNewMtbColr != null && destNewMtbColr.size() > 0){
|
||||||
|
MtbColt clonedTestata = (MtbColt) destMtbColt.clone();
|
||||||
|
ObservableArrayList<MtbColr> mtbColrObservableField = new ObservableArrayList<>();
|
||||||
|
|
||||||
|
for(int i = 0; i < destNewMtbColr.size(); i++) {
|
||||||
|
MtbColr cloneMtbColr = (MtbColr) destNewMtbColr.get(i).clone();
|
||||||
|
|
||||||
|
cloneMtbColr
|
||||||
|
.setGestioneRif(cloneMtbColr.getGestione())
|
||||||
|
.setGestione(null);
|
||||||
|
|
||||||
|
cloneMtbColr
|
||||||
|
.setSerColloRif(cloneMtbColr.getSerCollo())
|
||||||
|
.setSerCollo(null);
|
||||||
|
|
||||||
|
cloneMtbColr
|
||||||
|
.setNumColloRif(cloneMtbColr.getNumCollo())
|
||||||
|
.setNumCollo(null);
|
||||||
|
|
||||||
|
cloneMtbColr
|
||||||
|
.setDataColloRif(cloneMtbColr.getDataColloS())
|
||||||
|
.setDataCollo(null);
|
||||||
|
|
||||||
|
mtbColrObservableField.add(cloneMtbColr);
|
||||||
|
}
|
||||||
|
|
||||||
|
clonedTestata.setMtbColr(mtbColrObservableField);
|
||||||
|
|
||||||
|
saveLU(clonedTestata);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -222,6 +305,8 @@ public class VersamentoMerceViewModel {
|
|||||||
if(sourceMtbColrs.hasNext()){
|
if(sourceMtbColrs.hasNext()){
|
||||||
|
|
||||||
askSingleQuantity(sourceMtbColrs.next(), mtbColr -> {
|
askSingleQuantity(sourceMtbColrs.next(), mtbColr -> {
|
||||||
|
|
||||||
|
|
||||||
destMtbColr.add(mtbColr);
|
destMtbColr.add(mtbColr);
|
||||||
askQuantities(sourceMtbColrs, destMtbColr, onComplete);
|
askQuantities(sourceMtbColrs, destMtbColr, onComplete);
|
||||||
});
|
});
|
||||||
@ -255,4 +340,48 @@ public class VersamentoMerceViewModel {
|
|||||||
new SpannableString(mContext.getResources().getText(R.string.no_lu_found_message)),
|
new SpannableString(mContext.getResources().getText(R.string.no_lu_found_message)),
|
||||||
null, null).show();
|
null, null).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void showWrongGestioneUL() {
|
||||||
|
DialogSimpleMessageHelper.makeWarningDialog(mContext,
|
||||||
|
new SpannableString(Html.fromHtml(mContext.getResources().getText(R.string.gestione_A_V_not_accepted_message).toString())),
|
||||||
|
null, null).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* private void createNewLU(RunnableArgs<MtbColt> onComplete ,RunnableArgs<Exception> onFailed) {
|
||||||
|
ColliMagazzinoRESTConsumer.createColloLavorazione(+1, onComplete, onFailed);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
private void saveLU(MtbColt mtbColt) {
|
||||||
|
mtbColt.setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||||
|
|
||||||
|
for(int i = 0; i < mtbColt.getMtbColr().size(); i++) {
|
||||||
|
mtbColt.getMtbColr().get(i).setOperation(CommonModelConsts.OPERATION.INSERT_OR_UPDATE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ColliMagazzinoRESTConsumer.saveCollo(mtbColt, value -> {
|
||||||
|
resetMtbColt();
|
||||||
|
}, ex -> {
|
||||||
|
UtilityExceptions.defaultException(mContext, ex);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void showDataSavedDialog() {
|
||||||
|
|
||||||
|
DialogSimpleMessageHelper.makeSuccessDialog(
|
||||||
|
mContext,
|
||||||
|
mContext.getResources().getString(R.string.completed),
|
||||||
|
new SpannableString(mContext.getResources().getString(R.string.data_saved)),
|
||||||
|
null, () -> {
|
||||||
|
resetMtbColt();
|
||||||
|
openLU();
|
||||||
|
}).show();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,28 @@
|
|||||||
|
package it.integry.integrywmsnative.ui;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.support.v4.view.ViewPager;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
|
||||||
|
public class DeactivatableViewPager extends ViewPager {
|
||||||
|
|
||||||
|
|
||||||
|
public DeactivatableViewPager(Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DeactivatableViewPager(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onTouchEvent(MotionEvent event) {
|
||||||
|
return !isEnabled() || super.onTouchEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onInterceptTouchEvent(MotionEvent event) {
|
||||||
|
return isEnabled() && super.onInterceptTouchEvent(event);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
package it.integry.integrywmsnative.view;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.support.v4.view.ViewPager;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
public class WrapContentHeightViewPager extends ViewPager {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param context the context
|
||||||
|
*/
|
||||||
|
public WrapContentHeightViewPager(Context context) {
|
||||||
|
super(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param context the context
|
||||||
|
* @param attrs the attribute set
|
||||||
|
*/
|
||||||
|
public WrapContentHeightViewPager(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||||
|
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||||
|
|
||||||
|
// find the first child view
|
||||||
|
View view = getChildAt(0);
|
||||||
|
if (view != null) {
|
||||||
|
// measure the first child view with the specified measure spec
|
||||||
|
view.measure(widthMeasureSpec, heightMeasureSpec);
|
||||||
|
}
|
||||||
|
|
||||||
|
setMeasuredDimension(getMeasuredWidth(), measureHeight(heightMeasureSpec, view));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines the height of this view
|
||||||
|
*
|
||||||
|
* @param measureSpec A measureSpec packed into an int
|
||||||
|
* @param view the base view with already measured height
|
||||||
|
*
|
||||||
|
* @return The height of the view, honoring constraints from measureSpec
|
||||||
|
*/
|
||||||
|
private int measureHeight(int measureSpec, View view) {
|
||||||
|
int result = 0;
|
||||||
|
int specMode = MeasureSpec.getMode(measureSpec);
|
||||||
|
int specSize = MeasureSpec.getSize(measureSpec);
|
||||||
|
|
||||||
|
if (specMode == MeasureSpec.EXACTLY) {
|
||||||
|
result = specSize;
|
||||||
|
} else {
|
||||||
|
// set the height from the base view if available
|
||||||
|
if (view != null) {
|
||||||
|
result = view.getMeasuredHeight();
|
||||||
|
}
|
||||||
|
if (specMode == MeasureSpec.AT_MOST) {
|
||||||
|
result = Math.min(result, specSize);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.text.InputType;
|
||||||
|
import android.widget.EditText;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityString;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityToast;
|
||||||
|
|
||||||
|
public class DialogAskLivelloPosizione {
|
||||||
|
|
||||||
|
|
||||||
|
public static void make(Context context, RunnableArgs<Integer> onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
final EditText livelloEditText = new EditText(context);
|
||||||
|
livelloEditText.setInputType(InputType.TYPE_CLASS_NUMBER);
|
||||||
|
|
||||||
|
AlertDialog dialog = new AlertDialog.Builder(context)
|
||||||
|
.setTitle("Livello")
|
||||||
|
.setMessage("In che livello vuoi posizionare?")
|
||||||
|
.setView(livelloEditText)
|
||||||
|
.setPositiveButton("OK", (dialog1, which) -> {
|
||||||
|
String livello = String.valueOf(livelloEditText.getText());
|
||||||
|
if(UtilityString.isNullOrEmpty(livello)) {
|
||||||
|
UtilityToast.showToast("Inserisci un LIVELLO valido");
|
||||||
|
onComplete.run(null);
|
||||||
|
} else {
|
||||||
|
try{
|
||||||
|
Integer livelloInt = Integer.parseInt(livello);
|
||||||
|
onComplete.run(livelloInt);
|
||||||
|
} catch (NumberFormatException nfe) {
|
||||||
|
UtilityToast.showToast("Inserisci un LIVELLO valido");
|
||||||
|
onComplete.run(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
.setNegativeButton("Annulla", null)
|
||||||
|
.create();
|
||||||
|
dialog.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,147 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.ask_position_of_lu;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
|
import android.app.ProgressDialog;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.databinding.DataBindingUtil;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
|
import android.support.annotation.LayoutRes;
|
||||||
|
import android.support.v7.app.AlertDialog;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.view.Window;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
|
import com.annimon.stream.Stream;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import it.integry.integrywmsnative.R;
|
||||||
|
import it.integry.integrywmsnative.core.REST.consumers.ColliMagazzinoRESTConsumer;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeCallbackDTO;
|
||||||
|
import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
||||||
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityPosizione;
|
||||||
|
import it.integry.integrywmsnative.core.utility.UtilityProgress;
|
||||||
|
import it.integry.integrywmsnative.databinding.DialogAskPositionOfLuBinding;
|
||||||
|
import it.integry.plugins.barcode_base_library.model.BarcodeScanDTO;
|
||||||
|
|
||||||
|
public class DialogAskPositionOfLU {
|
||||||
|
|
||||||
|
|
||||||
|
private Context mContext;
|
||||||
|
private DialogAskPositionOfLuBinding mBinding;
|
||||||
|
private MtbColt mtbColt;
|
||||||
|
|
||||||
|
private Dialog mDialog;
|
||||||
|
|
||||||
|
private Runnable onComplete;
|
||||||
|
private RunnableArgs<Exception> onFailed;
|
||||||
|
|
||||||
|
public static Dialog makeBase(final Context context, MtbColt mtbColtToUpdate, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
return new DialogAskPositionOfLU(context, mtbColtToUpdate, onComplete, onFailed).mDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DialogAskPositionOfLU(Context context, MtbColt mtbColtToUpdate, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
mContext = context;
|
||||||
|
mtbColt = mtbColtToUpdate;
|
||||||
|
|
||||||
|
this.onComplete = onComplete;
|
||||||
|
this.onFailed = onFailed;
|
||||||
|
|
||||||
|
LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );
|
||||||
|
mBinding = DataBindingUtil.inflate(inflater, R.layout.dialog_ask_position_of_lu, null, false);
|
||||||
|
mBinding.setMContext(mContext);
|
||||||
|
|
||||||
|
List<Integer> views = new ArrayList<>();
|
||||||
|
views.add(R.layout.dialog_ask_position_of_lu__page1);
|
||||||
|
views.add(R.layout.dialog_ask_position_of_lu__page2);
|
||||||
|
|
||||||
|
DialogAskPositionOfLUAdapter myadapter = new DialogAskPositionOfLUAdapter(mContext, views);
|
||||||
|
mBinding.viewpager.setAdapter(myadapter);
|
||||||
|
mBinding.viewpager.beginFakeDrag();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
mDialog = new Dialog(mContext);
|
||||||
|
mDialog.setContentView(mBinding.getRoot());
|
||||||
|
mDialog.setCanceledOnTouchOutside(false);
|
||||||
|
|
||||||
|
setupBarcode();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void askLivello() {
|
||||||
|
mBinding.viewpager.setCurrentItem(1, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isOnLivelloPage() {
|
||||||
|
return mBinding.viewpager.getCurrentItem() == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupBarcode() {
|
||||||
|
|
||||||
|
int barcodeIstanceID = BarcodeManager.addCallback(new BarcodeCallbackDTO()
|
||||||
|
.setOnScanSuccessfull(onScanSuccessfull)
|
||||||
|
.setOnScanFailed(ex -> UtilityExceptions.defaultException(mContext, ex, false)));
|
||||||
|
|
||||||
|
mDialog.setOnDismissListener(dialog -> {
|
||||||
|
BarcodeManager.removeCallback(barcodeIstanceID);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private RunnableArgs<BarcodeScanDTO> onScanSuccessfull = data -> {
|
||||||
|
|
||||||
|
BarcodeManager.disable();
|
||||||
|
|
||||||
|
if(!isOnLivelloPage()) {
|
||||||
|
|
||||||
|
if (UtilityBarcode.isEtichettaPosizione(data)) {
|
||||||
|
|
||||||
|
MtbDepoPosizione foundPosizione = Stream.of(SettingsManager.iDB().getAvailablePosizioni())
|
||||||
|
.filter(x -> x.getPosizione().equalsIgnoreCase(data.getStringValue()))
|
||||||
|
.single();
|
||||||
|
|
||||||
|
|
||||||
|
if (UtilityPosizione.isPosizioneWithLivello(foundPosizione)) {
|
||||||
|
askLivello();
|
||||||
|
} else {
|
||||||
|
updatePosizione(foundPosizione, () -> {
|
||||||
|
if(onComplete != null) onComplete.run();
|
||||||
|
}, onFailed);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
BarcodeManager.enable();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
private void updatePosizione(MtbDepoPosizione mtbDepoPosizione, Runnable onComplete, RunnableArgs<Exception> onFailed) {
|
||||||
|
|
||||||
|
final ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(mContext);
|
||||||
|
|
||||||
|
ColliMagazzinoRESTConsumer.changePosizione(mtbColt, mtbDepoPosizione, () -> {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
onComplete.run();
|
||||||
|
}, ex -> {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
onFailed.run(ex);
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
package it.integry.integrywmsnative.view.dialogs.ask_position_of_lu;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.support.annotation.NonNull;
|
||||||
|
import android.support.v4.view.PagerAdapter;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class DialogAskPositionOfLUAdapter extends PagerAdapter {
|
||||||
|
private Context mContext;
|
||||||
|
|
||||||
|
private List<Integer> mDatasetLayout;
|
||||||
|
|
||||||
|
public DialogAskPositionOfLUAdapter(Context context, List<Integer> datasetView) {
|
||||||
|
this.mContext = context;
|
||||||
|
this.mDatasetLayout = datasetView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCount() {
|
||||||
|
return mDatasetLayout.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View instantiateItem(ViewGroup container, int position) {
|
||||||
|
LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(mContext.LAYOUT_INFLATER_SERVICE);
|
||||||
|
View view = inflater.inflate(mDatasetLayout.get(position), container, false);
|
||||||
|
|
||||||
|
container.addView(view);
|
||||||
|
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroyItem(ViewGroup container, int position, Object object) {
|
||||||
|
container.removeView((LinearLayout)object);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isViewFromObject(@NonNull View view, @NonNull Object o) {
|
||||||
|
return view == o;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -392,7 +392,7 @@ public class DialogInputQuantity {
|
|||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if(data.getType() == BarcodeType.EAN128){
|
} else if(UtilityBarcode.isEtichetta128(data)){
|
||||||
final ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(currentContext);
|
final ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(currentContext);
|
||||||
|
|
||||||
BarcodeRESTConsumer.decodeEan128(data, ean128Model -> {
|
BarcodeRESTConsumer.decodeEan128(data, ean128Model -> {
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import it.integry.integrywmsnative.core.barcode_reader.BarcodeManager;
|
|||||||
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
import it.integry.integrywmsnative.core.expansion.RunnableArgs;
|
||||||
import it.integry.integrywmsnative.core.model.MtbColt;
|
import it.integry.integrywmsnative.core.model.MtbColt;
|
||||||
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
import it.integry.integrywmsnative.core.model.MtbDepoPosizione;
|
||||||
|
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
|
||||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
import it.integry.integrywmsnative.core.utility.UtilityBarcode;
|
||||||
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
import it.integry.integrywmsnative.core.utility.UtilityExceptions;
|
||||||
@ -83,9 +84,8 @@ public class DialogScanOrCreateLU {
|
|||||||
|
|
||||||
mBinding.createNewLuButton.setOnClickListener(v -> {
|
mBinding.createNewLuButton.setOnClickListener(v -> {
|
||||||
final ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(currentContext);
|
final ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(currentContext);
|
||||||
progressDialog.show();
|
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumer.createColloLavorazione(createdMtbColt -> {
|
ColliMagazzinoRESTConsumer.createColloLavorazione(+1, createdMtbColt -> {
|
||||||
sendMtbColt(createdMtbColt, progressDialog);
|
sendMtbColt(createdMtbColt, progressDialog);
|
||||||
}, ex -> {
|
}, ex -> {
|
||||||
UtilityExceptions.defaultException(currentContext, ex, progressDialog);
|
UtilityExceptions.defaultException(currentContext, ex, progressDialog);
|
||||||
@ -114,13 +114,12 @@ public class DialogScanOrCreateLU {
|
|||||||
BarcodeManager.disable();
|
BarcodeManager.disable();
|
||||||
|
|
||||||
final ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(currentContext);
|
final ProgressDialog progressDialog = UtilityProgress.createDefaultProgressDialog(currentContext);
|
||||||
progressDialog.show();
|
|
||||||
|
|
||||||
if(UtilityBarcode.isEtichettaPosizione(data)){
|
if(UtilityBarcode.isEtichettaPosizione(data)){
|
||||||
this.executeEtichettaPosizione(data, progressDialog);
|
this.executeEtichettaPosizione(data, progressDialog);
|
||||||
} else if(UtilityBarcode.isEtichettaAnonima(data)) {
|
} else if(UtilityBarcode.isEtichettaAnonima(data)) {
|
||||||
this.executeEtichettaAnonima(data, progressDialog);
|
this.executeEtichettaAnonima(data, progressDialog);
|
||||||
} else if(data.getType() == BarcodeType.EAN128) {
|
} else if(UtilityBarcode.isEtichetta128(data)) {
|
||||||
this.executeEAN128(data, progressDialog);
|
this.executeEAN128(data, progressDialog);
|
||||||
} else {
|
} else {
|
||||||
progressDialog.dismiss();
|
progressDialog.dismiss();
|
||||||
@ -171,7 +170,7 @@ public class DialogScanOrCreateLU {
|
|||||||
|
|
||||||
if(mtbColt == null) {
|
if(mtbColt == null) {
|
||||||
|
|
||||||
ColliMagazzinoRESTConsumer.createColloFromEtichettaAnonima(barcodeScanDTO, "L", createdMtbColt -> {
|
ColliMagazzinoRESTConsumer.createColloFromEtichettaAnonima(barcodeScanDTO, GestioneEnum.LAVORAZIONE, createdMtbColt -> {
|
||||||
BarcodeManager.enable();
|
BarcodeManager.enable();
|
||||||
createdMtbColt.setDisablePrint(true);
|
createdMtbColt.setDisablePrint(true);
|
||||||
sendMtbColt(createdMtbColt, progressDialog);
|
sendMtbColt(createdMtbColt, progressDialog);
|
||||||
|
|||||||
9
app/src/main/res/drawable/ic_clear_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_clear_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="@color/colorPrimary"
|
||||||
|
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
||||||
|
</vector>
|
||||||
9
app/src/main/res/drawable/ic_clear_black_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_clear_black_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
||||||
|
</vector>
|
||||||
9
app/src/main/res/drawable/ic_clear_white_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_clear_white_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:pathData="M19,6.41L17.59,5 12,10.59 6.41,5 5,6.41 10.59,12 5,17.59 6.41,19 12,13.41 17.59,19 19,17.59 13.41,12z"/>
|
||||||
|
</vector>
|
||||||
9
app/src/main/res/drawable/ic_save_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_save_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="@color/colorPrimary"
|
||||||
|
android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z"/>
|
||||||
|
</vector>
|
||||||
9
app/src/main/res/drawable/ic_save_black_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_save_black_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z"/>
|
||||||
|
</vector>
|
||||||
9
app/src/main/res/drawable/ic_save_white_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_save_white_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z"/>
|
||||||
|
</vector>
|
||||||
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout>
|
||||||
|
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/drawer_layout"
|
android:id="@+id/drawer_layout"
|
||||||
@ -9,6 +10,7 @@
|
|||||||
tools:openDrawer="start">
|
tools:openDrawer="start">
|
||||||
|
|
||||||
<include
|
<include
|
||||||
|
android:id="@+id/app_bar_main"
|
||||||
layout="@layout/app_bar_main"
|
layout="@layout/app_bar_main"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
@ -22,4 +24,6 @@
|
|||||||
app:headerLayout="@layout/nav_header_main"
|
app:headerLayout="@layout/nav_header_main"
|
||||||
app:menu="@menu/activity_main_drawer" />
|
app:menu="@menu/activity_main_drawer" />
|
||||||
|
|
||||||
</android.support.v4.widget.DrawerLayout>
|
</android.support.v4.widget.DrawerLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -58,4 +59,5 @@
|
|||||||
|
|
||||||
<include layout="@layout/content_main" />
|
<include layout="@layout/content_main" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</layout>
|
||||||
42
app/src/main/res/layout/dialog_ask_position_of_lu.xml
Normal file
42
app/src/main/res/layout/dialog_ask_position_of_lu.xml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<layout xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
<data>
|
||||||
|
<import type="android.text.Html" />
|
||||||
|
<import type="it.integry.integrywmsnative.R" />
|
||||||
|
<variable
|
||||||
|
name="mContext"
|
||||||
|
type="android.content.Context" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<android.support.v7.widget.CardView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:layout_gravity="center">
|
||||||
|
|
||||||
|
<android.support.v7.widget.AppCompatTextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Posizionamento"
|
||||||
|
style="@style/TextViewMaterial.DialogTitle"
|
||||||
|
android:gravity="center_horizontal"/>
|
||||||
|
|
||||||
|
<it.integry.integrywmsnative.ui.DeactivatableViewPager
|
||||||
|
android:id="@+id/viewpager"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="180dp"
|
||||||
|
class="it.integry.integrywmsnative.view.WrapContentHeightViewPager">
|
||||||
|
|
||||||
|
</it.integry.integrywmsnative.ui.DeactivatableViewPager>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</android.support.v7.widget.CardView>
|
||||||
|
|
||||||
|
</layout>
|
||||||
34
app/src/main/res/layout/dialog_ask_position_of_lu__page1.xml
Normal file
34
app/src/main/res/layout/dialog_ask_position_of_lu__page1.xml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_margin="16dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="10">
|
||||||
|
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progressBar"
|
||||||
|
style="?android:attr/progressBarStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
<android.support.v7.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
style="@style/TextViewMaterial"
|
||||||
|
android:text="Scansiona il codice a barre di una UL"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
54
app/src/main/res/layout/dialog_ask_position_of_lu__page2.xml
Normal file
54
app/src/main/res/layout/dialog_ask_position_of_lu__page2.xml
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<android.support.design.widget.TextInputLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
style="@style/TextInputLayout.OutlinePrimary">
|
||||||
|
|
||||||
|
<android.support.design.widget.TextInputEditText
|
||||||
|
android:id="@+id/reg_username"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/level"
|
||||||
|
android:inputType="number"
|
||||||
|
style="@style/TextInputEditText.OutlinePrimary"/>
|
||||||
|
|
||||||
|
</android.support.design.widget.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingTop="8dp"
|
||||||
|
android:gravity="bottom|center_horizontal">
|
||||||
|
|
||||||
|
|
||||||
|
<android.support.design.button.MaterialButton
|
||||||
|
android:id="@+id/material_text_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/Button.PrimaryOutline"
|
||||||
|
app:icon="@drawable/ic_clear_24dp"
|
||||||
|
android:text="Annulla"/>
|
||||||
|
|
||||||
|
|
||||||
|
<android.support.design.button.MaterialButton
|
||||||
|
android:id="@+id/material_unelevated_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
style="@style/Button.PrimaryFull"
|
||||||
|
app:icon="@drawable/ic_save_24dp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:text="Salva"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@ -278,7 +278,7 @@
|
|||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:tint="@android:color/white"
|
android:tint="@android:color/white"
|
||||||
app:srcCompat="@drawable/ic_check_black_24dp"
|
app:srcCompat="@drawable/ic_check_black_24dp"
|
||||||
android:onClick="@{() -> viewmodel.closeLU(true)}"
|
android:onClick="@{() -> viewmodel.closeLU(true, true)}"
|
||||||
android:visibility="@{viewmodel.isFabVisible.get() ? View.VISIBLE : View.GONE}"
|
android:visibility="@{viewmodel.isFabVisible.get() ? View.VISIBLE : View.GONE}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,11 @@
|
|||||||
android:background="@color/full_white">
|
android:background="@color/full_white">
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -133,7 +138,40 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginTop="32dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginEnd="16dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:weightSum="10">
|
||||||
|
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progressBar"
|
||||||
|
style="?android:attr/progressBarStyle"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
<android.support.v7.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:text="Scansiona il codice a barre di destinazione"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</layout>
|
</layout>
|
||||||
@ -27,6 +27,11 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent">
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<android.support.v7.widget.AppCompatTextView
|
<android.support.v7.widget.AppCompatTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@ -36,6 +41,19 @@
|
|||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="COD MART" />
|
tools:text="COD MART" />
|
||||||
|
|
||||||
|
<android.support.v7.widget.AppCompatTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{`(` + mtbColr.mtbAart.diacod + `)`}"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:visibility="@{(mtbColr.mtbAart != null && !UtilityString.isNullOrEmpty(mtbColr.mtbAart.diacod)) ? View.VISIBLE : View.GONE}"
|
||||||
|
tools:text="(12345)" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -55,7 +73,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{`Lotto: ` + mtbColr.getPartitaMag()}"
|
android:text="@{`Lotto: ` + mtbColr.getPartitaMag()}"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:visibility="@{UtilityString.isNullOrEmpty(mtbColr.getPartitaMag()) ? View.INVISIBLE : View.VISIBLE}"
|
android:visibility="@{UtilityString.isNullOrEmpty(mtbColr.getPartitaMag()) ? View.GONE : View.VISIBLE}"
|
||||||
tools:text="Lotto: ABCDE" />
|
tools:text="Lotto: ABCDE" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@ -80,7 +98,7 @@
|
|||||||
android:paddingTop="2dp"
|
android:paddingTop="2dp"
|
||||||
android:paddingRight="6dp"
|
android:paddingRight="6dp"
|
||||||
android:paddingBottom="2dp"
|
android:paddingBottom="2dp"
|
||||||
android:text="@{UtilityNumber.decimalToString(mtbColr.getQtaCol()) + (!UtilityString.isNullOrEmpty(mtbColr.getUntMis()) ? `\n` + mtbColr.getUntMis() : ``)}"
|
android:text="@{UtilityNumber.decimalToString(mtbColr.getQtaCol()) + (mtbColr.mtbAart != null && !UtilityString.isNullOrEmpty(mtbColr.mtbAart.untMis) ? `\n` + mtbColr.mtbAart.untMis : ``)}"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/nav_header_height"
|
android:layout_height="wrap_content"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:background="@drawable/side_nav_bar"
|
android:background="@drawable/side_nav_bar"
|
||||||
android:gravity="bottom"
|
android:gravity="bottom"
|
||||||
@ -13,12 +14,12 @@
|
|||||||
android:paddingTop="@dimen/activity_vertical_margin"
|
android:paddingTop="@dimen/activity_vertical_margin"
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
android:theme="@style/ThemeOverlay.AppCompat.Dark">
|
||||||
|
|
||||||
<ImageView
|
<de.hdodenhof.circleimageview.CircleImageView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/drawer_logoAzienda"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
android:paddingTop="@dimen/nav_header_vertical_spacing"
|
||||||
app:srcCompat="@android:drawable/sym_def_app_icon" />
|
android:src="@android:drawable/sym_def_app_icon" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/drawer_username"
|
android:id="@+id/drawer_username"
|
||||||
@ -29,9 +30,10 @@
|
|||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/textView"
|
android:id="@+id/drawer_deposito"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="android.studio@android.com" />
|
tools:text="android.studio@android.com" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</layout>
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
android:icon="@drawable/ic_menu_manage"
|
android:icon="@drawable/ic_menu_manage"
|
||||||
android:title="Versamento Merce" />
|
android:title="Versamento Merce" />
|
||||||
</group>
|
</group>
|
||||||
|
<!--
|
||||||
<item android:title="Communicate">
|
<item android:title="Communicate">
|
||||||
<menu>
|
<menu>
|
||||||
<item
|
<item
|
||||||
@ -32,13 +32,13 @@
|
|||||||
android:title="Send" />
|
android:title="Send" />
|
||||||
</menu>
|
</menu>
|
||||||
</item>
|
</item>
|
||||||
|
-->
|
||||||
<item android:title="Other">
|
<item android:title="Altro">
|
||||||
<menu>
|
<menu>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_settings"
|
android:id="@+id/nav_settings"
|
||||||
android:icon="@drawable/ic_settings_24dp"
|
android:icon="@drawable/ic_settings_24dp"
|
||||||
android:title="Settings" />
|
android:title="Impostazioni" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_logout"
|
android:id="@+id/nav_logout"
|
||||||
android:icon="@drawable/ic_logout_24dp"
|
android:icon="@drawable/ic_logout_24dp"
|
||||||
|
|||||||
@ -151,7 +151,13 @@
|
|||||||
|
|
||||||
<string name="no_items_found_message">Nessun articolo trovato</string>
|
<string name="no_items_found_message">Nessun articolo trovato</string>
|
||||||
<string name="no_lu_found_message">Nessuna UL trovata</string>
|
<string name="no_lu_found_message">Nessuna UL trovata</string>
|
||||||
|
<string name="no_orders_found_message">Non sono stati trovati ordini</string>
|
||||||
|
<string name="gestione_A_V_not_accepted_message"><![CDATA[Le UL di tipo <b>Acquisto</b> o <b>Vendita</b> non sono ammesse qui]]></string>
|
||||||
|
<string name="gestione_V_not_accepted_message"><![CDATA[Le UL di tipo <b>Vendita</b> non sono ammesse qui]]></string>
|
||||||
<string name="too_much_lu_found_message">E\' stata trovata più di una UL</string>
|
<string name="too_much_lu_found_message">E\' stata trovata più di una UL</string>
|
||||||
<string name="ask_print_message"><![CDATA[Si vuole procedere con la stampa dell\'etichetta?]]></string>
|
<string name="ask_print_message"><![CDATA[Si vuole procedere con la stampa dell\'etichetta?]]></string>
|
||||||
|
<string name="ask_position_of_lu_message">Scansiona il codice a barre di una <b>Posizione</b></string>
|
||||||
|
|
||||||
|
<string name="level">Livello</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
24
app/src/main/res/values/buttons_style.xml
Normal file
24
app/src/main/res/values/buttons_style.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
ì
|
||||||
|
|
||||||
|
<style name="Button.PrimaryOutline" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
||||||
|
<item name="fontFamily">@font/open_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||||
|
<item name="android:textStyle">bold</item>
|
||||||
|
<item name="android:textAllCaps">false</item>
|
||||||
|
<item name="android:paddingTop">8dp</item>
|
||||||
|
<item name="android:paddingBottom">8dp</item>
|
||||||
|
<item name="backgroundTint">@android:color/white</item>
|
||||||
|
<item name="iconTint">@color/colorPrimary</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Button.PrimaryFull" parent="Widget.MaterialComponents.Button.UnelevatedButton">
|
||||||
|
<item name="fontFamily">@font/open_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||||
|
<item name="android:textStyle">bold</item>
|
||||||
|
<item name="android:textAllCaps">false</item>
|
||||||
|
<item name="android:paddingTop">8dp</item>
|
||||||
|
<item name="android:paddingBottom">8dp</item>
|
||||||
|
<item name="backgroundTint">@color/colorPrimary</item>
|
||||||
|
<item name="iconTint">@android:color/white</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="colorPrimary">@color/indigo_500</color>
|
<color name="colorPrimary">#1A73E7</color>
|
||||||
<color name="colorPrimaryDark">@color/indigo_700</color>
|
<color name="colorPrimaryDark">@color/indigo_700</color>
|
||||||
<color name="colorAccent">#387ef5</color>
|
<color name="colorAccent">#387ef5</color>
|
||||||
<color name="colorRipple">#3f3f51b5</color>
|
<color name="colorRipple">#3f3f51b5</color>
|
||||||
|
|||||||
@ -102,6 +102,7 @@
|
|||||||
<string name="available">Available</string>
|
<string name="available">Available</string>
|
||||||
|
|
||||||
<string name="batch_lot">Batch lot</string>
|
<string name="batch_lot">Batch lot</string>
|
||||||
|
<string name="level">Level</string>
|
||||||
<string name="batch_lot_text"><![CDATA[Batch lot: <b>%s</b>]]></string>
|
<string name="batch_lot_text"><![CDATA[Batch lot: <b>%s</b>]]></string>
|
||||||
<string name="expire_date">Expire date</string>
|
<string name="expire_date">Expire date</string>
|
||||||
<string name="num_pcks">Pcks num</string>
|
<string name="num_pcks">Pcks num</string>
|
||||||
@ -160,7 +161,11 @@
|
|||||||
|
|
||||||
<string name="no_items_found_message">No items found</string>
|
<string name="no_items_found_message">No items found</string>
|
||||||
<string name="no_lu_found_message">No LU found</string>
|
<string name="no_lu_found_message">No LU found</string>
|
||||||
|
<string name="no_orders_found_message">No orders found</string>
|
||||||
|
<string name="gestione_A_V_not_accepted_message">The LU of type Purchase or Sale is not accepted here</string>
|
||||||
|
<string name="gestione_V_not_accepted_message">The LU of type Sale is not accepted here</string>
|
||||||
<string name="too_much_lu_found_message">Multiple LU found</string>
|
<string name="too_much_lu_found_message">Multiple LU found</string>
|
||||||
<string name="ask_print_message">Do you want print the label?</string>
|
<string name="ask_print_message">Do you want print the label?</string>
|
||||||
|
<string name="ask_position_of_lu_message">Please scan a <b>Position</b> barcode</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
<style name="AppTheme" parent="Theme.MaterialComponents.Light.DarkActionBar">
|
||||||
|
|
||||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
|
|
||||||
|
|
||||||
<!-- Customize your theme here. -->
|
<!-- Customize your theme here. -->
|
||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
@ -19,7 +17,7 @@
|
|||||||
<item name="windowNoTitle">true</item>
|
<item name="windowNoTitle">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Light" parent="Theme.AppCompat.Light.NoActionBar">
|
<style name="Light" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
|
|||||||
14
app/src/main/res/values/text_input_layout_style.xml
Normal file
14
app/src/main/res/values/text_input_layout_style.xml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<style name="TextInputLayout.OutlinePrimary" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
|
||||||
|
<item name="fontFamily">@font/open_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||||
|
<item name="android:textColorHint">@color/colorPrimary</item>
|
||||||
|
<item name="boxStrokeColor">@color/colorPrimary</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="TextInputEditText.OutlinePrimary" parent="ThemeOverlay.MaterialComponents.TextInputEditText.OutlinedBox.Dense">
|
||||||
|
<item name="fontFamily">@font/open_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||||
|
<item name="android:textColor">@android:color/black</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
||||||
13
app/src/main/res/values/textview_style.xml
Normal file
13
app/src/main/res/values/textview_style.xml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<style name="TextViewMaterial">
|
||||||
|
<item name="fontFamily">@font/open_sans_regular</item> <!-- target android sdk versions < 26 and > 14 if theme other than AppCompat -->
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="TextViewMaterial.DialogTitle">
|
||||||
|
<item name="android:textColor">@android:color/black</item>
|
||||||
|
<item name="android:textSize">22sp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext{
|
ext{
|
||||||
kotlin_version = '1.3.0'
|
kotlin_version = '1.3.10'
|
||||||
gradle_version = '3.2.1'
|
gradle_version = '3.2.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -76,11 +76,11 @@ public class PointMobileBarcodeReader implements BarcodeReaderInterface {
|
|||||||
|
|
||||||
//try {
|
//try {
|
||||||
if(mDecodeResult.symName.equalsIgnoreCase("READ_FAIL")){
|
if(mDecodeResult.symName.equalsIgnoreCase("READ_FAIL")){
|
||||||
//throw new Exception("Barcode non riconosciuto");
|
//if(mOnScanFailed != null) mOnScanFailed.run(new Exception("Barcode non riconosciuto"));
|
||||||
if(mOnScanFailed != null) mOnScanFailed.run(new Exception("Barcode non riconosciuto"));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(mDecodeResult != null) {
|
||||||
BarcodeScanDTO barcodeScanDTO = new BarcodeScanDTO()
|
BarcodeScanDTO barcodeScanDTO = new BarcodeScanDTO()
|
||||||
.setByteValue(mDecodeResult.decodeValue)
|
.setByteValue(mDecodeResult.decodeValue)
|
||||||
.setStringValue(mDecodeResult.toString().replaceAll("\n", "").replaceAll("\r", "").trim())
|
.setStringValue(mDecodeResult.toString().replaceAll("\n", "").replaceAll("\r", "").trim())
|
||||||
@ -89,6 +89,7 @@ public class PointMobileBarcodeReader implements BarcodeReaderInterface {
|
|||||||
.setDecodingTime(mDecodeResult.decodeTimeMillisecond);
|
.setDecodingTime(mDecodeResult.decodeTimeMillisecond);
|
||||||
|
|
||||||
mOnScanSuccessfull.run(barcodeScanDTO);
|
mOnScanSuccessfull.run(barcodeScanDTO);
|
||||||
|
}
|
||||||
|
|
||||||
//} catch (Exception ex) {
|
//} catch (Exception ex) {
|
||||||
// Log.e(TAG, ex.getMessage());
|
// Log.e(TAG, ex.getMessage());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user