Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 47a963f4

Von Moritz Bunkus vor fast 14 Jahren hinzugefügt

  • ID 47a963f4da66588e72124424e0e5e58577894eb5
  • Vorgänger 37171c70
  • Nachfolger 6fd01c3d

Doku-Update

Unterschiede anzeigen:

SL/DB/Part.pm
124 124

  
125 125
=pod
126 126

  
127
=encoding utf-8
128

  
127 129
=head1 NAME
128 130

  
129 131
SL::DB::Part: Model for the 'parts' table
......
155 157
C<new_service>, and C<new_assembly>. A Buchungsgruppe should be supplied in this
156 158
case, but it will use the default Buchungsgruppe if you don't.
157 159

  
158
Matching these there are assorted helper methods dealing with type:
160
Matching these there are assorted helper methods dealing with types,
161
e.g.  L</new_part>, L</new_service>, L</new_assembly>, L</type>,
162
L</is_type> and others.
163

  
164
=head1 FUNCTIONS
165

  
166
=over 4
159 167

  
160
=head2 new_part PARAMS
168
=item C<new_part %PARAMS>
161 169

  
162
=head2 new_service PARAMS
170
=item C<new_service %PARAMS>
163 171

  
164
=head2 new_assembly PARAMS
172
=item C<new_assembly %PARAMS>
165 173

  
166 174
Will set the appropriate data fields so that the resulting instance will be of
167 175
tthe requested type. Since part of the distinction are accounting targets,
168 176
providing a C<Buchungsgruppe> is recommended. If none is given the constructor
169 177
will load a default one and set the accounting targets from it.
170 178

  
171
=head2 type
179
=item C<type>
172 180

  
173 181
Returns the type as a string. Can be one of C<part>, C<service>, C<assembly>.
174 182

  
175
=head2 is_type TYPE
183
=item C<is_type $TYPE>
176 184

  
177 185
Tests if the current object is a part, a service or an
178 186
assembly. C<$type> must be one of the words 'part', 'service' or
......
181 189
Returns 1 if the requested type matches, 0 if it doesn't and
182 190
C<confess>es if an unknown C<$type> parameter is encountered.
183 191

  
184
=head2 is_part
192
=item C<is_part>
185 193

  
186
=head2 is_service
194
=item C<is_service>
187 195

  
188
=head2 is_assembly
196
=item C<is_assembly>
189 197

  
190
Shorthand for is_type('part') etc.
198
Shorthand for C<is_type('part')> etc.
191 199

  
192
=head1 FUNCTIONS
193

  
194
=head2 get_sellprice_info %params
200
=item C<get_sellprice_info %params>
195 201

  
196 202
Retrieves the C<sellprice> and C<price_factor_id> for a part under
197 203
different conditions and returns a hash reference with those two keys.
......
205 211
If none of the above conditions is met then the information from
206 212
C<$self> is used.
207 213

  
208
=head2 get_ordered_qty %params
214
=item C<get_ordered_qty %params>
209 215

  
210 216
Retrieves the quantity that has been ordered from a vendor but that
211 217
has not been delivered yet. Only open purchase orders are considered.
212 218

  
213
=head2 orphaned
219
=item C<orphaned>
214 220

  
215 221
Checks if this articke is used in orders, invoices, delivery orders or
216 222
assemblies.
217 223

  
218
=head2 buchungsgruppe BUCHUNGSGRUPPE
224
=item C<buchungsgruppe BUCHUNGSGRUPPE>
219 225

  
220 226
Used to set the accounting informations from a L<SL:DB::Buchungsgruppe> object.
221 227
Please note, that this is a write only accessor, the original Buchungsgruppe can
222 228
not be retrieved from an article once set.
223 229

  
224
=head1 AUTHOR
230
=back
231

  
232
=head1 AUTHORS
225 233

  
226
Moritz Bunkus E<lt>m.bunkus@linet-services.deE<gt>
234
Moritz Bunkus E<lt>m.bunkus@linet-services.deE<gt>,
235
Sven Schöling E<lt>s.schoeling@linet-services.deE<gt>
227 236

  
228 237
=cut

Auch abrufbar als: Unified diff