Solved

Software Business Logic Help

Posted on 2014-03-25
6
228 Views
Last Modified: 2014-03-28
Hello there,

I have a frame which shows the users a list of products and the available qty in the warehouse of the main branch. now the user will can enter the qty it wants to send to another branch office. I need to then update the MBranchProductQty table accordingly. can somebody please help me to achieve this in the best way.see attachement for more details. I am using sql server 2008 as db and GWT for development.

cheers
Zolf
3-25-2014-12-09-03-PM.gif
3-25-2014-12-10-36-PM.gif
0
Comment
Question by:zolf
  • 2
  • 2
  • 2
6 Comments
 
LVL 40

Assisted Solution

by:Vadim Rapp
Vadim Rapp earned 250 total points
ID: 39954519
Since you posted this question under "business logic", rather than, say, "database design"", I will say this: you don't want to update product qty when the user only indicated that he wants to transfer. You should update it only when it has been actually received in the destination. The best is to have yet another location called "in transit", so you first move to "in transit", and then to the destination. Only that allows to tell where the stuff is.
0
 

Author Comment

by:zolf
ID: 39955131
thanks for your comments.
Another problem I have is how do I update that product in that MBranchProductQty table. I mean I need to reduce the qty once it is gone out of that warehouse. Do I create a new record in that table or some other method which you know of.
0
 
LVL 35

Expert Comment

by:David Todd
ID: 39955204
Hi,

The thought is that something like this:

Create another location called - In Transit.

The transaction is in GL terms:
Credit source location
Debit In Transit.

When stock arrives,
Credit In Transit
Debit destination location.

HTH
  David
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:zolf
ID: 39955217
David, thanks for your comments.

what do you mean by another location.do you mean table or column. can you please explain in more details with reference to the tables I have.
0
 
LVL 40

Expert Comment

by:Vadim Rapp
ID: 39955745
It all depends on the meanings of the columns in your table(s), and how they are used by your applications.
0
 
LVL 35

Accepted Solution

by:
David Todd earned 250 total points
ID: 39960203
Hi

By another location I'm assuming that you have a table of locations warehouse1/damaged goods/pick face/bulk/etc.

Add another location at that point.

I've supported a system that had physical warehouses and then under than logical warehouses. The transfer between logical warehouses in the same physical location should be immediate. The transfer between physical sites should go via in-transit.

HTH
  David
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question