Client Company

From UG

Revision as of 21:42, 16 May 2013 by Alex (Talk | contribs)
Jump to: navigation, search


Contents

Info

  • Parent Mantis: 601

Business Need

Client Company is one of the major entities in the system.

Normally it is a company that ordered 3PL services from Jaguar. As a result Jaguar would have some kind of service contract (with key rules identified such as incoterms and rates) and will bill that company for services.

It is often used as a major filter. And often set up/defined with this purpose - see (a) below.

Note that it is a bit more complicated because:

  • Bill To Party is not always the same name as Client Company (it could be one of its associated offices or divisions for example)
  • One company (as registered by State and uniquely identified by the same internet domain name) could be presented in CT2 by multiple values. This is to distinguish between different types of moves. For example Elizabeth Arden is represented by many E0's:
Elizabeth Arden
Elizabeth Arden AU
Elizabeth Arden PR
Elizabeth Arden SA
EA DOM PORTAL
EA USA Domestic
etc .....

Solution v1

Current!

List of companies and company profile

File:Client companies v1.JPG

File:Client companies profile v1.JPG

Client Company Group

Commissions functionality

Sales Person

Jag user who receives commissions for this Company's profit.

Sales Person Start Day

Day from which Sales Person receives his commission.

  • If Sales Person is set then this date must be set. Produce error pop up on save if not: "Error: Sales Person Start Day must be set! [OK]"
  • If Sales Person is changed but date remains the same (check on Save) produce Warning pop up on save:
    • "Warning! Sales Person is changed but Sales Person Start Day remains the same! Are you sure? [Y][N]"
      • [Y] - continue, save
      • [N] - go back to edit mode

SOWs

SOW 1

  • 0000780: (*ph1)(Admin Client Companies) Implement "archive" function feature
  • implement "standard CT2 archive functionality"
  • if Client Company is archived then:
    • hide it on Create CT page
    • show it with everywhere else (with archive logo or print "archived" next to the name) where we have Clients lists

SOW 2

DB

mysql> select curdate(); describe tblClientCompany;                  
+------------+
| curdate()  |
+------------+
| 2013-05-15 |
+------------+
1 row in set (0.00 sec)


+--------------------------------+-------------+------+-----+---------+----------------+
| Field                          | Type        | Null | Key | Default | Extra          |
+--------------------------------+-------------+------+-----+---------+----------------+
| Id                             | int(10)     | NO   | PRI | NULL    | auto_increment |
| CompanyName                    | varchar(50) | NO   |     | NULL    |                |
| InternalOpsGroupId             | int(10)     | YES  | MUL | NULL    |                |
| SalesPersonId                  | int(10)     | YES  | MUL | NULL    |                |
| CreditStatusId                 | int(10)     | YES  | MUL | NULL    |                |
| CreditLimitId                  | int(10)     | YES  | MUL | NULL    |                |
| CreditTermId                   | int(10)     | YES  | MUL | NULL    |                |
| DisplayExchangeRates           | tinyint(1)  | NO   |     | 0       |                |
| ShowDeliveryLocation           | tinyint(1)  | NO   |     | 0       |                |
| IsArchived                     | bit(1)      | NO   |     | b'0'    |                |
| IsCT2Numbering                 | bit(1)      | NO   |     | b'1'    |                |
| IsPOIssuing                    | bit(1)      | NO   |     | b'0'    |                |
| IsShowReportScheduler          | bit(1)      | NO   |     | b'0'    |                |
| EnableDailyReport              | bit(1)      | NO   |     | b'0'    |                |
| SendToTrendset                 | bit(1)      | NO   |     | b'0'    |                |
| AccClientCompanyGroupId        | int(10)     | YES  | MUL | NULL    |                |
| OwnerOfficeId                  | int(10)     | YES  | MUL | NULL    |                |
| UseDefaultGrossMarginSplitRule | bit(1)      | NO   |     | b'1'    |                |
| GrossMarginSplitRuleId         | int(10)     | YES  | MUL | NULL    |                |
| IsGmsExcluded                  | bit(1)      | NO   | MUL | b'0'    |                |
+--------------------------------+-------------+------+-----+---------+----------------+
20 rows in set (0.00 sec)

mysql> show create table tblClientCompany;

| tblClientCompany | CREATE TABLE `tblClientCompany` (
  `Id` int(10) NOT NULL AUTO_INCREMENT,
  `CompanyName` varchar(50) NOT NULL,
  `InternalOpsGroupId` int(10) DEFAULT NULL,
  `SalesPersonId` int(10) DEFAULT NULL,
  `CreditStatusId` int(10) DEFAULT NULL,
  `CreditLimitId` int(10) DEFAULT NULL,
  `CreditTermId` int(10) DEFAULT NULL,
  `DisplayExchangeRates` tinyint(1) NOT NULL DEFAULT '0',
  `ShowDeliveryLocation` tinyint(1) NOT NULL DEFAULT '0',
  `IsArchived` bit(1) NOT NULL DEFAULT b'0',
  `IsCT2Numbering` bit(1) NOT NULL DEFAULT b'1',
  `IsPOIssuing` bit(1) NOT NULL DEFAULT b'0',
  `IsShowReportScheduler` bit(1) NOT NULL DEFAULT b'0',
  `EnableDailyReport` bit(1) NOT NULL DEFAULT b'0',
  `SendToTrendset` bit(1) NOT NULL DEFAULT b'0',
  `AccClientCompanyGroupId` int(10) DEFAULT NULL,
  `OwnerOfficeId` int(10) DEFAULT NULL,
  `UseDefaultGrossMarginSplitRule` bit(1) NOT NULL DEFAULT b'1',
  `GrossMarginSplitRuleId` int(10) DEFAULT NULL,
  `IsGmsExcluded` bit(1) NOT NULL DEFAULT b'0',
  
  PRIMARY KEY (`Id`),
  KEY `tblClientCompany_ibfk_1` (`InternalOpsGroupId`),
  KEY `tblClientCompany_ibfk_2` (`SalesPersonId`),
  KEY `tblClientCompany_ibfk_3` (`CreditStatusId`),
  KEY `tblClientCompany_ibfk_4` (`CreditLimitId`),
  KEY `tblClientCompany_ibfk_5` (`CreditTermId`),
  KEY `AccClientCompanyGroupId` (`AccClientCompanyGroupId`),
  KEY `OwnerOfficeId` (`OwnerOfficeId`),
  KEY `GrossMarginSplitRuleId` (`GrossMarginSplitRuleId`),
  KEY `IsGmsExcluded` (`IsGmsExcluded`),
 
  CONSTRAINT `fk_AccClientCompanyGroupId` FOREIGN KEY (`AccClientCompanyGroupId`) REFERENCES `tblAccClientCompanyGroup` (`Id`) ON UPDATE CASCADE,
  CONSTRAINT `tblClientCompany_fk` FOREIGN KEY (`OwnerOfficeId`) REFERENCES `tblOffice` (`Id`) ON UPDATE CASCADE,
  CONSTRAINT `tblClientCompany_fk1` FOREIGN KEY (`GrossMarginSplitRuleId`) REFERENCES `tblGrossMarginSplitRule` (`Id`) ON UPDATE CASCADE,
  CONSTRAINT `tblClientCompany_ibfk_1` FOREIGN KEY (`InternalOpsGroupId`) REFERENCES `tblJaguarUserGroup` (`Id`),
  CONSTRAINT `tblClientCompany_ibfk_2` FOREIGN KEY (`SalesPersonId`) REFERENCES `tblJaguarUser` (`Id`),
  CONSTRAINT `tblClientCompany_ibfk_3` FOREIGN KEY (`CreditStatusId`) REFERENCES `tblCreditStatus` (`Id`),
  CONSTRAINT `tblClientCompany_ibfk_4` FOREIGN KEY (`CreditLimitId`) REFERENCES `tblCreditLimit` (`Id`),
  CONSTRAINT `tblClientCompany_ibfk_5` FOREIGN KEY (`CreditTermId`) REFERENCES `tblCreditTerm` (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=1987 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT COMMENT='InnoDB free: 9216 kB; (`InternalOpsGroupId`) REFER `cybertra' |


Personal tools