|
|
@ -231,7 +231,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
|
|
|
|
|
|
|
$scope.exportPartnersExcel = function () {
|
|
|
|
$scope.exportPartnersExcel = function () {
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
|
var param_str = keys(params).map(function (key) {
|
|
|
|
var param_str = Object.keys(params).map(function (key) {
|
|
|
|
var value = params[key];
|
|
|
|
var value = params[key];
|
|
|
|
if (angular.isDate(value)) {
|
|
|
|
if (angular.isDate(value)) {
|
|
|
|
value = $filter('date')(value, 'yyyy-MM-ddTHH:mm:ssZ')
|
|
|
|
value = $filter('date')(value, 'yyyy-MM-ddTHH:mm:ssZ')
|
|
|
@ -414,6 +414,37 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
removeClientPayDesc($scope.partner.client_pay_desc, '20');
|
|
|
|
removeClientPayDesc($scope.partner.client_pay_desc, '20');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.partner.sameAsContactPerson = false;
|
|
|
|
|
|
|
|
$scope.checkboxOnclick = function (){
|
|
|
|
|
|
|
|
$scope.partner.sameAsContactPerson = !($scope.partner.sameAsContactPerson);
|
|
|
|
|
|
|
|
if($scope.partner.sameAsContactPerson)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_person = $scope.partner.contact_person;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_phone_a = $scope.partner.contact_phone_a;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_phone_c = $scope.partner.contact_phone_c;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_phone_p = $scope.partner.contact_phone_p;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_email = $scope.partner.contact_email;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.sameAsAddress=false;
|
|
|
|
|
|
|
|
$scope.sameAddress = function (){
|
|
|
|
|
|
|
|
$scope.partner.sameAsAddress = !($scope.partner.sameAsAddress);
|
|
|
|
|
|
|
|
if($scope.partner.sameAsAddress)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$scope.partner.registered_address = $scope.partner.address;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.registered_suburb = $scope.partner.suburb;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.registered_postcode = $scope.partner.postcode;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.registered_state = $scope.partner.state;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var compare = function (x, y) {
|
|
|
|
var compare = function (x, y) {
|
|
|
|
x = parseInt(x);
|
|
|
|
x = parseInt(x);
|
|
|
@ -593,6 +624,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$scope.partner.company_phone = '+' + $scope.partner.company_phone_c + ($scope.partner.company_phone_a || '') + $scope.partner.company_phone_p;
|
|
|
|
$scope.partner.company_phone = '+' + $scope.partner.company_phone_c + ($scope.partner.company_phone_a || '') + $scope.partner.company_phone_p;
|
|
|
|
$scope.partner.contact_phone = '+' + $scope.partner.contact_phone_c + ($scope.partner.contact_phone_a || '') + $scope.partner.contact_phone_p;
|
|
|
|
$scope.partner.contact_phone = '+' + $scope.partner.contact_phone_c + ($scope.partner.contact_phone_a || '') + $scope.partner.contact_phone_p;
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_phone = '+' + $scope.partner.legal_representative_phone_c + ( $scope.partner.legal_representative_phone_a || '') + $scope.partner.legal_representative_phone_p;
|
|
|
|
|
|
|
|
|
|
|
|
if ($scope.partner.company_phone.indexOf(' ') != -1) {
|
|
|
|
if ($scope.partner.company_phone.indexOf(' ') != -1) {
|
|
|
|
alert('Company Phone can not contain space character');
|
|
|
|
alert('Company Phone can not contain space character');
|
|
|
@ -602,14 +634,26 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
alert('Contact Phone can not contain space character');
|
|
|
|
alert('Contact Phone can not contain space character');
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($scope.partner.legal_representative_phone.indexOf(' ') != -1) {
|
|
|
|
|
|
|
|
alert('Representative phone can not contain space character');
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
if ($scope.partner.contact_email.indexOf(' ') != -1) {
|
|
|
|
if ($scope.partner.contact_email.indexOf(' ') != -1) {
|
|
|
|
alert('Contact email Phone can not contain space character');
|
|
|
|
alert('Contact email Phone can not contain space character');
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($scope.partner.legal_representative_email.indexOf(' ') != -1) {
|
|
|
|
|
|
|
|
alert('Representative email Phone can not contain space character');
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
if ($scope.partner.suburb.indexOf(' ') != -1) {
|
|
|
|
if ($scope.partner.suburb.indexOf(' ') != -1) {
|
|
|
|
alert('suburb can not contain two and more continuous space characters');
|
|
|
|
alert('suburb can not contain two and more continuous space characters');
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($scope.partner.registered_suburb.indexOf(' ') != -1) {
|
|
|
|
|
|
|
|
alert('Registered suburb can not contain two and more continuous space characters');
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
if ($scope.partner.acn && $scope.partner.business_structure == 'Company') {
|
|
|
|
if ($scope.partner.acn && $scope.partner.business_structure == 'Company') {
|
|
|
|
if ($scope.partner.acn.length != 9) {
|
|
|
|
if ($scope.partner.acn.length != 9) {
|
|
|
|
alert('Acn is not valid');
|
|
|
|
alert('Acn is not valid');
|
|
|
@ -1231,6 +1275,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
function ($scope, $http, $state, Upload, commonDialog, timezone, partner) {
|
|
|
|
function ($scope, $http, $state, Upload, commonDialog, timezone, partner) {
|
|
|
|
$scope.timezones = timezone.configs();
|
|
|
|
$scope.timezones = timezone.configs();
|
|
|
|
$scope.partner = partner.data;
|
|
|
|
$scope.partner = partner.data;
|
|
|
|
|
|
|
|
if($scope.partner.representativeInfo != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$scope.partner.registered_address = $scope.partner.representativeInfo.address;
|
|
|
|
|
|
|
|
$scope.partner.registered_suburb = $scope.partner.representativeInfo.suburb;
|
|
|
|
|
|
|
|
$scope.partner.registered_postcode = $scope.partner.representativeInfo.postcode;
|
|
|
|
|
|
|
|
$scope.partner.registered_state = $scope.partner.representativeInfo.state;
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_person = $scope.partner.representativeInfo.representative_person;
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_phone = $scope.partner.representativeInfo.phone;
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_email = $scope.partner.representativeInfo.email;
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_job = $scope.partner.representativeInfo.job_title;
|
|
|
|
|
|
|
|
}
|
|
|
|
var origin_referrer_id = angular.copy($scope.partner.referrer_id);
|
|
|
|
var origin_referrer_id = angular.copy($scope.partner.referrer_id);
|
|
|
|
var resetClientPayDescByTpey = function (type) {
|
|
|
|
var resetClientPayDescByTpey = function (type) {
|
|
|
|
type = parseInt(type);
|
|
|
|
type = parseInt(type);
|
|
|
@ -1281,6 +1336,34 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.sameAsContactPerson = false;
|
|
|
|
|
|
|
|
$scope.checkboxOnclick = function (){
|
|
|
|
|
|
|
|
$scope.partner.sameAsContactPerson = !($scope.partner.sameAsContactPerson);
|
|
|
|
|
|
|
|
if($scope.partner.sameAsContactPerson)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_person = $scope.partner.contact_person;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_phone = $scope.partner.contact_phone;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_email = $scope.partner.contact_email;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.sameAsAddress=false;
|
|
|
|
|
|
|
|
$scope.sameAddress = function (){
|
|
|
|
|
|
|
|
$scope.partner.sameAsAddress=!($scope.partner.sameAsAddress);
|
|
|
|
|
|
|
|
if($scope.partner.sameAsAddress)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$scope.partner.registered_address = $scope.partner.address;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.registered_suburb = $scope.partner.suburb;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.registered_postcode = $scope.partner.postcode;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.registered_state = $scope.partner.state;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$scope.listReferrers = function () {
|
|
|
|
$scope.listReferrers = function () {
|
|
|
|
$http.get('/sys/orgs/referrer').then(function (resp) {
|
|
|
|
$http.get('/sys/orgs/referrer').then(function (resp) {
|
|
|
|
$scope.referrers = resp.data;
|
|
|
|
$scope.referrers = resp.data;
|
|
|
@ -2964,6 +3047,38 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
|
|
|
|
|
|
|
// $scope.t2city_map = angular.copy(t2city_map);
|
|
|
|
// $scope.t2city_map = angular.copy(t2city_map);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.sameAsContactPerson = false;
|
|
|
|
|
|
|
|
$scope.checkboxOnclick = function (){
|
|
|
|
|
|
|
|
$scope.partner.sameAsContactPerson = !($scope.partner.sameAsContactPerson);
|
|
|
|
|
|
|
|
if($scope.partner.sameAsContactPerson)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_person = $scope.partner.contact_person;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_phone_a = $scope.partner.contact_phone_a;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_phone_c = $scope.partner.contact_phone_c;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_phone_p = $scope.partner.contact_phone_p;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_email = $scope.partner.contact_email;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.sameAsAddress=false;
|
|
|
|
|
|
|
|
$scope.sameAddress = function (){
|
|
|
|
|
|
|
|
$scope.partner.sameAsAddress=!($scope.partner.sameAsAddress);
|
|
|
|
|
|
|
|
if($scope.partner.sameAsAddress)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$scope.partner.registered_address = $scope.partner.address;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.registered_suburb = $scope.partner.suburb;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.registered_postcode = $scope.partner.postcode;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.registered_state = $scope.partner.state;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$scope.timezones = timezone.configs();
|
|
|
|
$scope.timezones = timezone.configs();
|
|
|
|
$scope.states = stateMap.configs();
|
|
|
|
$scope.states = stateMap.configs();
|
|
|
|
$scope.countries = countryMap.configs();
|
|
|
|
$scope.countries = countryMap.configs();
|
|
|
@ -3007,6 +3122,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$scope.partner.company_phone = '+' + $scope.partner.company_phone_c + ($scope.partner.company_phone_a || '') + $scope.partner.company_phone_p;
|
|
|
|
$scope.partner.company_phone = '+' + $scope.partner.company_phone_c + ($scope.partner.company_phone_a || '') + $scope.partner.company_phone_p;
|
|
|
|
$scope.partner.contact_phone = '+' + $scope.partner.contact_phone_c + ($scope.partner.contact_phone_a || '') + $scope.partner.contact_phone_p;
|
|
|
|
$scope.partner.contact_phone = '+' + $scope.partner.contact_phone_c + ($scope.partner.contact_phone_a || '') + $scope.partner.contact_phone_p;
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_phone = '+' + $scope.partner.legal_representative_phone_c + ( $scope.partner.legal_representative_phone_a || '') + $scope.partner.legal_representative_phone_p;
|
|
|
|
|
|
|
|
|
|
|
|
if ($scope.partner.company_phone.indexOf(' ') != -1) {
|
|
|
|
if ($scope.partner.company_phone.indexOf(' ') != -1) {
|
|
|
|
alert('Company Phone can not contain space character');
|
|
|
|
alert('Company Phone can not contain space character');
|
|
|
|