4 use vars qw( @ISA $conf $DEBUG $me );
5 use FS::Record qw( qsearch qsearchs );
8 @ISA = qw( FS::svc_Common );
10 $me = '[FS::svc_dsl]';
12 FS::UID->install_callback( sub {
19 FS::svc_dsl - Object methods for svc_dsl records
25 $record = new FS::svc_dsl \%hash;
26 $record = new FS::svc_dsl { 'column' => 'value' };
28 $error = $record->insert;
30 $error = $new_record->replace($old_record);
32 $error = $record->delete;
34 $error = $record->check;
36 $error = $record->suspend;
38 $error = $record->unsuspend;
40 $error = $record->cancel;
44 An FS::svc_dsl object represents a DSL service. FS::svc_dsl inherits from
45 FS::svc_Common. The following fields are currently supported:
51 Primary key (assigned automatcially for new DSL))
55 Time the DSL order was pushed to a vendor, if exporting orders to a vendor/telco
63 Due Date (e.g. once order is in Assigned status or similar by the telco)
67 Vendor/telco DSL order #
69 =item vendor_order_type
71 Vendor/telco DSL order type (e.g. (M)ove, (A)dd, (C)hange, (D)elete, or similar)
73 =item vendor_order_status
75 Vendor/telco DSL order status (e.g. (N)ew, (A)ssigned, (R)ejected, (M)revised,
76 (C)ompleted, (X)cancelled, or similar)
96 Loop-type - vendor/telco-specific
100 Local Voice Provider's name
118 Ikano-specific fields, do not use otherwise
122 If outsourced PPPoE/RADIUS, username
126 If outsourced PPPoE/RADIUS, password
130 Order is monitored (auto-pull/sync), either Y or blank
134 Time of last data pull from vendor/telco
138 DSL order notes placed by staff or vendor/telco on the vendor/telco order
149 Creates a new DSL. To add the DSL to the database, see L<"insert">.
151 Note that this stores the hash reference, not a distinct copy of the hash it
152 points to. You can ask the object for a copy with the I<hash> method.
156 # the new method can be inherited from FS::Record, if a table method is defined
159 my %dis1 = ( disable_default=>1, disable_fixed=>1, disable_inventory=>1, disable_select=>1 );
160 my %dis2 = ( disable_inventory=>1, disable_select=>1 );
164 'sorts' => [ 'svctn' ],
165 'display_weight' => 55,
166 'cancel_weight' => 75,
168 'pushed' => { label => 'Pushed',
169 type => 'disabled' },
170 'desired_dd' => { label => 'Desired Due Date', %dis2, },
171 'dd' => { label => 'Due Date', %dis2, },
172 'vendor_order_id' => { label => 'Vendor Order Id', %dis2, },
173 'vendor_qual_id' => { label => 'Vendor Qualification Id',
174 type => 'disabled' },
175 'vendor_order_type' => { label => 'Vendor Order Type',
176 disable_inventory => 1,
178 'vendor_order_status' => { label => 'Vendor Order Status',
179 disable_inventory => 1,
181 'first' => { label => 'First Name', %dis2, },
182 'last' => { label => 'Last Name', %dis2, },
183 'company' => { label => 'Company Name', %dis2, },
184 'svctn' => { label => 'Service Telephone Number', },
185 'loop_type' => { label => 'Loop Type',
186 disable_inventory => 1,
188 'lvp' => { label => 'Local Voice Provider',
189 disable_inventory => 1,
191 'cktnum' => { label => 'Circuit #', },
192 'rate_band' => { label => 'Rate Band',
193 disable_inventory => 1,
195 'isp_chg' => { label => 'ISP Changing?',
196 type => 'checkbox', %dis2 },
197 'isp_prev' => { label => 'Current or Previous ISP',
198 disable_inventory => 1,
200 'username' => { label => 'PPPoE Username',
203 'password' => { label => 'PPPoE Password', %dis2 },
204 'staticips' => { label => 'Static IPs', %dis1 },
205 'monitored' => { label => 'Monitored',
206 type => 'checkbox', %dis2 },
207 'last_pull' => { label => 'Last Pull', type => 'disabled' },
208 'notes' => { label => 'Order Notes', %dis1 },
213 sub table { 'svc_dsl'; }
217 return $self->svctn if $self->svctn;
218 return $self->username if $self->username;
219 return $self->vendor_order_id if $self->vendor_order_id;
220 return $self->svcnum;
225 Adds this record to the database. If there is an error, returns the error,
226 otherwise returns false.
230 # the insert method can be inherited from FS::Record
234 Delete this record from the database.
238 # the delete method can be inherited from FS::Record
240 =item replace OLD_RECORD
242 Replaces the OLD_RECORD with this one in the database. If there is an error,
243 returns the error, otherwise returns false.
247 # the replace method can be inherited from FS::Record
251 Checks all fields to make sure this is a valid DSL. If there is
252 an error, returns the error, otherwise returns false. Called by the insert
257 # the check method should currently be supplied - FS::Record contains some
258 # data checking routines
264 $self->ut_numbern('svcnum')
265 || $self->ut_numbern('pushed')
266 || $self->ut_number('desired_dd')
267 || $self->ut_numbern('dd')
268 || $self->ut_textn('vendor_order_id')
269 || $self->ut_textn('vendor_qual_id')
270 || $self->ut_alpha('vendor_order_type')
271 || $self->ut_alphan('vendor_order_status')
272 || $self->ut_text('first')
273 || $self->ut_text('last')
274 || $self->ut_textn('company')
275 || $self->ut_numbern('svctn')
276 || $self->ut_alphasn('loop_type')
277 || $self->ut_textn('lvp')
278 || $self->ut_textn('cktnum')
279 || $self->ut_textn('rate_band')
280 || $self->ut_alphan('isp_chg')
281 || $self->ut_textn('isp_prev')
282 || $self->ut_textn('username')
283 || $self->ut_textn('password')
284 || $self->ut_textn('staticips')
285 || $self->ut_enum('monitored', [ '', 'Y' ])
286 || $self->ut_numbern('last_pull')
287 || $self->ut_textn('notes')
289 return $error if $error;
298 This doesn't do anything yet.
302 L<FS::svc_Common>, edit/part_svc.cgi from an installed web interface,
303 export.html from the base documentation, L<FS::Record>, L<FS::Conf>,
304 L<FS::cust_svc>, L<FS::part_svc>, L<FS::cust_pkg>, L<FS::queue>,
305 L<freeside-queued>, schema.html from the base documentation.