Skip to content

Commit

Permalink
admin_user_audit tablosundaki description alanin kapasitesi 255 e cik…
Browse files Browse the repository at this point in the history
…arildi, closes #20, closes #21.

siparis girislerinde teslim tarihi girildiginde hata aliniyordu, closes #22.
siparis fisi onaylama formunda aramalar islem tarihinden yapiliyordu, teslim tarihi olarak degistirildi.
  • Loading branch information
mdpinar committed Apr 5, 2015
1 parent b2b82c5 commit 2e9ab9d
Show file tree
Hide file tree
Showing 17 changed files with 79 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ public void migrate(Connection con) throws Exception {

if (GlobalCons.dbVendor.equals("mysql")) {
sta.executeUpdate("alter table contact change tc tc_kimlik varchar(11)");
} else if (GlobalCons.dbVendor.equals("mssql")) {
sta.executeUpdate("EXEC sp_rename 'tc', 'tc_kimlik_no', 'COLUMN';");
} else if (GlobalCons.dbVendor.equals("mssql")) {
sta.executeUpdate("EXEC sp_rename 'contact.tc', 'tc_kimlik_no', 'COLUMN';");
} else if (GlobalCons.dbVendor.equals("h2")) {
sta.executeUpdate("alter table contact alter column tc rename to tc_kimlik");
} else {
sta.executeUpdate("alter table contact rename column tc to tc_kimlik");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package db.migration;

import java.sql.Connection;
import java.sql.Statement;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import utils.GlobalCons;

import com.googlecode.flyway.core.api.migration.jdbc.JdbcMigration;

/**
* AdminUserAudit tablosudaki 'Description' alaninin uzunlugu 100'den 255'e cikarildi
*
* @author mdpinar
*/

public class V1_0_6__Increasing_desdciption_length_in_AdminUserAudit_table implements JdbcMigration {

private final static Logger log = LoggerFactory.getLogger(V1_0_6__Increasing_desdciption_length_in_AdminUserAudit_table.class);

@Override
public void migrate(Connection con) throws Exception {
log.info("Altering AdminUserAudit table to increase Description field length is executing...");

if (! GlobalCons.isInitScriptExecuted) {
Statement sta = con.createStatement();
sta.executeUpdate("alter table admin_user_audit add column descr varchar(255)");
sta.executeUpdate("update admin_user_audit set descr = description");
sta.executeUpdate("alter table admin_user_audit drop column description");

if (GlobalCons.dbVendor.equals("mysql")) {
sta.executeUpdate("alter table admin_user_audit change descr description varchar(255)");
} else if (GlobalCons.dbVendor.equals("mssql")) {
sta.executeUpdate("EXEC sp_rename 'admin_user_audit.descr', 'description', 'COLUMN';");
} else if (GlobalCons.dbVendor.equals("h2")) {
sta.executeUpdate("alter table admin_user_audit alter column descr rename to description");
} else {
sta.executeUpdate("alter table admin_user_audit rename column descr to description");
}
}

log.info("AdminUserAudit table has been altered.");
}

}
3 changes: 1 addition & 2 deletions app/models/AbstractStockTrans.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ public abstract class AbstractStockTrans extends AbstractBaseTrans {

private static final long serialVersionUID = 1L;

@DateTime(pattern = "dd/MM/yyyy HH:mm:ss")
public Date realDate = new Date();

@DateTime(pattern = "dd/MM/yyyy HH:mm:ss")
@DateTime(pattern = "dd/MM/yyyy")
public Date deliveryDate;

@ManyToOne
Expand Down
8 changes: 6 additions & 2 deletions app/models/InvoiceTrans.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,14 @@ public static List<ReceiptListModel> findReceiptList(OrderTransSearchParam searc
expList.eq("transNo", searchParam.transNo);
}
if (searchParam.startDate != null) {
expList.ge("transDate", searchParam.startDate);
expList.ge("deliveryDate", searchParam.startDate);
}
if (searchParam.endDate != null) {
expList.le("transDate", searchParam.endDate);
if (searchParam.startDate != null) {
expList.le("deliveryDate", searchParam.endDate);
} else {
expList.or(Expr.isNull("deliveryDate"), Expr.le("deliveryDate", searchParam.endDate));
}
}
if (searchParam.refContact != null && searchParam.refContact.id != null) {
expList.eq("contact", searchParam.refContact);
Expand Down
1 change: 1 addition & 0 deletions app/models/OrderTrans.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ public static List<ReceiptListModel> findReceiptList(OrderTransSearchParam searc
receipt.receiptNo = trans.receiptNo;
receipt.contactName = trans.contactName;
receipt.date = DateUtils.formatDateStandart(trans.transDate);
receipt.deliveryDate = DateUtils.formatDateStandart(trans.deliveryDate);
receipt.transNo = trans.transNo;
receipt.amount = Format.asMoney(trans.netTotal);
receipt.excCode = trans.excCode;
Expand Down
1 change: 1 addition & 0 deletions app/models/temporal/ReceiptListModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class ReceiptListModel {
public Integer contactId;
public String contactName;
public String date;
public String deliveryDate;
public String transNo;
public String amount;
public String excCode;
Expand Down
1 change: 1 addition & 0 deletions app/views/invoices/trans_approval/form.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<div id="criteriaSection">

<h4>@Messages("enum.FATR_KAPAMA_ISLEMI")</h4>
<label>@Messages("helpers.you.should.search.before")</label>
<div class="zell">
<div class="row-fluid">
<div class="span6">
Expand Down
7 changes: 5 additions & 2 deletions app/views/orders/trans_approval/form.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<div id="criteriaSection">

<h4>@Messages("enum.SPRS_ONAYLAMA_ADIMLARI")</h4>
<label>@Messages("helpers.you.should.search.before")</label>
<div class="zell">
<div class="row-fluid">
<div class="span6">
Expand Down Expand Up @@ -100,9 +101,10 @@ <h4 class="pull-left">@Messages("results")</h4>
<thead>
<tr>
<th style="width: 5%"><input type="checkbox" id="selectall" checked="false"/></th>
<th style="width: 8%">@Messages("receipt_no")</th>
<th style="width: 6%">@Messages("receipt_no")</th>
<th style="width:25%">@Messages("contact")</th>
<th style="width: 8%">@Messages("date")</th>
<th style="width: 6%">@Messages("date")</th>
<th style="width: 7%">@Messages("date.delivery")</th>
@if(global.Profiles.chosen().sprs_hasPrices) {
<th style="width:10%">@Messages("amount")</th>
@if(global.Profiles.chosen().gnel_hasExchangeSupport) {
Expand All @@ -129,6 +131,7 @@ <h4 class="pull-left">@Messages("results")</h4>
<td><a class="contactRowChooser" href="#" data-index="@index">@detail.contactName</a></td>
} else {<td>@detail.contactName</td>}
<td style="text-align: center">@detail.date</td>
<td style="text-align: center">@detail.deliveryDate</td>
@if(global.Profiles.chosen().sprs_hasPrices) {
<td style="text-align: right;">@detail.amount</td>
@if(global.Profiles.chosen().gnel_hasExchangeSupport) {
Expand Down
1 change: 1 addition & 0 deletions app/views/waybills/trans_approval/form.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<div id="criteriaSection">

<h4>@Messages("enum.IRSL_ONAYLAMA_ADIMLARI")</h4>
<label>@Messages("helpers.you.should.search.before")</label>
<div class="zell">
<div class="row-fluid">
<div class="span6">
Expand Down
2 changes: 1 addition & 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.5"
version := "1.0.6"

libraryDependencies ++= Seq(
jdbc,
Expand Down
2 changes: 1 addition & 1 deletion conf/evolutions/h2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ create table admin_user_audit (
_date datetime,
_right varchar(30),
ip varchar(45),
description varchar(100),
description varchar(255),
log_level varchar(7),
workspace varchar(30),
primary key (id)
Expand Down
2 changes: 1 addition & 1 deletion conf/evolutions/mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ create table admin_user_audit (
_date datetime,
_right varchar(30),
ip varchar(45),
description varchar(100),
description varchar(255),
log_level varchar(7),
workspace varchar(30),
primary key (id)
Expand Down
2 changes: 1 addition & 1 deletion conf/evolutions/postgresql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ create table admin_user_audit (
_date timestamp,
_right varchar(30),
ip varchar(45),
description varchar(100),
description varchar(255),
log_level varchar(7),
workspace varchar(30),
primary key (id)
Expand Down
2 changes: 1 addition & 1 deletion conf/evolutions/sqlserver.sql
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ create table admin_user_audit (
_date datetime,
_right varchar(30),
ip varchar(45),
description varchar(100),
description varchar(255),
log_level varchar(7),
workspace varchar(30)
);
Expand Down
1 change: 1 addition & 0 deletions conf/messages.en
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,7 @@ helpers.general.docNoIncType=Determined "How to increase of Document No in trans
helpers.general.pennyDigitNumber=For currency fields, this value is used as penny digit number.
helpers.general.excCode=In transaction forms, this value is used as chosen exchange code.
helpers.general.vof=These fields are closed for first usage. You need to select what you want to use from them.
helpers.you.should.search.before=Yap Attention: You shuold search before approval!

dialogs.workspace.selection.tableTitle=Table of workspace choice
dialogs.workspace.selection.tableDesc=In following table you see the workspaces that you be able to use.
Expand Down
1 change: 1 addition & 0 deletions conf/messages.tr
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,7 @@ helpers.general.docNoIncType=Hareket işlemlerinde bulunan Belge No alanının a
helpers.general.pennyDigitNumber=Parasal alanlarda bulunacak kuruş hane sayısı bu alan ile belirlenir.
helpers.general.excCode=Para birimi seçilen yerlerde ön tanımlı olarak bu değer gelir.
helpers.general.vof=Bu alanlar ilk kullanımla beraber kapalı olarak gelirler. Kullanmak istediğiniz alanı seçmelisiniz.
helpers.you.should.search.before=Lütfen Dikkat: İşlem yapmadan önce arama yapmalısınız!

dialogs.workspace.selection.tableTitle=Firma seçim tablosu
dialogs.workspace.selection.tableDesc=Aşağıdaki tabloda kullanabileceğiniz firmaları görüyorsunuz.
Expand Down
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.6 - 05/04/2015
- admin_user_audit tablosundaki description alanin kapasitesi 255 e cikarildi
- siparis girislerinde teslim tarihi girildiginde hata aliniyordu, duzeltildi
- siparis fisi onaylama formunda aramalar islem tarihinden yapiliyordu, teslim tarihi olarak degistirildi

sürüm 1.0.5 - 01/03/2015
- stok listesindeki sağlayıcı kodu, birim ve fiyat alanları kaldırılarak yerine ekstra alanlardan 1 ve 2 ile birincil barkod eklendi
- fiyatlı stok listesi eklendi
Expand Down

0 comments on commit 2e9ab9d

Please sign in to comment.