Commit 6e02ceb8 authored by Hugo Hörnquist's avatar Hugo Hörnquist

Merge remote-tracking branch 'apharius/master'

parents 73ec9a5f 752270f8
......@@ -128,9 +128,9 @@ MainWindow::MainWindow(QWidget *parent) :
model->select();
model->setHeaderData(0, Qt::Horizontal, "id");
model->setHeaderData(1, Qt::Horizontal, "Sorting ID");
model->setHeaderData(1, Qt::Horizontal, "Sorterings-ID");
model->setHeaderData(2, Qt::Horizontal, "Systembolaget ID");
model->setHeaderData(3, Qt::Horizontal, "Sträckkod");
model->setHeaderData(3, Qt::Horizontal, "Streckkod");
model->setHeaderData(4, Qt::Horizontal, "Namn");
model->setHeaderData(5, Qt::Horizontal, "Pris");
model->setHeaderData(6, Qt::Horizontal, "Till Salu?");
......@@ -165,8 +165,8 @@ MainWindow::MainWindow(QWidget *parent) :
QSqlRelationalTableModel* stockModel = new QSqlRelationalTableModel();
stockModel->setTable("stock");
stockModel->setHeaderData(0, Qt::Horizontal, "Namn"); // foreign
stockModel->setHeaderData(1, Qt::Horizontal, "Stock");
stockModel->setHeaderData(2, Qt::Horizontal, "Other Stock"); // hidden
stockModel->setHeaderData(1, Qt::Horizontal, "Lager");
stockModel->setHeaderData(2, Qt::Horizontal, "Annat lager"); // hidden
stockModel->setRelation(0, QSqlRelation("products", "id", "name"));
stockModel->setSort(0, Qt::AscendingOrder);
stockModel->select();
......@@ -187,7 +187,7 @@ MainWindow::MainWindow(QWidget *parent) :
listModel->setFilter("sale_status IN (0, 1)");
listModel->setSort(5, Qt::AscendingOrder);
listModel->setHeaderData(4, Qt::Horizontal, "Namn");
listModel->setHeaderData(5, Qt::Horizontal, "Sale Price");
listModel->setHeaderData(5, Qt::Horizontal, "Försäljningspris");
listModel->setHeaderData(6, Qt::Horizontal, "Försäljningsstatus");
listModel->select();
......@@ -352,7 +352,7 @@ void MainWindow::on_acquisitionModel_dataChanged(QModelIndex topLeft, QModelInde
int row = topLeft.row();
int col = topLeft.column();
// only 2 & 3 should be editable anyways
// only the amount and price should be editable anyways
if (col == 2 || col == 3) {
int amount = tempAcquisitionsModel->data(tempAcquisitionsModel->index(row, 2)).toInt();
int price = tempAcquisitionsModel->data(tempAcquisitionsModel->index(row, 3)).toInt();
......@@ -530,7 +530,6 @@ void MainWindow::transferMoney(QString from, QString to, int amount)
transferMoney(from, to, amount, NULL);
}
void MainWindow::on_addMoneySubmitButton_clicked()
{
addRemoveCommon(CASH_NULL, CASH_ACCOUNT);
......@@ -685,7 +684,7 @@ void MainWindow::updateCurrentDrainageStatus()
.arg(endStr));
ui->cancelDrainageButton->setVisible(true);
} else {
ui->drainageLabel->setText("Ingen Pågående Tömmning");
ui->drainageLabel->setText("Ingen pågående mning");
ui->cancelDrainageButton->setVisible(false);
}
}
......@@ -731,6 +730,11 @@ int MainWindow::setMoneyDiffLabels()
query.next();
int expected = query.value(0).toInt();
QString diff_text = QString("%1 kr").arg(expected / 100.0, 0, 'f', 2);
// This might seem like a mistake at first sight, though it isn't.
// This just sets a default value for diffTotal. The new value is
// calculated and set in setMoneyDiffLabels(int new_total)
ui->diffExpected->setText(diff_text);
ui->diffTotal->setText(diff_text);
......
......@@ -28,7 +28,7 @@
</property>
<widget class="QWidget" name="productListingTab">
<attribute name="title">
<string>Proudct Listings</string>
<string>Produktlista</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
......@@ -73,14 +73,14 @@
<bool>false</bool>
</property>
<property name="text">
<string>Delete Selected</string>
<string>Radera markerad</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="newItemButton">
<property name="text">
<string>New Item</string>
<string>Ny artikel</string>
</property>
</widget>
</item>
......@@ -94,7 +94,7 @@
<item>
<widget class="QCheckBox" name="checkBox">
<property name="text">
<string>Show Hidden</string>
<string>Visa dolda produkter</string>
</property>
</widget>
</item>
......@@ -117,7 +117,7 @@
</widget>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Stock</string>
<string>Lager</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
......@@ -133,7 +133,7 @@
<item>
<widget class="QPushButton" name="stockRefreshButton">
<property name="text">
<string>Refresh</string>
<string>Uppdatera</string>
</property>
</widget>
</item>
......@@ -166,7 +166,7 @@
<string/>
</property>
<property name="placeholderText">
<string>Search...</string>
<string>Sök...</string>
</property>
</widget>
</item>
......@@ -183,7 +183,7 @@
<item>
<widget class="QPushButton" name="buyAddBtn">
<property name="text">
<string>Add</string>
<string>Lägg till</string>
</property>
</widget>
</item>
......@@ -232,7 +232,7 @@
<item>
<widget class="QPushButton" name="buyRemoveButton">
<property name="text">
<string>Delete Selected</string>
<string>Ta bort markerad</string>
</property>
</widget>
</item>
......@@ -267,7 +267,7 @@
<item>
<widget class="QLabel" name="label_13">
<property name="text">
<string>To get updated product names reset table</string>
<string>För uppdaterade produktnamn, återställ tabellen.</string>
</property>
</widget>
</item>
......@@ -282,7 +282,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Reset</string>
<string>Återställ</string>
</property>
</widget>
</item>
......@@ -333,7 +333,7 @@
<item>
<widget class="QLabel" name="label_12">
<property name="text">
<string>Expected:</string>
<string>Förväntad:</string>
</property>
</widget>
</item>
......@@ -354,7 +354,7 @@
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Actual:</string>
<string>Faktiskt:</string>
</property>
</widget>
</item>
......@@ -436,7 +436,7 @@
<item row="1" column="0">
<widget class="QLabel" name="endTimeLabel">
<property name="text">
<string>End Time:</string>
<string>Sluttid:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -446,7 +446,7 @@
<item row="2" column="4">
<widget class="QLabel" name="minPriceLabel">
<property name="text">
<string>Min Price:</string>
<string>Minimipris:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -456,7 +456,7 @@
<item row="0" column="4" rowspan="2">
<widget class="QLabel" name="label_8">
<property name="text">
<string>TimeZone:</string>
<string>Tidszon:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -476,7 +476,7 @@
<item row="2" column="0">
<widget class="QLabel" name="amountPerHourLabel">
<property name="text">
<string>Amount/time:</string>
<string>Sänkning/tid:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -486,7 +486,7 @@
<item row="2" column="2">
<widget class="QLabel" name="howOftenLabel">
<property name="text">
<string>How Often (min):</string>
<string>Hur ofta (min):</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -542,7 +542,7 @@
<item row="0" column="0">
<widget class="QLabel" name="startTimeLabel">
<property name="text">
<string>Start Time:</string>
<string>Starttid:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -564,7 +564,7 @@
<item>
<widget class="QPushButton" name="addDrainageButton">
<property name="text">
<string>Skapa Tömmningstillfälle</string>
<string>Skapa Tömningstillfälle</string>
</property>
</widget>
</item>
......@@ -580,7 +580,7 @@
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Pågaende tömmning:</string>
<string>Pågaende tömning:</string>
</property>
</widget>
</item>
......@@ -607,7 +607,7 @@
<item>
<widget class="QPushButton" name="updateCurrentDrainageButton">
<property name="text">
<string>Update</string>
<string>Uppdatera</string>
</property>
</widget>
</item>
......@@ -650,7 +650,7 @@
<item>
<widget class="QPushButton" name="removeDrainageButton">
<property name="text">
<string>Ta Bort Tömmningstillfälle</string>
<string>Ta Bort Tömningstillfälle</string>
</property>
</widget>
</item>
......@@ -658,7 +658,7 @@
</widget>
<widget class="QWidget" name="tab_4">
<attribute name="title">
<string>Other</string>
<string>Övrigt</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5">
<item row="4" column="1">
......@@ -708,7 +708,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_31">
<property name="text">
<string>Cash Drawer</string>
<string>Kassalåda</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -718,7 +718,7 @@
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Vault</string>
<string>Kassaskåp</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -735,7 +735,7 @@
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Transfer (öre)</string>
<string>Överför (öre)</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -805,14 +805,14 @@
<item row="1" column="2">
<widget class="QPushButton" name="removeMoneySubmitButton">
<property name="text">
<string>Remove</string>
<string>Ta bort</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="addMoneySubmitButton">
<property name="text">
<string>Add</string>
<string>Lägg till</string>
</property>
</widget>
</item>
......@@ -826,7 +826,7 @@
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Add/Remove Money (öre)</string>
<string>Lägg till/ta bort pengar (öre)</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
......@@ -917,7 +917,7 @@
<item row="6" column="0" colspan="2">
<widget class="QPushButton" name="stockValueRefresh">
<property name="text">
<string>Refresh</string>
<string>Uppdatera</string>
</property>
</widget>
</item>
......
......@@ -25,7 +25,7 @@
<item>
<widget class="QLineEdit" name="searchEdit">
<property name="placeholderText">
<string>Search...</string>
<string>Sök...</string>
</property>
</widget>
</item>
......@@ -60,7 +60,7 @@
<bool>false</bool>
</property>
<property name="text">
<string>Kontant</string>
<string>Köp</string>
</property>
</widget>
</item>
......@@ -209,7 +209,7 @@
</property>
<widget class="QWidget" name="logTab">
<attribute name="title">
<string>Log</string>
<string>Logg</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="topMargin">
......@@ -286,7 +286,7 @@
</widget>
<widget class="QWidget" name="orderTab">
<attribute name="title">
<string>Order</string>
<string>Beställning</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment