View | Details | Raw Unified | Return to bug 22534
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_22534-add_PreFillGuaranteeField_syspref.perl (+7 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES ('PrefillGuaranteeField', 'phone,email,streetnumber,address,city,state,zipcode,country', NULL, 'Prefill these fields in guarantee member entry form from guarantor patron record', 'Multiple') });
4
5
    SetVersion( $DBversion );
6
    print "Upgrade to $DBversion done (Bug XXXXX - description)\n";
7
}
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 499-504 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
499
('PayPalSandboxMode',  '1', NULL ,  'If enabled, the system will use PayPal''s sandbox server for testing, rather than the production server.',  'YesNo'),
499
('PayPalSandboxMode',  '1', NULL ,  'If enabled, the system will use PayPal''s sandbox server for testing, rather than the production server.',  'YesNo'),
500
('PayPalSignature',  '', NULL ,  'Your PayPal API signature',  'Free'),
500
('PayPalSignature',  '', NULL ,  'Your PayPal API signature',  'Free'),
501
('PayPalUser',  '', NULL ,  'Your PayPal API username ( email address )',  'Free'),
501
('PayPalUser',  '', NULL ,  'Your PayPal API username ( email address )',  'Free'),
502
('PrefillGuaranteeField', 'phone,email,streetnumber,address,city,state,zipcode,country', NULL, 'Prefill these fields in guarantee member entry form from guarantor patron record', 'Multiple'),
502
('PrefillItem','0','','When a new item is added, should it be prefilled with last created item values?','YesNo'),
503
('PrefillItem','0','','When a new item is added, should it be prefilled with last created item values?','YesNo'),
503
('PreserveSerialNotes','1','','When a new "Expected" issue is generated, should it be prefilled with last created issue notes?','YesNo'),
504
('PreserveSerialNotes','1','','When a new "Expected" issue is generated, should it be prefilled with last created issue notes?','YesNo'),
504
('previousIssuesDefaultSortOrder','asc','asc|desc','Specify the sort order of Previous Issues on the circulation page','Choice'),
505
('previousIssuesDefaultSortOrder','asc','asc|desc','Specify the sort order of Previous Issues on the circulation page','Choice'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (+36 lines)
Lines 139-144 Patrons: Link Here
139
               yes: Allow
139
               yes: Allow
140
               no: "Don't allow"
140
               no: "Don't allow"
141
         - images to be uploaded and shown for patrons on the staff client.
141
         - images to be uploaded and shown for patrons on the staff client.
142
     -
143
         - "When adding a guarantee to a guarantor patron fill the following fields in the guarantee's member entry form from the guarantors record:"
144
         - pref: PrefillGuaranteeField
145
           multiple:
146
               B_address: "Alternate address - Address"
147
               B_address2: "Alternate address - Address 2"
148
               B_city: "Alternate address - City"
149
               contactnote: "Alternate address - Contact note"
150
               B_country: "Alternate address - Country"
151
               B_email: "Alternate address - Email"
152
               B_phone: "Alternate address - Phone"
153
               B_state: "Alternate address - State"
154
               B_streetnumber: "Alternate address - Street number"
155
               B_zipcode: "Alternate address - ZIP/Postal code"
156
               altcontactaddress1: "Alternate contact: Address"
157
               altcontactaddress2: "Alternate contact: Address 2"
158
               altcontactaddress3: "Alternate contact: City"
159
               altcontactcountry: "Alternate contact: Country"
160
               altcontactfirstname: "Alternate contact: First name"
161
               altcontactphone: "Alternate contact: Phone"
162
               altcontactstate: "Alternate contact: State"
163
               altcontactsurname: "Alternate contact: Surname"
164
               altcontactzipcode: "Alternate contact: ZIP/Postal code"
165
               fax: "Contact - Fax"
166
               mobile: "Contact - Other phone"
167
               email: "Contact - Primary email"
168
               phone: "Contact - Primary phone"
169
               emailpro: "Contact - Secondary email"
170
               phonepro: "Contact - Secondary phone"
171
               address: "Main address - Address"
172
               address2: "Main address - Address 2"
173
               city: "Main address - City"
174
               country: "Main address - Country"
175
               state: "Main address - State"
176
               zipcode: "Main address - ZIP/Postal code"
177
               streetnumber: "Main address - street number"
142
     -
178
     -
143
         - By default, show
179
         - By default, show
144
         - pref: PatronsPerPage
180
         - pref: PatronsPerPage
(-)a/members/memberentry.pl (-10 / +6 lines)
Lines 594-610 if (C4::Context->preference("IndependentBranches")) { Link Here
594
        }
594
        }
595
    }
595
    }
596
}
596
}
597
598
# Define the fields to be pre-filled in guarantee records
599
my $prefillguarantorfields=C4::Context->preference("PrefillGuaranteeField");
600
my @prefill_fields=split(/\,/,$prefillguarantorfields);
601
597
if ($op eq 'add'){
602
if ($op eq 'add'){
598
    if ($guarantor_id) {
603
    if ($guarantor_id) {
599
        foreach (
604
        foreach (@prefill_fields) {
600
            qw(
601
                streetnumber address streettype address2 zipcode country city state phone phonepro mobile
602
                fax email emailpro branchcode
603
                B_streetnumber B_streettype B_address B_address2
604
                B_city B_state B_zipcode B_country B_email B_phone
605
            )
606
          )
607
        {
608
            $newdata{$_} = $guarantor->$_;
605
            $newdata{$_} = $guarantor->$_;
609
        }
606
        }
610
    }
607
    }
611
- 

Return to bug 22534