first re-commit.
This commit is contained in:
67
libMiniCash/mcsalesitem.h
Normal file
67
libMiniCash/mcsalesitem.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/***************************************************************************
|
||||
|
||||
libMiniCash
|
||||
Copyright © 2013-2022 christoph holzheuer
|
||||
c.holzheuer@sourceworx.org
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef MCSALESITEM_H
|
||||
#define MCSALESITEM_H
|
||||
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <libMiniCash.h>
|
||||
|
||||
|
||||
//class MCSalesModel;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Ein verkaufter Artikel
|
||||
*
|
||||
* Ein verkaufter Artikel : Verkäufenummrer, Listennummer und Preis
|
||||
*/
|
||||
|
||||
|
||||
struct LIBMINICASH_EXPORT MCSalesItem
|
||||
{
|
||||
|
||||
QString trSellerID;
|
||||
QString trItemNo;
|
||||
double trPrice;
|
||||
|
||||
MCSalesItem()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
MCSalesItem( const QString& id, const QString& no, double price )
|
||||
: trSellerID( id ) , trItemNo( no ), trPrice( price )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QString toString() const
|
||||
{
|
||||
QString result( "id: %1 itemno: %2 price: %3" );
|
||||
result = result.arg( trSellerID, trItemNo ).arg( trPrice );
|
||||
return result;
|
||||
}
|
||||
|
||||
bool operator==(const MCSalesItem& other) const
|
||||
{
|
||||
return (trSellerID == other.trSellerID && trItemNo == other.trItemNo && trPrice == other.trPrice);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // MCSALESITEM_H
|
Reference in New Issue
Block a user