From f588484f0c8968bc41d800abb31ae11f62d77a70 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 25 Jan 2010 23:47:34 +0000 Subject: [PATCH] Patch level : 10.0 no patch Files correlati : Ricompilazione Demo : [ ] Commento : Aggiunti metodi fisrt_um e is _first_um() usati per ora nella stampa kg delle lavanderie git-svn-id: svn://10.65.10.50/trunk@19981 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- mg/mglib.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mg/mglib.h b/mg/mglib.h index a1a17a4c5..04fbc63ff 100755 --- a/mg/mglib.h +++ b/mg/mglib.h @@ -120,7 +120,10 @@ public: int find_um(const char * um, int from = 0) const; int find_deslin(const char * deslin, int from = 0) const; int find_codcorr(const char * codcorr, int from = 0) const; - + + bool is_first_um(const char * ums) const { return um().rows() > 0 ? find_um(ums) == 1: false; } + const char * first_um() const { return um().rows() > 0 ? um()[1].get(UMART_UM) : ""; } + static void round_um(real& v, const char* to_um); real convert_to_um(const real& v, const char* to_um, const char* from_um = NULL, bool arrotonda = true); @@ -128,7 +131,7 @@ public: TRecord_array & deslin() const { return body(LF_DESLIN); } TRecord_array & codcorr() const { return body(LF_CODCORR); } - TArticolo(const char* codice = NULL); + TArticolo(const char* codice = NULL); TArticolo(const TRectype& rec); virtual ~TArticolo() {} };