Correzioni per DBService: creazione righe vuote indesiderate
git-svn-id: svn://10.65.10.50/branches/R_10_00@22962 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
94d1f9bf28
commit
0b7472f1db
@ -849,7 +849,7 @@ TMSP_constraint* TPlanning_mask::find_constraint(const TMSP_line& l, bool force_
|
||||
}
|
||||
}
|
||||
|
||||
TString da_rdoc_key(l.da_rdoc_key());
|
||||
const TString da_rdoc_key = l.da_rdoc_key();
|
||||
|
||||
// cerca il vincolo con - stesso magazzino , impianto e linea
|
||||
TMSP_constraint* c = _constraints.find(codcli, l.articolo(), l.livgiac(), codimp, codlin, codmag, EMPTY_STRING, da_rdoc_key);
|
||||
@ -1153,7 +1153,7 @@ bool TPlanning_mask::remove_propose(bool verbose)
|
||||
bool remove_all = false;
|
||||
bool some = _proposed_articles.items() > 0L; // proposte attuali
|
||||
if (some)
|
||||
remove = (!verbose || yesno_box(TR("Vuoi annullare le nuove proposte?")));
|
||||
remove = (!verbose || yesno_box(TR("Si desiderano annullare le nuove proposte?")));
|
||||
if (!some && verbose)
|
||||
{
|
||||
if (load_MRP_lines(_actual_plan))
|
||||
@ -1161,8 +1161,8 @@ bool TPlanning_mask::remove_propose(bool verbose)
|
||||
some = _mrp_articles.items() > 0L;
|
||||
if (some)
|
||||
{
|
||||
remove = (noyes_box(TR("Vuoi annullare tutte le pianificazioni non confermate?")));
|
||||
if (remove && get_bool(F_RESCHEDULING) && noyes_box(TR("Vuoi annullare anche le pianificazioni confermate?")))
|
||||
remove = (delete_box(TR("Si desiderano annullare tutte le pianificazioni non confermate?")));
|
||||
if (remove && get_bool(F_RESCHEDULING) && delete_box(TR("Vuoi annullare anche le pianificazioni confermate?")))
|
||||
remove_all = true;
|
||||
}
|
||||
if (!remove)
|
||||
@ -1247,11 +1247,14 @@ void TPlanning_mask::add_or_sub_propose(char sign, bool scheduled)
|
||||
|
||||
if (!sf.cell_disabled(art_row, F_BUCKET1-FIRST_FIELD))
|
||||
{
|
||||
line_found=(a.codclifor()==codcli && a.articolo()==codart && a.livgiac()==liv
|
||||
&& a.codimp()==codimp && a.codlin()==codlin && a.codmagdep()==mag && a.da_rdoc_key() == da_rdoc_key);
|
||||
line_found=(a.codclifor()==codcli && a.articolo()==codart && a.livgiac()==liv &&
|
||||
a.codimp()==codimp && a.codlin()==codlin && a.codmagdep()==mag &&
|
||||
(a.da_rdoc_key() == da_rdoc_key) || (a.da_rdoc_key().blank() && da_rdoc_key.blank()));
|
||||
if (line_found)
|
||||
break;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
TMSP_constraint* currcons = _constraints.find(codcli, codart, liv, codimp, codlin, mag, magc, da_rdoc_key);
|
||||
if (constraint == currcons)
|
||||
break;
|
||||
@ -1485,7 +1488,8 @@ void TPlanning_mask::propose_1stJIT(TMSP_logic logic, bool check_machine, bool c
|
||||
TDate dbuck(starting_date());
|
||||
dbuck +=buck*days_per_bucket();
|
||||
round_date(dbuck);
|
||||
message_box(FR("Quantita' proposte a partire dal %s (colonna %d)"), (const char *)dbuck.string(),buck);
|
||||
message_box(FR("Quantità proposte a partire dal %s (colonna %d)"),
|
||||
(const char *)dbuck.string(),buck);
|
||||
}
|
||||
else
|
||||
message_box(TR("Nessuna nuova proposta"));
|
||||
@ -1501,7 +1505,9 @@ void TPlanning_mask::propose_1stJIT(TMSP_logic logic, bool check_machine, bool c
|
||||
}
|
||||
|
||||
|
||||
void TPlanning_mask::review_cell(long mrp_row, int bucket, bool check_machine, bool check_human, bool useextralines, bool useextrahours,bool lotsizing, bool no_outcapacity, int anticipomin,int anticipomax, TMSP_mode mode, TMSP_logic logic, const char * msg, bool firstfitxbucket)
|
||||
void TPlanning_mask::review_cell(long mrp_row, int bucket, bool check_machine, bool check_human, bool useextralines, bool useextrahours,
|
||||
bool lotsizing, bool no_outcapacity, int anticipomin,int anticipomax,
|
||||
TMSP_mode mode, TMSP_logic logic, const char * msg, bool firstfitxbucket)
|
||||
{
|
||||
const bool ignore_mag = get_bool(F_NOMAG_IN);
|
||||
const bool ignore_imp = get_bool(F_NOIMP_IN);
|
||||
@ -1618,7 +1624,9 @@ void TPlanning_mask::review_cell(long mrp_row, int bucket, bool check_machine, b
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
nlinea= curr_labor->find_linea(codlin);
|
||||
if (nlinea<0)
|
||||
{
|
||||
@ -1906,8 +1914,7 @@ bool TPlanning_mask::general_review(bool check_machine, bool check_human, bool u
|
||||
pi.addstatus(1);
|
||||
for (long mrp_row=0; mrp_row < max_mrp_rows; mrp_row++)
|
||||
{
|
||||
pi.addstatus(1);
|
||||
if (pi.iscancelled())
|
||||
if (!pi.addstatus(1))
|
||||
return false;
|
||||
review_cell(mrp_row, bucket, check_machine, check_human, useextralines, useextrahours, lotsizing, no_outcapacity, anticipomin, anticipomax, mode, logic, msg, false);
|
||||
}
|
||||
@ -2062,12 +2069,15 @@ void TPlanning_mask::msprow2codes(TToken_string &row,long &clifor, TCodice_artic
|
||||
lin = row.get(F_CODLIN-FIRST_FIELD); lin.trim();
|
||||
um = row.get(F_UM-FIRST_FIELD); um.trim();
|
||||
|
||||
const TString val = row.get(F_DESCART-FIRST_FIELD);
|
||||
const TFixed_string val = row.get(F_DESCART-FIRST_FIELD);
|
||||
const int pos = val.find('¦');
|
||||
if (pos >= 0)
|
||||
{
|
||||
da_rdoc_key = val.mid(pos+1);
|
||||
da_rdoc_key.trim();
|
||||
}
|
||||
else
|
||||
da_rdoc_key = EMPTY_STRING;
|
||||
da_rdoc_key.cut(0);
|
||||
}
|
||||
|
||||
void TPlanning_mask::crprow2codes(TToken_string &row, TString & imp, TString & lin, long &clifor, TCodice_articolo &art ,
|
||||
@ -3560,9 +3570,7 @@ bool TPlanning_mask::on_field_event(TOperable_field& o, TField_event e, long jol
|
||||
break;
|
||||
case F_CANCEL_MSP:
|
||||
if (e == fe_button)
|
||||
{
|
||||
remove_propose(true);
|
||||
}
|
||||
break;
|
||||
case F_RECALC_MSP:
|
||||
if (e == fe_button && check_fields())
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include <applicat.h>
|
||||
#include <colmask.h>
|
||||
#include "mrplib.h"
|
||||
|
||||
#include "mr2100.h"
|
||||
#include "mr2201.h"
|
||||
@ -147,7 +146,7 @@ public:
|
||||
bool sortMSPsheet();
|
||||
bool sortCRPsheet();
|
||||
|
||||
virtual bool is_acq_planning() { return FALSE;}
|
||||
virtual bool is_acq_planning() { return false;}
|
||||
TSelect_color_mask & sel() { return _sel_color; }
|
||||
TPlanning_mask();
|
||||
virtual ~TPlanning_mask() { }
|
||||
@ -162,12 +161,11 @@ protected:
|
||||
void openfiles() ;
|
||||
virtual TPlanning_mask& mask() {return *_m;}
|
||||
virtual void main_loop();
|
||||
virtual bool firm_change_enabled() const { return FALSE; }
|
||||
virtual bool firm_change_enabled() const { return false; }
|
||||
virtual bool TPlanning_app::menu(MENU_TAG mt);
|
||||
|
||||
public:
|
||||
TPlanning_app() : _m(NULL) {}
|
||||
};
|
||||
|
||||
|
||||
#endif // __MR2200_H
|
@ -486,7 +486,7 @@ END
|
||||
|
||||
LIST F_RECALC_TYPE 35
|
||||
BEGIN
|
||||
PROMPT 2 1 "Logica propositiva "
|
||||
PROMPT 2 1 "Logica proposte "
|
||||
#ifndef _IS_ACQ
|
||||
ITEM "1|FirstFit "
|
||||
MESSAGE ENABLE,G_FINITE@
|
||||
@ -525,12 +525,12 @@ END
|
||||
|
||||
BOOL F_FFBUCKET_MSP
|
||||
BEGIN
|
||||
PROMPT 60 1 "First Fit sui bucket"
|
||||
PROMPT 58 1 "Bucket First Fit"
|
||||
END
|
||||
|
||||
STRING F_PRIORITY 60
|
||||
BEGIN
|
||||
PROMPT 2 2 "Priorita' "
|
||||
PROMPT 2 2 "Prioritŕ "
|
||||
END
|
||||
|
||||
BOOL F_LOTSIZING
|
||||
@ -779,7 +779,7 @@ END
|
||||
|
||||
BOOL F_MSP_SORT_PRILIN
|
||||
BEGIN
|
||||
PROMPT 52 3 "Prioritŕ di linea"
|
||||
PROMPT 55 3 "Prioritŕ di linea"
|
||||
END
|
||||
|
||||
BUTTON F_MSP_RESORT 9
|
||||
|
@ -1219,6 +1219,7 @@ void TMSP_constraint::init()
|
||||
__userflds = new TToken_string(c.get("USERFLDS"));
|
||||
__sep = c.get_char("FLDSEP", NULL, -1, ';');
|
||||
}
|
||||
_da_rdoc_key.trim();
|
||||
}
|
||||
|
||||
TMSP_constraint::TMSP_constraint(long cliente,
|
||||
@ -1347,7 +1348,10 @@ TMSP_constraint* TMSP_constraints::find(const TToken_string& row, bool create)
|
||||
const int pos = str.find('¦');
|
||||
|
||||
if (pos >= 0)
|
||||
{
|
||||
_key.add(str.mid(pos +1));
|
||||
_key.rtrim();
|
||||
}
|
||||
else
|
||||
_key.add("");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user