Skip to content

Commit

Permalink
irsaliyenin faturasini olustururken irsaliyenin silinmeyen stok yansi…
Browse files Browse the repository at this point in the history
…malari yuzunden iki kez islem gormus gibi oluyordu, duzeltildi, closes #28.

siparis onaylama kisminda unutulan workspace atamasi yuzunden veritabani hatasi aliniyordu, duzeltildi, closes #29.
iade fatura ve fislerde fiyatlari ters getiriyordu, duzeltildi, closes #31.
  • Loading branch information
mdpinar committed May 21, 2015
1 parent 90b39c3 commit ed7b299
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 24 deletions.
4 changes: 4 additions & 0 deletions app/controllers/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ public static boolean isActiveProfile(String name) {
public static boolean isActiveLang(String name) {
return (name != null && name.equals(getLang()));
}

public static String getVersion() {
return AppInfo.BuildInfo.version();
}

public static ResourceBundle getResourceBundle() {
if (bundle != null) {
Expand Down
6 changes: 5 additions & 1 deletion app/controllers/order/TransApprovals.java
Original file line number Diff line number Diff line change
Expand Up @@ -700,13 +700,14 @@ private static void makeReceiptBasedWaybill(Integer sourceId, OrderTransSearchPa

WaybillTrans master = new WaybillTrans();

master.workspace = CacheUtils.getWorkspaceId();
master.receiptNo = DocNoUtils.findLastReceiptNo(right);
master.right = right;
master.transSource = approvalModel.waybillTransSource;
master.transPoint = approvalModel.submitTransPoint;
master.privateCode = approvalModel.submitPrivateCode;
master.transType = right.transType;

if (Profiles.chosen().gnel_docNoIncType.equals(DocNoIncType.Full_Automatic)) {
master.transNo = DocNoUtils.findLastTransNo(right);
} else {
Expand Down Expand Up @@ -757,6 +758,7 @@ private static void makeReceiptBasedWaybill(Integer sourceId, OrderTransSearchPa
for (AbstractStockTransDetail det : source.details) {

WaybillTransDetail detail = new WaybillTransDetail();
detail.workspace = master.workspace;
detail.trans = master;
detail.receiptNo = master.receiptNo;
detail.right = master.right;
Expand Down Expand Up @@ -922,6 +924,7 @@ private static void makeReceiptBasedInvoice(Integer sourceId, OrderTransSearchPa

InvoiceTrans master = new InvoiceTrans();

master.workspace = CacheUtils.getWorkspaceId();
master.receiptNo = DocNoUtils.findLastReceiptNo(right);
master.right = right;
master.transSource = approvalModel.invoiceTransSource;
Expand Down Expand Up @@ -979,6 +982,7 @@ private static void makeReceiptBasedInvoice(Integer sourceId, OrderTransSearchPa
for (AbstractStockTransDetail det : source.details) {

InvoiceTransDetail detail = new InvoiceTransDetail();
detail.workspace = master.workspace;
detail.trans = master;
detail.receiptNo = master.receiptNo;
detail.right = master.right;
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/waybill/TransApprovals.java
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ private static void makeReceiptBasedInvoice(Integer sourceId, OrderTransSearchPa
/*
* Stok yansimalari artik fatura kismindan idare edilecegi icin, faturalasan irsaliyelerin stok yansimalari silinir.
*/
StockTrans trans = StockTrans.findByRefIdAndModule(source.id, right);
StockTrans trans = StockTrans.findByRefIdAndModule(source.id, source.right);
if (trans != null) trans.delete();
}

Expand Down
20 changes: 12 additions & 8 deletions app/utils/Format.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,28 @@ public static String asDate(Date date) {
return DateUtils.formatDateStandart(date);
}

public static String asMoney(double money) {
public static String asMoney(Double money) {
if (money == null) return "0.00";
DecimalFormat df = new DecimalFormat("#,##0.00");
return df.format(money);
return df.format(money.doubleValue());
}

public static String asDecimal(double decimal) {
public static String asDecimal(Double decimal) {
if (decimal == null) return "0";
DecimalFormat df = new DecimalFormat("#,##0.##");
return df.format(decimal);
return df.format(decimal.doubleValue());
}

public static String asMoneyB(double money) {
public static String asMoneyB(Double money) {
if (money == null) return "0.00";
DecimalFormat df = new DecimalFormat("#,##0.00 BB;#,##0.00 AB");
return df.format(money);
return df.format(money.doubleValue());
}

public static String asQuantity(double quantity) {
public static String asQuantity(Double quantity) {
if (quantity == null) return "0";
DecimalFormat df = new DecimalFormat("#,##0.##");
return df.format(quantity);
return df.format(quantity.doubleValue());
}

public static String asInteger(Integer value, String format, int width) {
Expand Down
9 changes: 7 additions & 2 deletions app/views/invoices/transaction/form.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
rightBind.value.equals(enums.Right.FATR_SATIS_FATURASI)
}

@isBuying = @{
rightBind.value.equals(enums.Right.FATR_ALIS_FATURASI) || rightBind.value.equals(enums.Right.FATR_ALIS_IADE_FATURASI)
}

@colWidth = {
width:calc(100% - 5px)
}
Expand Down Expand Up @@ -353,11 +357,12 @@
<script type="text/javascript">
var withholdingRate = '@global.Profiles.chosen().fatr_withholding';
var defaultExcCode = '@global.Profiles.chosen().gnel_excCode';
var isBuying = ('@rightBind.value.transType' === 'Input');
var isBuying = @isBuying;
var isSelling = @isSelling;

var amountField = '#netTotal';
var tableHeight = 460;
var isNotOpeningTrans = true;
var isSelling = @isSelling;
</script>

}
Expand Down
7 changes: 6 additions & 1 deletion app/views/main.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@

<div class="navbar navbar-inverse navbar-fixed-top" data-dropdown="dropdown">
<div class="navbar-inner">
<a href="/"><img src="/assets/img/seyhan_p_d.png" style="padding-left: 10px" title="Ana sayfa"></a>
<span class="pull-left">
<a href="/"><img src="/assets/img/seyhan_p_d.png" style="padding-left: 10px" title="Ana sayfa"></a>
<span class="tiny-info">
<span style="color:cyan">@controllers.Application.getVersion()</span>
</span>
</span>

@if(utils.CacheUtils.isLoggedIn()) {
<div class="pull-right tiny-info">
Expand Down
8 changes: 6 additions & 2 deletions app/views/stocks/transaction/form.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
rightBind.value.equals(enums.Right.STOK_CIKIS_FISI)
}

@isBuying = @{
rightBind.value.equals(enums.Right.STOK_GIRIS_FISI) || rightBind.value.equals(enums.Right.STOK_GIRIS_IADE_FISI)
}

@isTransfer = @{
rightBind.value.equals(enums.Right.STOK_TRANSFER_FISI)
}
Expand Down Expand Up @@ -372,15 +376,15 @@

<script type="text/javascript">
var defaultExcCode = '@global.Profiles.chosen().gnel_excCode';
var isBuying = ('@rightBind.value.transType' === 'Input' || @isTransfer);
var isBuying = @isBuying;
var isSelling = @isSelling;

var hasTaxRate2 = @global.Profiles.chosen().isFieldVisible(enums.Module.stock, "taxRate2");
var hasTaxRate3 = @global.Profiles.chosen().isFieldVisible(enums.Module.stock, "taxRate3");

var amountField = '#netTotal';
var tableHeight = @if(isNotOpeningTrans) {460} else {600};
var isNotOpeningTrans = @isNotOpeningTrans;
var isSelling = @isSelling;
</script>

}
Expand Down
1 change: 1 addition & 0 deletions app/views/waybills/transaction/form.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@
<script type="text/javascript">
var defaultExcCode = '@global.Profiles.chosen().gnel_excCode';
var isBuying = ('@rightBind.value.transType' === 'Input');

var amountField = '#netTotal';
var tableHeight = @(if(global.Profiles.chosen().irsl_hasPrices && isNotOpeningTrans) 320 else 520);
var isNotOpeningTrans = @isNotOpeningTrans;
Expand Down
10 changes: 9 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import play.Project._

name := "seyhan"

version := "1.0.6"
version := "1.0.7"

libraryDependencies ++= Seq(
jdbc,
Expand All @@ -19,4 +19,12 @@ libraryDependencies ++= Seq(
"com.googlecode.flyway" % "flyway-core" % "2.2"
)

buildInfoSettings

sourceGenerators in Compile <+= buildInfo

buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion)

buildInfoPackage := "AppInfo"

playJavaSettings
16 changes: 8 additions & 8 deletions conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ application.global=external.Global

# H2 Database settings
# ~~~~~
db.default.driver=org.h2.Driver
db.default.url="jdbc:h2:file:./h2db/seyhan"
db.default.user=sa
db.default.password=""
#db.default.driver=org.h2.Driver
#db.default.url="jdbc:h2:file:./h2db/seyhan"
#db.default.user=sa
#db.default.password=""

# MySQL Database settings
# ~~~~~
#db.default.driver=com.mysql.jdbc.Driver
#db.default.url="jdbc:mysql://localhost/seyhan?characterEncoding=UTF-8&storage_engine=InnoDB"
#db.default.user=root
#db.default.password="1234"
db.default.driver=com.mysql.jdbc.Driver
db.default.url="jdbc:mysql://localhost/seyhan?characterEncoding=UTF-8&storage_engine=InnoDB"
db.default.user=root
db.default.password="1234"

# Postgresql Database settings
# ~~~~~
Expand Down
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/release
// Use the Play sbt plugin for Play projects
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % System.getProperty("play.version"))

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.2.5")

libraryDependencies += "org.javassist" % "javassist" % "3.18.2-GA"
5 changes: 5 additions & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
sürüm 1.0.7 - 17/05/2015
- yeni bir çek türü tanıtıldığında senet türleri kısmında görünüyordu, düzeltildi
- stok giris-çıkış fişlerindeki limit kontrolleri daha düzenli hale getirildi
- chrome tarayıcısından çek-senet giriş bordrosu yapılırken alt toplamlar oluşmuyordu, düzeltildi

sürüm 1.0.6 - 05/04/2015
- admin_user_audit tablosundaki description alanin kapasitesi 255 e cikarildi
- siparis girislerinde teslim tarihi girildiginde hata aliniyordu, duzeltildi
Expand Down

0 comments on commit ed7b299

Please sign in to comment.