Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6c984131

Von Jan Büren vor mehr als 8 Jahren hinzugefügt

  • ID 6c9841318583fab46e8fa6591b48645adbf3851b
  • Vorgänger 4757427f
  • Nachfolger 233f338c

1. Version POD zu create_assembly

create_assembly wird transfer_assembly ersetzen.
Dies ist die erste Version alle aktuellen optionalen Verfahren
für 'Erzeugnis fertigen' zu ergänzen.
Aktuell offen ist die Liste der Parameter, sowie das
Verhalten bzgl. best_before

Unterschiede anzeigen:

SL/WH.pm
252 252
      # 25.4.09 Antwort: Ja.  Aber erst wenn im Frontend die locales-Funktion aufgerufen wird
253 253

  
254 254
      $kannNichtFertigen .= "Zum Fertigen fehlen: " . abs($partsQTY - $max_parts) .
255
                            " Einheiten der Ware: " . $self->get_part_description(parts_id => $currentPart_ID) . 
255
                            " Einheiten der Ware: " . $self->get_part_description(parts_id => $currentPart_ID) .
256 256
                            " im Lager: " . $warehouse_desc .
257 257
                            ", um das Erzeugnis herzustellen. <br>"; # Konnte die Menge nicht mit der aktuellen Anzahl der Waren fertigen
258 258
      next; # die weiteren Überprüfungen sind unnötig, daher das nächste elemente prüfen (genaue Ausgabe, was noch fehlt)
......
1160 1160

  
1161 1161
=back
1162 1162

  
1163
=head2 create_assembly \%PARAMS, [ \%PARAMS, ... ]
1164

  
1165
Creates an assembly if all defined items are available.
1166

  
1167
One to n rows are inserted in inventory for the used parts and
1168
exactly one row is inserted in inventory for the created assembly.
1169
The calling params originate from C<transfer> but only parts_id with the
1170
attribute assembly are processed.
1171

  
1172
The typical params would be:
1173

  
1174
  my %TRANSFER = (
1175
    'login'            => $::myconfig{login},
1176
    'dst_warehouse_id' => $form->{warehouse_id},
1177
    'dst_bin_id'       => $form->{bin_id},
1178
    'chargenumber'     => $form->{chargenumber},
1179
    'bestbefore'       => $form->{bestbefore},
1180
    'assembly_id'      => $form->{parts_id},
1181
    'qty'              => $form->{qty},
1182
    'comment'          => $form->{comment}
1183
  );
1184

  
1185
=head3 Prerequisites
1186

  
1187
All of these prerequisites have to be trueish, otherwise the function will exit
1188
unsuccessfully with a return value of undef.
1189

  
1190
=over 4
1191

  
1192
=item Mandantory params
1193

  
1194
  assembly_id, qty, login, dst_warehouse_id and dst_bin_id are mandatory.
1195

  
1196
=item Subset named 'Assembly' of data set 'Part'
1197

  
1198
  assembly_id has to be an id in the table parts with the valid subset assembly.
1199

  
1200
=item More than zero items need to be defined for this subset
1201

  
1202
  There has to be at least one date set in the table assembly referenced to this assembly_id.
1203

  
1204
=item The param qty needs to be in the set of positive integers
1205

  
1206
  No negative qty's can be assembled neither zero.
1207

  
1208
=item The assembly item(s) have to be in the same warehouse
1209

  
1210
  inventory.warehouse_id equals dst_warehouse_id (client configurable).
1211

  
1212
=item The assembly item(s) have to be in stock with the qty needed
1213

  
1214
  The qty of all assembly item(s) are >= than the needed qty
1215
  to assemble the qty of assemblies (client configurable).
1216

  
1217
=item assembly item(s) with the parts set 'service' are ignored
1218

  
1219
  The subset 'Services' of part will not transferred for assembly item(s).
1220

  
1221
=back
1222

  
1223
Client configurable prerequisites can be changed with different
1224
prerequisites as described in client_config (s.a. next chapter).
1225

  
1226
More prerequisites may be added in the future.
1227

  
1228
=head2 default creation of assembly
1229

  
1230
Inventory entries distinguish between directions (in/out) and transfer_types.
1231
Valid entries after a creation of an assembly are 'out' and 'used' for assembly
1232
items and 'in' and 'assembled' for the assembly.
1233

  
1234
The method is transaction safe, in case of errors not a single entry will be made
1235
in inventory.
1236

  
1237
Two prerequisites can be changed with this global parameters
1238

  
1239
=over 2
1240

  
1241
=item  $::instance_conf->get_transfer_default_warehouse_for_assembly
1242

  
1243
  If trueish we try to get all the items form the default bins defined in parts
1244
  and do not try to find them in the destination warehouse. Returns an
1245
  error if not all items have set a default bin in parts.
1246

  
1247
=item  $::instance_conf->get_bin_id_ignore_onhand
1248

  
1249
  If trueish we can create assemblies even if we do not have enough items in stock.
1250
  The needed qty will be booked in a special bin, which has to be configured in
1251
  the client config.
1252

  
1253
=back
1254

  
1255

  
1256

  
1257

  
1163 1258
=head1 BUGS
1164 1259

  
1165 1260
None yet.

Auch abrufbar als: Unified diff